Lines Matching full:dma

3  *  linux/arch/arm/mach-rpc/dma.c
7 * DMA functions specific to RiscPC architecture
12 #include <linux/dma-mapping.h>
16 #include <asm/dma.h>
22 #include <asm/mach/dma.h>
26 struct dma_struct dma; member
58 if (idma->dma.sg) { in iomd_get_next_sg()
76 if (idma->dma.sgcount > 1) { in iomd_get_next_sg()
77 idma->dma.sg = sg_next(idma->dma.sg); in iomd_get_next_sg()
78 idma->dma_addr = idma->dma.sg->dma_address; in iomd_get_next_sg()
79 idma->dma_len = idma->dma.sg->length; in iomd_get_next_sg()
80 idma->dma.sgcount--; in iomd_get_next_sg()
82 idma->dma.sg = NULL; in iomd_get_next_sg()
134 static int iomd_request_dma(unsigned int chan, dma_t *dma) in iomd_request_dma() argument
136 struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma); in iomd_request_dma()
139 0, idma->dma.device_id, idma); in iomd_request_dma()
142 static void iomd_free_dma(unsigned int chan, dma_t *dma) in iomd_free_dma() argument
144 struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma); in iomd_free_dma()
155 static void iomd_enable_dma(unsigned int chan, dma_t *dma) in iomd_enable_dma() argument
157 struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma); in iomd_enable_dma()
161 if (idma->dma.invalid) { in iomd_enable_dma()
162 idma->dma.invalid = 0; in iomd_enable_dma()
168 if (!idma->dma.sg) { in iomd_enable_dma()
169 idma->dma.sg = &idma->dma.buf; in iomd_enable_dma()
170 idma->dma.sgcount = 1; in iomd_enable_dma()
171 idma->dma.buf.length = idma->dma.count; in iomd_enable_dma()
172 idma->dma.buf.dma_address = dma_map_single(&isa_dma_dev, in iomd_enable_dma()
173 idma->dma.addr, idma->dma.count, in iomd_enable_dma()
174 idma->dma.dma_mode == DMA_MODE_READ ? in iomd_enable_dma()
178 idma->dma_addr = idma->dma.sg->dma_address; in iomd_enable_dma()
179 idma->dma_len = idma->dma.sg->length; in iomd_enable_dma()
185 if (idma->dma.dma_mode == DMA_MODE_READ) in iomd_enable_dma()
192 static void iomd_disable_dma(unsigned int chan, dma_t *dma) in iomd_disable_dma() argument
194 struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma); in iomd_disable_dma()
205 static int iomd_set_dma_speed(unsigned int chan, dma_t *dma, int cycle) in iomd_set_dma_speed() argument
261 struct dma_struct dma; member
265 static void floppy_enable_dma(unsigned int chan, dma_t *dma) in floppy_enable_dma() argument
267 struct floppy_dma *fdma = container_of(dma, struct floppy_dma, dma); in floppy_enable_dma()
272 if (fdma->dma.sg) in floppy_enable_dma()
275 if (fdma->dma.dma_mode == DMA_MODE_READ) { in floppy_enable_dma()
285 regs.ARM_r9 = fdma->dma.count; in floppy_enable_dma()
286 regs.ARM_r10 = (unsigned long)fdma->dma.addr; in floppy_enable_dma()
299 static void floppy_disable_dma(unsigned int chan, dma_t *dma) in floppy_disable_dma() argument
301 struct floppy_dma *fdma = container_of(dma, struct floppy_dma, dma); in floppy_disable_dma()
306 static int floppy_get_residue(unsigned int chan, dma_t *dma) in floppy_get_residue() argument
321 * This is virtual DMA - we don't need anything here.
323 static void sound_enable_disable_dma(unsigned int chan, dma_t *dma) in sound_enable_disable_dma() argument
336 .dma = {
359 * Setup DMA channels 2,3 to be for podules in rpc_dma_init()
378 iomd_dma[i].dma.d_ops = &iomd_dma_ops; in rpc_dma_init()
380 ret = isa_dma_add(i, &iomd_dma[i].dma); in rpc_dma_init()
385 ret = isa_dma_add(DMA_VIRTUAL_FLOPPY, &floppy_dma.dma); in rpc_dma_init()