Lines Matching refs:mhi_ctxt

229 	struct mhi_ctxt *mhi_ctxt = mhi_cntrl->mhi_ctxt;  in mhi_deinit_dev_ctxt()  local
244 sizeof(*mhi_ctxt->cmd_ctxt) * NR_OF_CMD_RINGS, in mhi_deinit_dev_ctxt()
245 mhi_ctxt->cmd_ctxt, mhi_ctxt->cmd_ctxt_addr); in mhi_deinit_dev_ctxt()
259 dma_free_coherent(mhi_cntrl->cntrl_dev, sizeof(*mhi_ctxt->er_ctxt) * in mhi_deinit_dev_ctxt()
260 mhi_cntrl->total_ev_rings, mhi_ctxt->er_ctxt, in mhi_deinit_dev_ctxt()
261 mhi_ctxt->er_ctxt_addr); in mhi_deinit_dev_ctxt()
263 dma_free_coherent(mhi_cntrl->cntrl_dev, sizeof(*mhi_ctxt->chan_ctxt) * in mhi_deinit_dev_ctxt()
264 mhi_cntrl->max_chan, mhi_ctxt->chan_ctxt, in mhi_deinit_dev_ctxt()
265 mhi_ctxt->chan_ctxt_addr); in mhi_deinit_dev_ctxt()
267 kfree(mhi_ctxt); in mhi_deinit_dev_ctxt()
268 mhi_cntrl->mhi_ctxt = NULL; in mhi_deinit_dev_ctxt()
273 struct mhi_ctxt *mhi_ctxt; in mhi_init_dev_ctxt() local
286 mhi_ctxt = kzalloc(sizeof(*mhi_ctxt), GFP_KERNEL); in mhi_init_dev_ctxt()
287 if (!mhi_ctxt) in mhi_init_dev_ctxt()
291 mhi_ctxt->chan_ctxt = dma_alloc_coherent(mhi_cntrl->cntrl_dev, in mhi_init_dev_ctxt()
292 sizeof(*mhi_ctxt->chan_ctxt) * in mhi_init_dev_ctxt()
294 &mhi_ctxt->chan_ctxt_addr, in mhi_init_dev_ctxt()
296 if (!mhi_ctxt->chan_ctxt) in mhi_init_dev_ctxt()
300 chan_ctxt = mhi_ctxt->chan_ctxt; in mhi_init_dev_ctxt()
323 mhi_ctxt->er_ctxt = dma_alloc_coherent(mhi_cntrl->cntrl_dev, in mhi_init_dev_ctxt()
324 sizeof(*mhi_ctxt->er_ctxt) * in mhi_init_dev_ctxt()
326 &mhi_ctxt->er_ctxt_addr, in mhi_init_dev_ctxt()
328 if (!mhi_ctxt->er_ctxt) in mhi_init_dev_ctxt()
331 er_ctxt = mhi_ctxt->er_ctxt; in mhi_init_dev_ctxt()
370 mhi_ctxt->cmd_ctxt = dma_alloc_coherent(mhi_cntrl->cntrl_dev, in mhi_init_dev_ctxt()
371 sizeof(*mhi_ctxt->cmd_ctxt) * in mhi_init_dev_ctxt()
373 &mhi_ctxt->cmd_ctxt_addr, in mhi_init_dev_ctxt()
375 if (!mhi_ctxt->cmd_ctxt) in mhi_init_dev_ctxt()
379 cmd_ctxt = mhi_ctxt->cmd_ctxt; in mhi_init_dev_ctxt()
397 mhi_cntrl->mhi_ctxt = mhi_ctxt; in mhi_init_dev_ctxt()
409 sizeof(*mhi_ctxt->cmd_ctxt) * NR_OF_CMD_RINGS, in mhi_init_dev_ctxt()
410 mhi_ctxt->cmd_ctxt, mhi_ctxt->cmd_ctxt_addr); in mhi_init_dev_ctxt()
424 dma_free_coherent(mhi_cntrl->cntrl_dev, sizeof(*mhi_ctxt->er_ctxt) * in mhi_init_dev_ctxt()
425 mhi_cntrl->total_ev_rings, mhi_ctxt->er_ctxt, in mhi_init_dev_ctxt()
426 mhi_ctxt->er_ctxt_addr); in mhi_init_dev_ctxt()
429 dma_free_coherent(mhi_cntrl->cntrl_dev, sizeof(*mhi_ctxt->chan_ctxt) * in mhi_init_dev_ctxt()
430 mhi_cntrl->max_chan, mhi_ctxt->chan_ctxt, in mhi_init_dev_ctxt()
431 mhi_ctxt->chan_ctxt_addr); in mhi_init_dev_ctxt()
434 kfree(mhi_ctxt); in mhi_init_dev_ctxt()
453 upper_32_bits(mhi_cntrl->mhi_ctxt->chan_ctxt_addr), in mhi_init_mmio()
457 lower_32_bits(mhi_cntrl->mhi_ctxt->chan_ctxt_addr), in mhi_init_mmio()
461 upper_32_bits(mhi_cntrl->mhi_ctxt->er_ctxt_addr), in mhi_init_mmio()
465 lower_32_bits(mhi_cntrl->mhi_ctxt->er_ctxt_addr), in mhi_init_mmio()
469 upper_32_bits(mhi_cntrl->mhi_ctxt->cmd_ctxt_addr), in mhi_init_mmio()
473 lower_32_bits(mhi_cntrl->mhi_ctxt->cmd_ctxt_addr), in mhi_init_mmio()
579 chan_ctxt = &mhi_cntrl->mhi_ctxt->chan_ctxt[mhi_chan->chan]; in mhi_deinit_chan_ctxt()
617 chan_ctxt = &mhi_cntrl->mhi_ctxt->chan_ctxt[mhi_chan->chan]; in mhi_init_chan_ctxt()