aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DMA-mapping.txt
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-04-08 11:25:42 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-08 11:26:00 -0400
commit5af8c4e0fac9838428bd718040b664043a05f37c (patch)
tree75a01d98ed244db45fe3c734c4a81c1a3d92ac37 /Documentation/DMA-mapping.txt
parent46e0bb9c12f4bab539736f1714cbf16600f681ec (diff)
parent577c9c456f0e1371cbade38eaf91ae8e8a308555 (diff)
Merge commit 'v2.6.30-rc1' into sched/urgent
Merge reason: update to latest upstream to queue up fix Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/DMA-mapping.txt')
-rw-r--r--Documentation/DMA-mapping.txt18
1 files changed, 9 insertions, 9 deletions
diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt
index b2a4d6d244d9..01f24e94bdb6 100644
--- a/Documentation/DMA-mapping.txt
+++ b/Documentation/DMA-mapping.txt
@@ -136,7 +136,7 @@ exactly why.
136The standard 32-bit addressing PCI device would do something like 136The standard 32-bit addressing PCI device would do something like
137this: 137this:
138 138
139 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 139 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
140 printk(KERN_WARNING 140 printk(KERN_WARNING
141 "mydev: No suitable DMA available.\n"); 141 "mydev: No suitable DMA available.\n");
142 goto ignore_this_device; 142 goto ignore_this_device;
@@ -155,9 +155,9 @@ all 64-bits when accessing streaming DMA:
155 155
156 int using_dac; 156 int using_dac;
157 157
158 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 158 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
159 using_dac = 1; 159 using_dac = 1;
160 } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 160 } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
161 using_dac = 0; 161 using_dac = 0;
162 } else { 162 } else {
163 printk(KERN_WARNING 163 printk(KERN_WARNING
@@ -170,14 +170,14 @@ the case would look like this:
170 170
171 int using_dac, consistent_using_dac; 171 int using_dac, consistent_using_dac;
172 172
173 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 173 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
174 using_dac = 1; 174 using_dac = 1;
175 consistent_using_dac = 1; 175 consistent_using_dac = 1;
176 pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 176 pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
177 } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 177 } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
178 using_dac = 0; 178 using_dac = 0;
179 consistent_using_dac = 0; 179 consistent_using_dac = 0;
180 pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 180 pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
181 } else { 181 } else {
182 printk(KERN_WARNING 182 printk(KERN_WARNING
183 "mydev: No suitable DMA available.\n"); 183 "mydev: No suitable DMA available.\n");
@@ -192,7 +192,7 @@ check the return value from pci_set_consistent_dma_mask().
192Finally, if your device can only drive the low 24-bits of 192Finally, if your device can only drive the low 24-bits of
193address during PCI bus mastering you might do something like: 193address during PCI bus mastering you might do something like:
194 194
195 if (pci_set_dma_mask(pdev, DMA_24BIT_MASK)) { 195 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(24))) {
196 printk(KERN_WARNING 196 printk(KERN_WARNING
197 "mydev: 24-bit DMA addressing not available.\n"); 197 "mydev: 24-bit DMA addressing not available.\n");
198 goto ignore_this_device; 198 goto ignore_this_device;
@@ -213,7 +213,7 @@ most specific mask.
213 213
214Here is pseudo-code showing how this might be done: 214Here is pseudo-code showing how this might be done:
215 215
216 #define PLAYBACK_ADDRESS_BITS DMA_32BIT_MASK 216 #define PLAYBACK_ADDRESS_BITS DMA_BIT_MASK(32)
217 #define RECORD_ADDRESS_BITS 0x00ffffff 217 #define RECORD_ADDRESS_BITS 0x00ffffff
218 218
219 struct my_sound_card *card; 219 struct my_sound_card *card;