Lines Matching full:md
62 struct uniphier_mdmac_desc *md; member
94 mc->md = NULL; in uniphier_mdmac_next_desc()
100 mc->md = to_uniphier_mdmac_desc(vd); in uniphier_mdmac_next_desc()
102 return mc->md; in uniphier_mdmac_next_desc()
107 struct uniphier_mdmac_desc *md) in uniphier_mdmac_handle() argument
114 sg = &md->sgl[md->sg_cur]; in uniphier_mdmac_handle()
116 if (md->dir == DMA_MEM_TO_DEV) { in uniphier_mdmac_handle()
147 struct uniphier_mdmac_desc *md; in uniphier_mdmac_start() local
149 md = uniphier_mdmac_next_desc(mc); in uniphier_mdmac_start()
150 if (md) in uniphier_mdmac_start()
151 uniphier_mdmac_handle(mc, md); in uniphier_mdmac_start()
178 struct uniphier_mdmac_desc *md; in uniphier_mdmac_interrupt() local
201 * check mc->md. If it is NULL, we are aborting. in uniphier_mdmac_interrupt()
203 md = mc->md; in uniphier_mdmac_interrupt()
204 if (!md) in uniphier_mdmac_interrupt()
207 md->sg_cur++; in uniphier_mdmac_interrupt()
209 if (md->sg_cur >= md->sg_len) { in uniphier_mdmac_interrupt()
210 vchan_cookie_complete(&md->vd); in uniphier_mdmac_interrupt()
211 md = uniphier_mdmac_next_desc(mc); in uniphier_mdmac_interrupt()
212 if (!md) in uniphier_mdmac_interrupt()
216 uniphier_mdmac_handle(mc, md); in uniphier_mdmac_interrupt()
236 struct uniphier_mdmac_desc *md; in uniphier_mdmac_prep_slave_sg() local
241 md = kzalloc(sizeof(*md), GFP_NOWAIT); in uniphier_mdmac_prep_slave_sg()
242 if (!md) in uniphier_mdmac_prep_slave_sg()
245 md->sgl = sgl; in uniphier_mdmac_prep_slave_sg()
246 md->sg_len = sg_len; in uniphier_mdmac_prep_slave_sg()
247 md->dir = direction; in uniphier_mdmac_prep_slave_sg()
249 return vchan_tx_prep(vc, &md->vd, flags); in uniphier_mdmac_prep_slave_sg()
262 if (mc->md) { in uniphier_mdmac_terminate_all()
263 vchan_terminate_vdesc(&mc->md->vd); in uniphier_mdmac_terminate_all()
264 mc->md = NULL; in uniphier_mdmac_terminate_all()
288 struct uniphier_mdmac_desc *md = NULL; in uniphier_mdmac_tx_status() local
304 if (mc->md && mc->md->vd.tx.cookie == cookie) { in uniphier_mdmac_tx_status()
308 md = mc->md; in uniphier_mdmac_tx_status()
311 if (!md) { in uniphier_mdmac_tx_status()
314 md = to_uniphier_mdmac_desc(vd); in uniphier_mdmac_tx_status()
317 if (md) { in uniphier_mdmac_tx_status()
319 for (i = md->sg_cur; i < md->sg_len; i++) in uniphier_mdmac_tx_status()
320 txstate->residue += sg_dma_len(&md->sgl[i]); in uniphier_mdmac_tx_status()
336 if (vchan_issue_pending(vc) && !mc->md) in uniphier_mdmac_issue_pending()