Lines Matching refs:p_dma_ch
115 ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; in ppc4xx_enable_dma() local
121 if (p_dma_ch->in_use) { in ppc4xx_enable_dma()
131 if (p_dma_ch->mode == DMA_MODE_READ) { in ppc4xx_enable_dma()
134 ppc4xx_set_dst_addr(dmanr, p_dma_ch->addr); in ppc4xx_enable_dma()
135 } else if (p_dma_ch->mode == DMA_MODE_WRITE) { in ppc4xx_enable_dma()
137 ppc4xx_set_src_addr(dmanr, p_dma_ch->addr); in ppc4xx_enable_dma()
160 if (p_dma_ch->mode == DMA_MODE_MM) { in ppc4xx_enable_dma()
197 if ((p_dma_ch->mode == DMA_MODE_MM_DEVATDST) || in ppc4xx_enable_dma()
198 (p_dma_ch->mode == DMA_MODE_MM_DEVATSRC)) in ppc4xx_enable_dma()
205 control |= (p_dma_ch->mode | DMA_CE_ENABLE); in ppc4xx_enable_dma()
224 p_dma_ch->in_use = 1; in ppc4xx_enable_dma()
231 ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; in ppc4xx_disable_dma() local
233 if (!p_dma_ch->in_use) { in ppc4xx_disable_dma()
268 p_dma_ch->in_use = 0; in ppc4xx_disable_dma()
291 ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; in ppc4xx_set_dma_mode() local
298 p_dma_ch->mode = mode; in ppc4xx_set_dma_mode()
312 ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; in ppc4xx_set_dma_count() local
317 switch (p_dma_ch->pwidth) { in ppc4xx_set_dma_count()
334 p_dma_ch->pwidth); in ppc4xx_set_dma_count()
340 count, p_dma_ch->pwidth); in ppc4xx_set_dma_count()
344 count = count >> p_dma_ch->shift; in ppc4xx_set_dma_count()
373 ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; in ppc4xx_get_dma_residue() local
393 return (count << p_dma_ch->shift); in ppc4xx_get_dma_residue()
404 ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; in ppc4xx_set_dma_addr() local
414 switch (p_dma_ch->pwidth) { in ppc4xx_set_dma_addr()
431 p_dma_ch->pwidth); in ppc4xx_set_dma_addr()
436 addr, p_dma_ch->pwidth); in ppc4xx_set_dma_addr()
441 p_dma_ch->addr = addr; in ppc4xx_set_dma_addr()
455 ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; in ppc4xx_set_dma_addr2() local
457 switch (p_dma_ch->pwidth) { in ppc4xx_set_dma_addr2()
480 p_dma_ch->pwidth); in ppc4xx_set_dma_addr2()
486 src_dma_addr, dst_dma_addr, p_dma_ch->pwidth); in ppc4xx_set_dma_addr2()
511 ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; in ppc4xx_enable_dma_interrupt() local
513 p_dma_ch->int_enable = 1; in ppc4xx_enable_dma_interrupt()
554 ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; in ppc4xx_disable_dma_interrupt() local
556 p_dma_ch->int_enable = 0; in ppc4xx_disable_dma_interrupt()
599 ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; in ppc4xx_init_dma_channel() local
630 polarity |= p_dma_ch->polarity; in ppc4xx_init_dma_channel()
638 polarity |= p_dma_ch->polarity; in ppc4xx_init_dma_channel()
646 polarity |= p_dma_ch->polarity; in ppc4xx_init_dma_channel()
654 polarity |= p_dma_ch->polarity; in ppc4xx_init_dma_channel()
665 memcpy(p_dma_ch, p_init, sizeof (ppc_dma_ch_t)); in ppc4xx_init_dma_channel()
679 p_dma_ch->shift = p_init->pwidth; in ppc4xx_init_dma_channel()
684 p_dma_ch->control = control; in ppc4xx_init_dma_channel()
694 ppc4xx_get_channel_config(unsigned int dmanr, ppc_dma_ch_t * p_dma_ch) in ppc4xx_get_channel_config() argument
707 p_dma_ch->polarity = polarity & GET_DMA_POLARITY(0); in ppc4xx_get_channel_config()
711 p_dma_ch->polarity = polarity & GET_DMA_POLARITY(1); in ppc4xx_get_channel_config()
715 p_dma_ch->polarity = polarity & GET_DMA_POLARITY(2); in ppc4xx_get_channel_config()
719 p_dma_ch->polarity = polarity & GET_DMA_POLARITY(3); in ppc4xx_get_channel_config()
726 p_dma_ch->cp = GET_DMA_PRIORITY(control); in ppc4xx_get_channel_config()
727 p_dma_ch->pwidth = GET_DMA_PW(control); in ppc4xx_get_channel_config()
728 p_dma_ch->psc = GET_DMA_PSC(control); in ppc4xx_get_channel_config()
729 p_dma_ch->pwc = GET_DMA_PWC(control); in ppc4xx_get_channel_config()
730 p_dma_ch->phc = GET_DMA_PHC(control); in ppc4xx_get_channel_config()
731 p_dma_ch->ce = GET_DMA_CE_ENABLE(control); in ppc4xx_get_channel_config()
732 p_dma_ch->int_enable = GET_DMA_CIE_ENABLE(control); in ppc4xx_get_channel_config()
733 p_dma_ch->shift = GET_DMA_PW(control); in ppc4xx_get_channel_config()
736 p_dma_ch->pf = GET_DMA_PREFETCH(control); in ppc4xx_get_channel_config()
738 p_dma_ch->ch_enable = GET_DMA_CH(control); in ppc4xx_get_channel_config()
739 p_dma_ch->ece_enable = GET_DMA_ECE(control); in ppc4xx_get_channel_config()
740 p_dma_ch->tcd_disable = GET_DMA_TCD(control); in ppc4xx_get_channel_config()