Lines Matching refs:chan
64 struct dma_channel *chan = info->channels + i; in g2_dma_interrupt() local
66 wake_up(&chan->wait_queue); in g2_dma_interrupt()
76 static int g2_enable_dma(struct dma_channel *chan) in g2_enable_dma() argument
78 unsigned int chan_nr = chan->chan; in g2_enable_dma()
86 static int g2_disable_dma(struct dma_channel *chan) in g2_disable_dma() argument
88 unsigned int chan_nr = chan->chan; in g2_disable_dma()
96 static int g2_xfer_dma(struct dma_channel *chan) in g2_xfer_dma() argument
98 unsigned int chan_nr = chan->chan; in g2_xfer_dma()
100 if (chan->sar & 31) { in g2_xfer_dma()
101 printk("g2dma: unaligned source 0x%lx\n", chan->sar); in g2_xfer_dma()
105 if (chan->dar & 31) { in g2_xfer_dma()
106 printk("g2dma: unaligned dest 0x%lx\n", chan->dar); in g2_xfer_dma()
111 if (chan->count & 31) in g2_xfer_dma()
112 chan->count = (chan->count + (32 - 1)) & ~(32 - 1); in g2_xfer_dma()
115 chan->dar += 0xa0800000; in g2_xfer_dma()
118 chan->mode = !chan->mode; in g2_xfer_dma()
120 flush_icache_range((unsigned long)chan->sar, chan->count); in g2_xfer_dma()
122 g2_disable_dma(chan); in g2_xfer_dma()
124 g2_dma->channel[chan_nr].g2_addr = chan->dar & 0x1fffffe0; in g2_xfer_dma()
125 g2_dma->channel[chan_nr].root_addr = chan->sar & 0x1fffffe0; in g2_xfer_dma()
126 g2_dma->channel[chan_nr].size = (chan->count & ~31) | 0x80000000; in g2_xfer_dma()
127 g2_dma->channel[chan_nr].direction = chan->mode; in g2_xfer_dma()
136 g2_enable_dma(chan); in g2_xfer_dma()
152 static int g2_get_residue(struct dma_channel *chan) in g2_get_residue() argument
154 return g2_bytes_remaining(chan->chan); in g2_get_residue()