Loading Documentation/DMA-mapping.txt +9 −9 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ exactly why. 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; Loading @@ -155,9 +155,9 @@ all 64-bits when accessing streaming DMA: 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; } 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 Loading @@ -170,14 +170,14 @@ the case would look like this: 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; 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; 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"); Loading @@ -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: 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; Loading @@ -213,7 +213,7 @@ most specific mask. 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; Loading Documentation/DocBook/writing-an-alsa-driver.tmpl +4 −4 Original line number Diff line number Diff line Loading @@ -1137,8 +1137,8 @@ if (err < 0) return err; /* check PCI availability (28bit DMA) */ if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 || pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) { if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { printk(KERN_ERR "error to set 28bit mask DMA\n"); pci_disable_device(pci); return -ENXIO; Loading Loading @@ -1252,8 +1252,8 @@ err = pci_enable_device(pci); if (err < 0) return err; if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 || pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) { if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { printk(KERN_ERR "error to set 28bit mask DMA\n"); pci_disable_device(pci); return -ENXIO; Loading Documentation/blockdev/00-INDEX +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ cpqarray.txt - info on using Compaq's SMART2 Intelligent Disk Array Controllers. floppy.txt - notes and driver options for the floppy disk driver. mflash.txt - info on mGine m(g)flash driver for linux. nbd.txt - info on a TCP implementation of a network block device. paride.txt Loading Documentation/blockdev/mflash.txt 0 → 100644 +84 −0 Original line number Diff line number Diff line This document describes m[g]flash support in linux. Contents 1. Overview 2. Reserved area configuration 3. Example of mflash platform driver registration 1. Overview Mflash and gflash are embedded flash drive. The only difference is mflash is MCP(Multi Chip Package) device. These two device operate exactly same way. So the rest mflash repersents mflash and gflash altogether. Internally, mflash has nand flash and other hardware logics and supports 2 different operation (ATA, IO) modes. ATA mode doesn't need any new driver and currently works well under standard IDE subsystem. Actually it's one chip SSD. IO mode is ATA-like custom mode for the host that doesn't have IDE interface. Followings are brief descriptions about IO mode. A. IO mode based on ATA protocol and uses some custom command. (read confirm, write confirm) B. IO mode uses SRAM bus interface. C. IO mode supports 4kB boot area, so host can boot from mflash. 2. Reserved area configuration If host boot from mflash, usually needs raw area for boot loader image. All of the mflash's block device operation will be taken this value as start offset. Note that boot loader's size of reserved area and kernel configuration value must be same. 3. Example of mflash platform driver registration Working mflash is very straight forward. Adding platform device stuff to board configuration file is all. Here is some pseudo example. static struct mg_drv_data mflash_drv_data = { /* If you want to polling driver set to 1 */ .use_polling = 0, /* device attribution */ .dev_attr = MG_BOOT_DEV }; static struct resource mg_mflash_rsc[] = { /* Base address of mflash */ [0] = { .start = 0x08000000, .end = 0x08000000 + SZ_64K - 1, .flags = IORESOURCE_MEM }, /* mflash interrupt pin */ [1] = { .start = IRQ_GPIO(84), .end = IRQ_GPIO(84), .flags = IORESOURCE_IRQ }, /* mflash reset pin */ [2] = { .start = 43, .end = 43, .name = MG_RST_PIN, .flags = IORESOURCE_IO }, /* mflash reset-out pin * If you use mflash as storage device (i.e. other than MG_BOOT_DEV), * should assign this */ [3] = { .start = 51, .end = 51, .name = MG_RSTOUT_PIN, .flags = IORESOURCE_IO } }; static struct platform_device mflash_dev = { .name = MG_DEV_NAME, .id = -1, .dev = { .platform_data = &mflash_drv_data, }, .num_resources = ARRAY_SIZE(mg_mflash_rsc), .resource = mg_mflash_rsc }; platform_device_register(&mflash_dev); Documentation/devices.txt +4 −0 Original line number Diff line number Diff line Loading @@ -2797,6 +2797,10 @@ Your cooperation is appreciated. 206 = /dev/ttySC1 SC26xx serial port 1 207 = /dev/ttySC2 SC26xx serial port 2 208 = /dev/ttySC3 SC26xx serial port 3 209 = /dev/ttyMAX0 MAX3100 serial port 0 210 = /dev/ttyMAX1 MAX3100 serial port 1 211 = /dev/ttyMAX2 MAX3100 serial port 2 212 = /dev/ttyMAX3 MAX3100 serial port 3 205 char Low-density serial ports (alternate device) 0 = /dev/culu0 Callout device for ttyLU0 Loading Loading
Documentation/DMA-mapping.txt +9 −9 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ exactly why. 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; Loading @@ -155,9 +155,9 @@ all 64-bits when accessing streaming DMA: 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; } 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 Loading @@ -170,14 +170,14 @@ the case would look like this: 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; 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; 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"); Loading @@ -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: 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; Loading @@ -213,7 +213,7 @@ most specific mask. 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; Loading
Documentation/DocBook/writing-an-alsa-driver.tmpl +4 −4 Original line number Diff line number Diff line Loading @@ -1137,8 +1137,8 @@ if (err < 0) return err; /* check PCI availability (28bit DMA) */ if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 || pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) { if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { printk(KERN_ERR "error to set 28bit mask DMA\n"); pci_disable_device(pci); return -ENXIO; Loading Loading @@ -1252,8 +1252,8 @@ err = pci_enable_device(pci); if (err < 0) return err; if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 || pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) { if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { printk(KERN_ERR "error to set 28bit mask DMA\n"); pci_disable_device(pci); return -ENXIO; Loading
Documentation/blockdev/00-INDEX +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ cpqarray.txt - info on using Compaq's SMART2 Intelligent Disk Array Controllers. floppy.txt - notes and driver options for the floppy disk driver. mflash.txt - info on mGine m(g)flash driver for linux. nbd.txt - info on a TCP implementation of a network block device. paride.txt Loading
Documentation/blockdev/mflash.txt 0 → 100644 +84 −0 Original line number Diff line number Diff line This document describes m[g]flash support in linux. Contents 1. Overview 2. Reserved area configuration 3. Example of mflash platform driver registration 1. Overview Mflash and gflash are embedded flash drive. The only difference is mflash is MCP(Multi Chip Package) device. These two device operate exactly same way. So the rest mflash repersents mflash and gflash altogether. Internally, mflash has nand flash and other hardware logics and supports 2 different operation (ATA, IO) modes. ATA mode doesn't need any new driver and currently works well under standard IDE subsystem. Actually it's one chip SSD. IO mode is ATA-like custom mode for the host that doesn't have IDE interface. Followings are brief descriptions about IO mode. A. IO mode based on ATA protocol and uses some custom command. (read confirm, write confirm) B. IO mode uses SRAM bus interface. C. IO mode supports 4kB boot area, so host can boot from mflash. 2. Reserved area configuration If host boot from mflash, usually needs raw area for boot loader image. All of the mflash's block device operation will be taken this value as start offset. Note that boot loader's size of reserved area and kernel configuration value must be same. 3. Example of mflash platform driver registration Working mflash is very straight forward. Adding platform device stuff to board configuration file is all. Here is some pseudo example. static struct mg_drv_data mflash_drv_data = { /* If you want to polling driver set to 1 */ .use_polling = 0, /* device attribution */ .dev_attr = MG_BOOT_DEV }; static struct resource mg_mflash_rsc[] = { /* Base address of mflash */ [0] = { .start = 0x08000000, .end = 0x08000000 + SZ_64K - 1, .flags = IORESOURCE_MEM }, /* mflash interrupt pin */ [1] = { .start = IRQ_GPIO(84), .end = IRQ_GPIO(84), .flags = IORESOURCE_IRQ }, /* mflash reset pin */ [2] = { .start = 43, .end = 43, .name = MG_RST_PIN, .flags = IORESOURCE_IO }, /* mflash reset-out pin * If you use mflash as storage device (i.e. other than MG_BOOT_DEV), * should assign this */ [3] = { .start = 51, .end = 51, .name = MG_RSTOUT_PIN, .flags = IORESOURCE_IO } }; static struct platform_device mflash_dev = { .name = MG_DEV_NAME, .id = -1, .dev = { .platform_data = &mflash_drv_data, }, .num_resources = ARRAY_SIZE(mg_mflash_rsc), .resource = mg_mflash_rsc }; platform_device_register(&mflash_dev);
Documentation/devices.txt +4 −0 Original line number Diff line number Diff line Loading @@ -2797,6 +2797,10 @@ Your cooperation is appreciated. 206 = /dev/ttySC1 SC26xx serial port 1 207 = /dev/ttySC2 SC26xx serial port 2 208 = /dev/ttySC3 SC26xx serial port 3 209 = /dev/ttyMAX0 MAX3100 serial port 0 210 = /dev/ttyMAX1 MAX3100 serial port 1 211 = /dev/ttyMAX2 MAX3100 serial port 2 212 = /dev/ttyMAX3 MAX3100 serial port 3 205 char Low-density serial ports (alternate device) 0 = /dev/culu0 Callout device for ttyLU0 Loading