Lines Matching full:ch

58     BCM2835DMAChan *ch = &s->chan[c];  in bcm2835_dma_update()  local
66 while ((s->enable & (1 << c)) && (ch->conblk_ad != 0)) { in bcm2835_dma_update()
68 ch->ti = ldl_le_phys(&s->dma_as, ch->conblk_ad); in bcm2835_dma_update()
69 ch->source_ad = ldl_le_phys(&s->dma_as, ch->conblk_ad + 4); in bcm2835_dma_update()
70 ch->dest_ad = ldl_le_phys(&s->dma_as, ch->conblk_ad + 8); in bcm2835_dma_update()
71 ch->txfr_len = ldl_le_phys(&s->dma_as, ch->conblk_ad + 12); in bcm2835_dma_update()
72 ch->stride = ldl_le_phys(&s->dma_as, ch->conblk_ad + 16); in bcm2835_dma_update()
73 ch->nextconbk = ldl_le_phys(&s->dma_as, ch->conblk_ad + 20); in bcm2835_dma_update()
76 if (ch->ti & BCM2708_DMA_TDMODE) { in bcm2835_dma_update()
78 ylen += (ch->txfr_len >> 16) & 0x3fff; in bcm2835_dma_update()
79 xlen = ch->txfr_len & 0xffff; in bcm2835_dma_update()
80 dst_stride = ch->stride >> 16; in bcm2835_dma_update()
81 src_stride = ch->stride & 0xffff; in bcm2835_dma_update()
83 xlen = ch->txfr_len; in bcm2835_dma_update()
92 if (ch->ti & BCM2708_DMA_S_IGNORE) { in bcm2835_dma_update()
96 data = ldl_le_phys(&s->dma_as, ch->source_ad); in bcm2835_dma_update()
98 if (ch->ti & BCM2708_DMA_S_INC) { in bcm2835_dma_update()
99 ch->source_ad += 4; in bcm2835_dma_update()
102 if (ch->ti & BCM2708_DMA_D_IGNORE) { in bcm2835_dma_update()
105 stl_le_phys(&s->dma_as, ch->dest_ad, data); in bcm2835_dma_update()
107 if (ch->ti & BCM2708_DMA_D_INC) { in bcm2835_dma_update()
108 ch->dest_ad += 4; in bcm2835_dma_update()
113 if (ch->ti & BCM2708_DMA_TDMODE) { in bcm2835_dma_update()
114 ch->txfr_len = (ylen << 16) | xlen; in bcm2835_dma_update()
116 ch->txfr_len = xlen; in bcm2835_dma_update()
121 ch->source_ad += src_stride; in bcm2835_dma_update()
122 ch->dest_ad += dst_stride; in bcm2835_dma_update()
126 ch->cs |= BCM2708_DMA_END; in bcm2835_dma_update()
127 if (ch->ti & BCM2708_DMA_INT_EN) { in bcm2835_dma_update()
128 ch->cs |= BCM2708_DMA_INT; in bcm2835_dma_update()
130 qemu_set_irq(ch->irq, 1); in bcm2835_dma_update()
134 ch->conblk_ad = ch->nextconbk; in bcm2835_dma_update()
137 ch->cs &= ~BCM2708_DMA_ACTIVE; in bcm2835_dma_update()
138 ch->cs |= BCM2708_DMA_ISPAUSED; in bcm2835_dma_update()
141 static void bcm2835_dma_chan_reset(BCM2835DMAChan *ch) in bcm2835_dma_chan_reset() argument
143 ch->cs = 0; in bcm2835_dma_chan_reset()
144 ch->conblk_ad = 0; in bcm2835_dma_chan_reset()
150 BCM2835DMAChan *ch; in bcm2835_dma_read() local
156 ch = &s->chan[c]; in bcm2835_dma_read()
160 res = ch->cs; in bcm2835_dma_read()
163 res = ch->conblk_ad; in bcm2835_dma_read()
166 res = ch->ti; in bcm2835_dma_read()
169 res = ch->source_ad; in bcm2835_dma_read()
172 res = ch->dest_ad; in bcm2835_dma_read()
175 res = ch->txfr_len; in bcm2835_dma_read()
178 res = ch->stride; in bcm2835_dma_read()
181 res = ch->nextconbk; in bcm2835_dma_read()
184 res = ch->debug; in bcm2835_dma_read()
197 BCM2835DMAChan *ch; in bcm2835_dma_write() local
203 ch = &s->chan[c]; in bcm2835_dma_write()
207 oldcs = ch->cs; in bcm2835_dma_write()
209 bcm2835_dma_chan_reset(ch); in bcm2835_dma_write()
215 ch->cs &= ~BCM2708_DMA_END; in bcm2835_dma_write()
218 ch->cs &= ~BCM2708_DMA_INT; in bcm2835_dma_write()
220 qemu_set_irq(ch->irq, 0); in bcm2835_dma_write()
222 ch->cs &= ~BCM2708_DMA_CS_RW_MASK; in bcm2835_dma_write()
223 ch->cs |= (value & BCM2708_DMA_CS_RW_MASK); in bcm2835_dma_write()
224 if (!(oldcs & BCM2708_DMA_ACTIVE) && (ch->cs & BCM2708_DMA_ACTIVE)) { in bcm2835_dma_write()
229 ch->conblk_ad = value; in bcm2835_dma_write()
232 ch->debug = value; in bcm2835_dma_write()