Lines Matching refs:mhi_ctxt
230 struct mhi_ctxt *mhi_ctxt = mhi_cntrl->mhi_ctxt; in mhi_deinit_dev_ctxt() local
245 sizeof(*mhi_ctxt->cmd_ctxt) * NR_OF_CMD_RINGS, in mhi_deinit_dev_ctxt()
246 mhi_ctxt->cmd_ctxt, mhi_ctxt->cmd_ctxt_addr); in mhi_deinit_dev_ctxt()
260 dma_free_coherent(mhi_cntrl->cntrl_dev, sizeof(*mhi_ctxt->er_ctxt) * in mhi_deinit_dev_ctxt()
261 mhi_cntrl->total_ev_rings, mhi_ctxt->er_ctxt, in mhi_deinit_dev_ctxt()
262 mhi_ctxt->er_ctxt_addr); in mhi_deinit_dev_ctxt()
264 dma_free_coherent(mhi_cntrl->cntrl_dev, sizeof(*mhi_ctxt->chan_ctxt) * in mhi_deinit_dev_ctxt()
265 mhi_cntrl->max_chan, mhi_ctxt->chan_ctxt, in mhi_deinit_dev_ctxt()
266 mhi_ctxt->chan_ctxt_addr); in mhi_deinit_dev_ctxt()
268 kfree(mhi_ctxt); in mhi_deinit_dev_ctxt()
269 mhi_cntrl->mhi_ctxt = NULL; in mhi_deinit_dev_ctxt()
274 struct mhi_ctxt *mhi_ctxt; in mhi_init_dev_ctxt() local
287 mhi_ctxt = kzalloc(sizeof(*mhi_ctxt), GFP_KERNEL); in mhi_init_dev_ctxt()
288 if (!mhi_ctxt) in mhi_init_dev_ctxt()
292 mhi_ctxt->chan_ctxt = dma_alloc_coherent(mhi_cntrl->cntrl_dev, in mhi_init_dev_ctxt()
293 sizeof(*mhi_ctxt->chan_ctxt) * in mhi_init_dev_ctxt()
295 &mhi_ctxt->chan_ctxt_addr, in mhi_init_dev_ctxt()
297 if (!mhi_ctxt->chan_ctxt) in mhi_init_dev_ctxt()
301 chan_ctxt = mhi_ctxt->chan_ctxt; in mhi_init_dev_ctxt()
324 mhi_ctxt->er_ctxt = dma_alloc_coherent(mhi_cntrl->cntrl_dev, in mhi_init_dev_ctxt()
325 sizeof(*mhi_ctxt->er_ctxt) * in mhi_init_dev_ctxt()
327 &mhi_ctxt->er_ctxt_addr, in mhi_init_dev_ctxt()
329 if (!mhi_ctxt->er_ctxt) in mhi_init_dev_ctxt()
332 er_ctxt = mhi_ctxt->er_ctxt; in mhi_init_dev_ctxt()
371 mhi_ctxt->cmd_ctxt = dma_alloc_coherent(mhi_cntrl->cntrl_dev, in mhi_init_dev_ctxt()
372 sizeof(*mhi_ctxt->cmd_ctxt) * in mhi_init_dev_ctxt()
374 &mhi_ctxt->cmd_ctxt_addr, in mhi_init_dev_ctxt()
376 if (!mhi_ctxt->cmd_ctxt) in mhi_init_dev_ctxt()
380 cmd_ctxt = mhi_ctxt->cmd_ctxt; in mhi_init_dev_ctxt()
398 mhi_cntrl->mhi_ctxt = mhi_ctxt; in mhi_init_dev_ctxt()
410 sizeof(*mhi_ctxt->cmd_ctxt) * NR_OF_CMD_RINGS, in mhi_init_dev_ctxt()
411 mhi_ctxt->cmd_ctxt, mhi_ctxt->cmd_ctxt_addr); in mhi_init_dev_ctxt()
425 dma_free_coherent(mhi_cntrl->cntrl_dev, sizeof(*mhi_ctxt->er_ctxt) * in mhi_init_dev_ctxt()
426 mhi_cntrl->total_ev_rings, mhi_ctxt->er_ctxt, in mhi_init_dev_ctxt()
427 mhi_ctxt->er_ctxt_addr); in mhi_init_dev_ctxt()
430 dma_free_coherent(mhi_cntrl->cntrl_dev, sizeof(*mhi_ctxt->chan_ctxt) * in mhi_init_dev_ctxt()
431 mhi_cntrl->max_chan, mhi_ctxt->chan_ctxt, in mhi_init_dev_ctxt()
432 mhi_ctxt->chan_ctxt_addr); in mhi_init_dev_ctxt()
435 kfree(mhi_ctxt); in mhi_init_dev_ctxt()
454 upper_32_bits(mhi_cntrl->mhi_ctxt->chan_ctxt_addr), in mhi_init_mmio()
458 lower_32_bits(mhi_cntrl->mhi_ctxt->chan_ctxt_addr), in mhi_init_mmio()
462 upper_32_bits(mhi_cntrl->mhi_ctxt->er_ctxt_addr), in mhi_init_mmio()
466 lower_32_bits(mhi_cntrl->mhi_ctxt->er_ctxt_addr), in mhi_init_mmio()
470 upper_32_bits(mhi_cntrl->mhi_ctxt->cmd_ctxt_addr), in mhi_init_mmio()
474 lower_32_bits(mhi_cntrl->mhi_ctxt->cmd_ctxt_addr), in mhi_init_mmio()
592 chan_ctxt = &mhi_cntrl->mhi_ctxt->chan_ctxt[mhi_chan->chan]; in mhi_deinit_chan_ctxt()
630 chan_ctxt = &mhi_cntrl->mhi_ctxt->chan_ctxt[mhi_chan->chan]; in mhi_init_chan_ctxt()