Lines Matching refs:DMA
1 Dynamic DMA mapping
9 addresses (DMA addresses) into physical addresses. This is similar to
12 access with a Single Address Cycle (32bit DMA address) any page in the
15 system, so that the virt_to_bus() static scheme works (the DMA address
19 So that Linux can use the dynamic DMA mapping, it needs some help from the
20 drivers, namely it has to take into account that DMA addresses should be
21 mapped only for the time they are actually used and unmapped after the DMA
33 dma_addr_t (which can hold any valid DMA address for the platform)
34 type which should be used everywhere you hold a DMA (bus) address
35 returned from the DMA mapping functions.
37 What memory is DMA'able?
40 be used with the DMA mapping facilities. There has been an unwritten
46 (i.e. kmalloc() or kmem_cache_alloc()) then you may DMA to/from
50 returned from vmalloc() for DMA. It is possible to DMA to the
59 nor may you use kernel stack addresses for DMA. Both of these items
64 call and DMA to/from that. This is similar to vmalloc().
68 for you to DMA from/to.
70 DMA addressing limitations
72 Does your device have any DMA addressing limitations? For example, is
74 on the PCI bus for SAC DMA transfers? If so, you need to inform the
84 properly support the DMA addressing limitation your device has. It is
95 device supports. It returns zero if your card can perform DMA
98 If it returns non-zero, your device can not perform DMA properly on
100 behavior. You must either use a different mask, or not use DMA.
104 1) Use another DMA mask, if possible (see below).
105 2) Use some non-DMA mode for data transfer, if possible.
119 "mydev: No suitable DMA available.\n");
142 "mydev: No suitable DMA available.\n");
146 If your 64-bit device is going to be an enormous consumer of DMA
147 mappings, this can be problematic since the DMA mappings are a
157 "mydev: 24-bit DMA addressing not available.\n");
163 information later when you make DMA mappings.
169 DMA addressing limitations, you may wish to probe each mask and
187 printk(KERN_WARN "%s: Playback disabled due to DMA limitations.\n",
194 printk(KERN_WARN "%s: Record disabled due to DMA limitations.\n",
200 and thus retaining the 16MB DMA addressing limitations of ISA.
202 Types of DMA mappings
204 There are two types of DMA mappings:
206 - Consistent DMA mappings which are usually mapped at driver
214 Consistent DMA mappings are always SAC addressable. That is
215 to say, consistent DMA addresses given to the driver will always
220 - Network card DMA ring descriptors.
229 IMPORTANT: Consistent DMA memory does not preclude the usage of
242 - Streaming DMA mappings which are usually mapped for one DMA transfer,
259 Neither type of DMA mapping has alignment restrictions that come
262 Using Consistent DMA mappings.
264 To allocate and map large (PAGE_SIZE or so) consistent DMA regions,
275 This argument is needed because the DMA translations may be bus
286 The consistent DMA mapping interfaces, for non-NULL dev, will always
287 return a DMA address which is SAC (Single Address Cycle) addressable.
290 will still only return 32-bit PCI addresses for DMA. This is true
294 kernel DMA APIs are always SAC addressable.
300 The cpu return address and the DMA bus master address are both
307 To unmap and free such a DMA region, you call:
364 DMA Direction
367 take a DMA direction argument, which is an integer and takes on
375 One should provide the exact DMA direction if you know it.
379 It is the direction in which the data moves during the DMA
385 If you absolutely cannot know the direction of the DMA transfer,
386 specify PCI_DMA_BIDIRECTIONAL. It means that the DMA can go in
398 Some platforms actually have a write permission boolean which DMA
416 into the streaming DMA mapping interfaces below.
423 Using Streaming DMA mappings
425 The streaming DMA mapping routines can be called from interrupt
443 You should call pci_unmap_single when the DMA activity is finished, e.g.
444 from the interrupt which told you that the DMA transfer is done.
479 into one (e.g. if DMA mapping is done with PAGE_SIZE granularity, any
494 Again, make sure DMA activity has already finished.
507 If you need to use the same streaming DMA region multiple times and touch
508 the data in between the DMA transfers, just map it with
509 pci_map_{single,sg}, and after each DMA transfer call either:
519 After the last DMA transfer call one of the DMA unmap routines
552 * the DMA transfer with the CPU first
575 dynamic DMA mapping scheme - you have to always store the DMA addresses
578 supports dynamic DMA mapping in hardware) in your driver structures and/or
586 64-bit DMA and DAC cycle support
589 know how to use 64-bit DMA addressing under Linux. Simply make
601 DMA mapping API. By definition these "mappings" are a finite
610 DMA. Dynamic mappings are unsuitable for this kind of access pattern.
639 Next, DMA addresses using this API are kept track of using the
646 translated, and this is the purpose of this dialect of the DMA API.
650 (which may be validly DMA'd too) you may easily obtain the page
672 When the DMA transfer is complete, invoke: