Lines Matching refs:chan
61 struct dma_channel *chan = info->channels + i; in g2_dma_interrupt() local
63 wake_up(&chan->wait_queue); in g2_dma_interrupt()
73 static int g2_enable_dma(struct dma_channel *chan) in g2_enable_dma() argument
75 unsigned int chan_nr = chan->chan; in g2_enable_dma()
83 static int g2_disable_dma(struct dma_channel *chan) in g2_disable_dma() argument
85 unsigned int chan_nr = chan->chan; in g2_disable_dma()
93 static int g2_xfer_dma(struct dma_channel *chan) in g2_xfer_dma() argument
95 unsigned int chan_nr = chan->chan; in g2_xfer_dma()
97 if (chan->sar & 31) { in g2_xfer_dma()
98 printk("g2dma: unaligned source 0x%lx\n", chan->sar); in g2_xfer_dma()
102 if (chan->dar & 31) { in g2_xfer_dma()
103 printk("g2dma: unaligned dest 0x%lx\n", chan->dar); in g2_xfer_dma()
108 if (chan->count & 31) in g2_xfer_dma()
109 chan->count = (chan->count + (32 - 1)) & ~(32 - 1); in g2_xfer_dma()
112 chan->dar += 0xa0800000; in g2_xfer_dma()
115 chan->mode = !chan->mode; in g2_xfer_dma()
117 flush_icache_range((unsigned long)chan->sar, chan->count); in g2_xfer_dma()
119 g2_disable_dma(chan); in g2_xfer_dma()
121 g2_dma->channel[chan_nr].g2_addr = chan->dar & 0x1fffffe0; in g2_xfer_dma()
122 g2_dma->channel[chan_nr].root_addr = chan->sar & 0x1fffffe0; in g2_xfer_dma()
123 g2_dma->channel[chan_nr].size = (chan->count & ~31) | 0x80000000; in g2_xfer_dma()
124 g2_dma->channel[chan_nr].direction = chan->mode; in g2_xfer_dma()
133 g2_enable_dma(chan); in g2_xfer_dma()
149 static int g2_get_residue(struct dma_channel *chan) in g2_get_residue() argument
151 return g2_bytes_remaining(chan->chan); in g2_get_residue()