projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.infradead.org/mtd-2.6
[linux-2.6-microblaze.git]
/
Documentation
/
DMA-mapping.txt
diff --git
a/Documentation/DMA-mapping.txt
b/Documentation/DMA-mapping.txt
index
b2a4d6d
..
01f24e9
100644
(file)
--- a/
Documentation/DMA-mapping.txt
+++ b/
Documentation/DMA-mapping.txt
@@
-136,7
+136,7
@@
exactly why.
The standard 32-bit addressing PCI device would do something like
this:
The standard 32-bit addressing PCI device would do something like
this:
- if (pci_set_dma_mask(pdev, DMA_
32BIT_MASK
)) {
+ if (pci_set_dma_mask(pdev, DMA_
BIT_MASK(32)
)) {
printk(KERN_WARNING
"mydev: No suitable DMA available.\n");
goto ignore_this_device;
printk(KERN_WARNING
"mydev: No suitable DMA available.\n");
goto ignore_this_device;
@@
-155,9
+155,9
@@
all 64-bits when accessing streaming DMA:
int using_dac;
int using_dac;
- if (!pci_set_dma_mask(pdev, DMA_
64BIT_MASK
)) {
+ if (!pci_set_dma_mask(pdev, DMA_
BIT_MASK(64)
)) {
using_dac = 1;
using_dac = 1;
- } else if (!pci_set_dma_mask(pdev, DMA_
32BIT_MASK
)) {
+ } else if (!pci_set_dma_mask(pdev, DMA_
BIT_MASK(32)
)) {
using_dac = 0;
} else {
printk(KERN_WARNING
using_dac = 0;
} else {
printk(KERN_WARNING
@@
-170,14
+170,14
@@
the case would look like this:
int using_dac, consistent_using_dac;
int using_dac, consistent_using_dac;
- if (!pci_set_dma_mask(pdev, DMA_
64BIT_MASK
)) {
+ if (!pci_set_dma_mask(pdev, DMA_
BIT_MASK(64)
)) {
using_dac = 1;
consistent_using_dac = 1;
using_dac = 1;
consistent_using_dac = 1;
- pci_set_consistent_dma_mask(pdev, DMA_
64BIT_MASK
);
- } else if (!pci_set_dma_mask(pdev, DMA_
32BIT_MASK
)) {
+ pci_set_consistent_dma_mask(pdev, DMA_
BIT_MASK(64)
);
+ } else if (!pci_set_dma_mask(pdev, DMA_
BIT_MASK(32)
)) {
using_dac = 0;
consistent_using_dac = 0;
using_dac = 0;
consistent_using_dac = 0;
- pci_set_consistent_dma_mask(pdev, DMA_
32BIT_MASK
);
+ pci_set_consistent_dma_mask(pdev, DMA_
BIT_MASK(32)
);
} else {
printk(KERN_WARNING
"mydev: No suitable DMA available.\n");
} else {
printk(KERN_WARNING
"mydev: No suitable DMA available.\n");
@@
-192,7
+192,7
@@
check the return value from pci_set_consistent_dma_mask().
Finally, if your device can only drive the low 24-bits of
address during PCI bus mastering you might do something like:
Finally, if your device can only drive the low 24-bits of
address during PCI bus mastering you might do something like:
- if (pci_set_dma_mask(pdev, DMA_
24BIT_MASK
)) {
+ if (pci_set_dma_mask(pdev, DMA_
BIT_MASK(24)
)) {
printk(KERN_WARNING
"mydev: 24-bit DMA addressing not available.\n");
goto ignore_this_device;
printk(KERN_WARNING
"mydev: 24-bit DMA addressing not available.\n");
goto ignore_this_device;
@@
-213,7
+213,7
@@
most specific mask.
Here is pseudo-code showing how this might be done:
Here is pseudo-code showing how this might be done:
- #define PLAYBACK_ADDRESS_BITS DMA_
32BIT_MASK
+ #define PLAYBACK_ADDRESS_BITS DMA_
BIT_MASK(32)
#define RECORD_ADDRESS_BITS 0x00ffffff
struct my_sound_card *card;
#define RECORD_ADDRESS_BITS 0x00ffffff
struct my_sound_card *card;