aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DMA-mapping.txt4
-rw-r--r--Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl16
2 files changed, 10 insertions, 10 deletions
diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt
index ee4bb73683cd..10bf4deb96aa 100644
--- a/Documentation/DMA-mapping.txt
+++ b/Documentation/DMA-mapping.txt
@@ -194,7 +194,7 @@ document for how to handle this case.
194Finally, if your device can only drive the low 24-bits of 194Finally, if your device can only drive the low 24-bits of
195address during PCI bus mastering you might do something like: 195address during PCI bus mastering you might do something like:
196 196
197 if (pci_set_dma_mask(pdev, 0x00ffffff)) { 197 if (pci_set_dma_mask(pdev, DMA_24BIT_MASK)) {
198 printk(KERN_WARNING 198 printk(KERN_WARNING
199 "mydev: 24-bit DMA addressing not available.\n"); 199 "mydev: 24-bit DMA addressing not available.\n");
200 goto ignore_this_device; 200 goto ignore_this_device;
@@ -212,7 +212,7 @@ functions (for example a sound card provides playback and record
212functions) and the various different functions have _different_ 212functions) and the various different functions have _different_
213DMA addressing limitations, you may wish to probe each mask and 213DMA addressing limitations, you may wish to probe each mask and
214only provide the functionality which the machine can handle. It 214only provide the functionality which the machine can handle. It
215is important that the last call to pci_set_dma_mask() be for the 215is important that the last call to pci_set_dma_mask() be for the
216most specific mask. 216most specific mask.
217 217
218Here is pseudo-code showing how this might be done: 218Here is pseudo-code showing how this might be done:
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index 6feef9e82b63..68eeebc17ff4 100644
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -1123,8 +1123,8 @@
1123 if ((err = pci_enable_device(pci)) < 0) 1123 if ((err = pci_enable_device(pci)) < 0)
1124 return err; 1124 return err;
1125 /* check PCI availability (28bit DMA) */ 1125 /* check PCI availability (28bit DMA) */
1126 if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || 1126 if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
1127 pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { 1127 pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
1128 printk(KERN_ERR "error to set 28bit mask DMA\n"); 1128 printk(KERN_ERR "error to set 28bit mask DMA\n");
1129 pci_disable_device(pci); 1129 pci_disable_device(pci);
1130 return -ENXIO; 1130 return -ENXIO;
@@ -1216,7 +1216,7 @@
1216 The allocation of PCI resources is done in the 1216 The allocation of PCI resources is done in the
1217 <function>probe()</function> function, and usually an extra 1217 <function>probe()</function> function, and usually an extra
1218 <function>xxx_create()</function> function is written for this 1218 <function>xxx_create()</function> function is written for this
1219 purpose. 1219 purpose.
1220 </para> 1220 </para>
1221 1221
1222 <para> 1222 <para>
@@ -1225,7 +1225,7 @@
1225 allocating resources. Also, you need to set the proper PCI DMA 1225 allocating resources. Also, you need to set the proper PCI DMA
1226 mask to limit the accessed i/o range. In some cases, you might 1226 mask to limit the accessed i/o range. In some cases, you might
1227 need to call <function>pci_set_master()</function> function, 1227 need to call <function>pci_set_master()</function> function,
1228 too. 1228 too.
1229 </para> 1229 </para>
1230 1230
1231 <para> 1231 <para>
@@ -1236,8 +1236,8 @@
1236<![CDATA[ 1236<![CDATA[
1237 if ((err = pci_enable_device(pci)) < 0) 1237 if ((err = pci_enable_device(pci)) < 0)
1238 return err; 1238 return err;
1239 if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || 1239 if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
1240 pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { 1240 pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
1241 printk(KERN_ERR "error to set 28bit mask DMA\n"); 1241 printk(KERN_ERR "error to set 28bit mask DMA\n");
1242 pci_disable_device(pci); 1242 pci_disable_device(pci);
1243 return -ENXIO; 1243 return -ENXIO;
@@ -1256,13 +1256,13 @@
1256 functions. Unlike ALSA ver.0.5.x., there are no helpers for 1256 functions. Unlike ALSA ver.0.5.x., there are no helpers for
1257 that. And these resources must be released in the destructor 1257 that. And these resources must be released in the destructor
1258 function (see below). Also, on ALSA 0.9.x, you don't need to 1258 function (see below). Also, on ALSA 0.9.x, you don't need to
1259 allocate (pseudo-)DMA for PCI like ALSA 0.5.x. 1259 allocate (pseudo-)DMA for PCI like ALSA 0.5.x.
1260 </para> 1260 </para>
1261 1261
1262 <para> 1262 <para>
1263 Now assume that this PCI device has an I/O port with 8 bytes 1263 Now assume that this PCI device has an I/O port with 8 bytes
1264 and an interrupt. Then struct <structname>mychip</structname> will have the 1264 and an interrupt. Then struct <structname>mychip</structname> will have the
1265 following fields: 1265 following fields:
1266 1266
1267 <informalexample> 1267 <informalexample>
1268 <programlisting> 1268 <programlisting>