Lines Matching full:dma
2 DMA with ISA and LPC devices
7 This document describes how to do DMA transfers using the old ISA DMA
9 uses the same DMA system so it will be around for quite some time.
14 To do ISA style DMA you need to include two headers::
16 #include <linux/dma-mapping.h>
17 #include <asm/dma.h>
19 The first is the generic DMA API used to convert virtual addresses to
20 bus addresses (see Documentation/core-api/dma-api.rst for details).
22 The second contains the routines specific to ISA DMA transfers. Since
30 The ISA DMA controller has some very strict requirements on which
34 (You usually need a special buffer for DMA transfers instead of
37 The DMA-able address space is the lowest 16 MB of _physical_ memory.
44 Unfortunately the memory available for ISA DMA is scarce so unless you
54 To translate the virtual address to a bus address, use the normal DMA
58 is really all you need. Remember that even though the DMA controller
61 Note: x86_64 had a broken DMA API when it came to ISA but has since
62 been fixed. If your arch has problems then fix the DMA API instead of
68 A normal ISA DMA controller has 8 channels. The lower four are for
71 (Actually the DMA controller is really two separate controllers where
72 channel 4 is used to give DMA access for the second controller (0-3).
87 Now for the good stuff, the actual DMA transfer. :)
89 Before you use any ISA DMA routines you need to claim the DMA lock
90 using claim_dma_lock(). The reason is that some DMA operations are
94 The first time you use the DMA controller you should call
95 clear_dma_ff(). This clears an internal register in the DMA
106 transfer. Note that it's _bytes_. The DMA routines will do all the
107 required translation to values that the DMA controller understands.
109 The final step is enabling the DMA channel and releasing the DMA
112 Once the DMA transfer is finished (or timed out) you should disable
140 printk(KERN_ERR "driver: Incomplete DMA transfer!"
149 suspended while a DMA transfer is in progress. Also, all DMA settings
150 are lost when the system suspends so if your driver relies on the DMA