diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2005-11-07 06:15:40 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-07 09:01:58 -0500 |
commit | 69f34c98c1416eb74c55e38a21dbf3e294966514 (patch) | |
tree | 956f39f06463b026f293347b47de812fc3b6545f /drivers/mtd/maps | |
parent | 1f948b43f7b5cf721cf0d03f507843efc1a9bfad (diff) |
[MTD] maps: Clean up trailing white spaces
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/maps')
61 files changed, 470 insertions, 470 deletions
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index e12e36a003dc..48638c8097a5 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig | |||
@@ -1,5 +1,5 @@ | |||
1 | # drivers/mtd/maps/Kconfig | 1 | # drivers/mtd/maps/Kconfig |
2 | # $Id: Kconfig,v 1.60 2005/11/07 08:33:35 gleixner Exp $ | 2 | # $Id: Kconfig,v 1.61 2005/11/07 11:14:26 gleixner Exp $ |
3 | 3 | ||
4 | menu "Mapping drivers for chip access" | 4 | menu "Mapping drivers for chip access" |
5 | depends on MTD!=n | 5 | depends on MTD!=n |
@@ -64,9 +64,9 @@ config MTD_SUN_UFLASH | |||
64 | tristate "Sun Microsystems userflash support" | 64 | tristate "Sun Microsystems userflash support" |
65 | depends on (SPARC32 || SPARC64) && MTD_CFI | 65 | depends on (SPARC32 || SPARC64) && MTD_CFI |
66 | help | 66 | help |
67 | This provides a 'mapping' driver which supports the way in | 67 | This provides a 'mapping' driver which supports the way in |
68 | which user-programmable flash chips are connected on various | 68 | which user-programmable flash chips are connected on various |
69 | Sun Microsystems boardsets. This driver will require CFI support | 69 | Sun Microsystems boardsets. This driver will require CFI support |
70 | in the kernel, so if you did not enable CFI previously, do that now. | 70 | in the kernel, so if you did not enable CFI previously, do that now. |
71 | 71 | ||
72 | config MTD_PNC2000 | 72 | config MTD_PNC2000 |
@@ -89,7 +89,7 @@ config MTD_NETSC520 | |||
89 | depends on X86 && MTD_CFI && MTD_PARTITIONS | 89 | depends on X86 && MTD_CFI && MTD_PARTITIONS |
90 | help | 90 | help |
91 | This enables access routines for the flash chips on the AMD NetSc520 | 91 | This enables access routines for the flash chips on the AMD NetSc520 |
92 | demonstration board. If you have one of these boards and would like | 92 | demonstration board. If you have one of these boards and would like |
93 | to use the flash chips on it, say 'Y'. | 93 | to use the flash chips on it, say 'Y'. |
94 | 94 | ||
95 | config MTD_TS5500 | 95 | config MTD_TS5500 |
@@ -212,7 +212,7 @@ config MTD_NETtel | |||
212 | Support for flash chips on NETtel/SecureEdge/SnapGear boards. | 212 | Support for flash chips on NETtel/SecureEdge/SnapGear boards. |
213 | 213 | ||
214 | config MTD_ALCHEMY | 214 | config MTD_ALCHEMY |
215 | tristate ' AMD Alchemy Pb1xxx/Db1xxx/RDK MTD support' | 215 | tristate ' AMD Alchemy Pb1xxx/Db1xxx/RDK MTD support' |
216 | depends on SOC_AU1X00 | 216 | depends on SOC_AU1X00 |
217 | help | 217 | help |
218 | Flash memory access on AMD Alchemy Pb/Db/RDK Reference Boards | 218 | Flash memory access on AMD Alchemy Pb/Db/RDK Reference Boards |
@@ -377,8 +377,8 @@ config MTD_CSTM_MIPS_IXX_START | |||
377 | default "0x8000000" | 377 | default "0x8000000" |
378 | help | 378 | help |
379 | This is the physical memory location that the MTD driver will | 379 | This is the physical memory location that the MTD driver will |
380 | use for the flash chips on your particular target board. | 380 | use for the flash chips on your particular target board. |
381 | Refer to the memory map which should hopefully be in the | 381 | Refer to the memory map which should hopefully be in the |
382 | documentation for your board. | 382 | documentation for your board. |
383 | 383 | ||
384 | config MTD_CSTM_MIPS_IXX_LEN | 384 | config MTD_CSTM_MIPS_IXX_LEN |
@@ -386,7 +386,7 @@ config MTD_CSTM_MIPS_IXX_LEN | |||
386 | depends on MTD_CSTM_MIPS_IXX | 386 | depends on MTD_CSTM_MIPS_IXX |
387 | default "0x4000000" | 387 | default "0x4000000" |
388 | help | 388 | help |
389 | This is the total length that the MTD driver will use for the | 389 | This is the total length that the MTD driver will use for the |
390 | flash chips on your particular board. Refer to the memory | 390 | flash chips on your particular board. Refer to the memory |
391 | map which should hopefully be in the documentation for your | 391 | map which should hopefully be in the documentation for your |
392 | board. | 392 | board. |
@@ -452,14 +452,14 @@ config MTD_IQ80310 | |||
452 | depends on MTD_CFI && ARCH_IQ80310 | 452 | depends on MTD_CFI && ARCH_IQ80310 |
453 | help | 453 | help |
454 | This enables access routines for the flash chips on the Intel XScale | 454 | This enables access routines for the flash chips on the Intel XScale |
455 | IQ80310 evaluation board. If you have one of these boards and would | 455 | IQ80310 evaluation board. If you have one of these boards and would |
456 | like to use the flash chips on it, say 'Y'. | 456 | like to use the flash chips on it, say 'Y'. |
457 | 457 | ||
458 | config MTD_IXP4XX | 458 | config MTD_IXP4XX |
459 | tristate "CFI Flash device mapped on Intel IXP4xx based systems" | 459 | tristate "CFI Flash device mapped on Intel IXP4xx based systems" |
460 | depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX | 460 | depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX |
461 | help | 461 | help |
462 | This enables MTD access to flash devices on platforms based | 462 | This enables MTD access to flash devices on platforms based |
463 | on Intel's IXP4xx family of network processors such as the | 463 | on Intel's IXP4xx family of network processors such as the |
464 | IXDP425 and Coyote. If you have an IXP4xx based board and | 464 | IXDP425 and Coyote. If you have an IXP4xx based board and |
465 | would like to use the flash chips on it, say 'Y'. | 465 | would like to use the flash chips on it, say 'Y'. |
@@ -468,7 +468,7 @@ config MTD_IXP2000 | |||
468 | tristate "CFI Flash device mapped on Intel IXP2000 based systems" | 468 | tristate "CFI Flash device mapped on Intel IXP2000 based systems" |
469 | depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP2000 | 469 | depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP2000 |
470 | help | 470 | help |
471 | This enables MTD access to flash devices on platforms based | 471 | This enables MTD access to flash devices on platforms based |
472 | on Intel's IXP2000 family of network processors such as the | 472 | on Intel's IXP2000 family of network processors such as the |
473 | IXDP425 and Coyote. If you have an IXP2000 based board and | 473 | IXDP425 and Coyote. If you have an IXP2000 based board and |
474 | would like to use the flash chips on it, say 'Y'. | 474 | would like to use the flash chips on it, say 'Y'. |
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile index 81f97c60e0c8..7d9e940a1dcd 100644 --- a/drivers/mtd/maps/Makefile +++ b/drivers/mtd/maps/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # linux/drivers/maps/Makefile | 2 | # linux/drivers/maps/Makefile |
3 | # | 3 | # |
4 | # $Id: Makefile.common,v 1.33 2005/11/07 08:33:35 gleixner Exp $ | 4 | # $Id: Makefile.common,v 1.34 2005/11/07 11:14:26 gleixner Exp $ |
5 | 5 | ||
6 | ifeq ($(CONFIG_MTD_COMPLEX_MAPPINGS),y) | 6 | ifeq ($(CONFIG_MTD_COMPLEX_MAPPINGS),y) |
7 | obj-$(CONFIG_MTD) += map_funcs.o | 7 | obj-$(CONFIG_MTD) += map_funcs.o |
@@ -26,7 +26,7 @@ obj-$(CONFIG_MTD_MAINSTONE) += mainstone-flash.o | |||
26 | obj-$(CONFIG_MTD_MBX860) += mbx860.o | 26 | obj-$(CONFIG_MTD_MBX860) += mbx860.o |
27 | obj-$(CONFIG_MTD_CEIVA) += ceiva.o | 27 | obj-$(CONFIG_MTD_CEIVA) += ceiva.o |
28 | obj-$(CONFIG_MTD_OCTAGON) += octagon-5066.o | 28 | obj-$(CONFIG_MTD_OCTAGON) += octagon-5066.o |
29 | obj-$(CONFIG_MTD_PHYSMAP) += physmap.o | 29 | obj-$(CONFIG_MTD_PHYSMAP) += physmap.o |
30 | obj-$(CONFIG_MTD_PNC2000) += pnc2000.o | 30 | obj-$(CONFIG_MTD_PNC2000) += pnc2000.o |
31 | obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o | 31 | obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o |
32 | obj-$(CONFIG_MTD_RPXLITE) += rpxlite.o | 32 | obj-$(CONFIG_MTD_RPXLITE) += rpxlite.o |
diff --git a/drivers/mtd/maps/alchemy-flash.c b/drivers/mtd/maps/alchemy-flash.c index 27fd2a3c3b60..a57791a6ce40 100644 --- a/drivers/mtd/maps/alchemy-flash.c +++ b/drivers/mtd/maps/alchemy-flash.c | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * Flash memory access on AMD Alchemy evaluation boards | 2 | * Flash memory access on AMD Alchemy evaluation boards |
3 | * | 3 | * |
4 | * $Id: alchemy-flash.c,v 1.1 2005/02/27 21:50:21 ppopov Exp $ | 4 | * $Id: alchemy-flash.c,v 1.2 2005/11/07 11:14:26 gleixner Exp $ |
5 | * | 5 | * |
6 | * (C) 2003, 2004 Pete Popov <ppopov@embeddedalley.com> | 6 | * (C) 2003, 2004 Pete Popov <ppopov@embeddedalley.com> |
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
@@ -22,7 +22,7 @@ | |||
22 | #ifdef DEBUG_RW | 22 | #ifdef DEBUG_RW |
23 | #define DBG(x...) printk(x) | 23 | #define DBG(x...) printk(x) |
24 | #else | 24 | #else |
25 | #define DBG(x...) | 25 | #define DBG(x...) |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #ifdef CONFIG_MIPS_PB1000 | 28 | #ifdef CONFIG_MIPS_PB1000 |
@@ -136,7 +136,7 @@ int __init alchemy_mtd_init(void) | |||
136 | int nb_parts = 0; | 136 | int nb_parts = 0; |
137 | unsigned long window_addr; | 137 | unsigned long window_addr; |
138 | unsigned long window_size; | 138 | unsigned long window_size; |
139 | 139 | ||
140 | /* Default flash buswidth */ | 140 | /* Default flash buswidth */ |
141 | alchemy_map.bankwidth = BOARD_FLASH_WIDTH; | 141 | alchemy_map.bankwidth = BOARD_FLASH_WIDTH; |
142 | 142 | ||
@@ -161,7 +161,7 @@ int __init alchemy_mtd_init(void) | |||
161 | * Now let's probe for the actual flash. Do it here since | 161 | * Now let's probe for the actual flash. Do it here since |
162 | * specific machine settings might have been set above. | 162 | * specific machine settings might have been set above. |
163 | */ | 163 | */ |
164 | printk(KERN_NOTICE BOARD_MAP_NAME ": probing %d-bit flash bus\n", | 164 | printk(KERN_NOTICE BOARD_MAP_NAME ": probing %d-bit flash bus\n", |
165 | alchemy_map.bankwidth*8); | 165 | alchemy_map.bankwidth*8); |
166 | alchemy_map.virt = ioremap(window_addr, window_size); | 166 | alchemy_map.virt = ioremap(window_addr, window_size); |
167 | mymtd = do_map_probe("cfi_probe", &alchemy_map); | 167 | mymtd = do_map_probe("cfi_probe", &alchemy_map); |
diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c index e8a900a77685..60ca3be5406d 100644 --- a/drivers/mtd/maps/amd76xrom.c +++ b/drivers/mtd/maps/amd76xrom.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * amd76xrom.c | 2 | * amd76xrom.c |
3 | * | 3 | * |
4 | * Normal mappings of chips in physical memory | 4 | * Normal mappings of chips in physical memory |
5 | * $Id: amd76xrom.c,v 1.20 2005/03/18 14:04:35 gleixner Exp $ | 5 | * $Id: amd76xrom.c,v 1.21 2005/11/07 11:14:26 gleixner Exp $ |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
@@ -70,7 +70,7 @@ static void amd76xrom_cleanup(struct amd76xrom_window *window) | |||
70 | list_del(&map->list); | 70 | list_del(&map->list); |
71 | kfree(map); | 71 | kfree(map); |
72 | } | 72 | } |
73 | if (window->rsrc.parent) | 73 | if (window->rsrc.parent) |
74 | release_resource(&window->rsrc); | 74 | release_resource(&window->rsrc); |
75 | 75 | ||
76 | if (window->virt) { | 76 | if (window->virt) { |
@@ -107,7 +107,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev, | |||
107 | window->phys = 0xffff0000; /* 64KiB */ | 107 | window->phys = 0xffff0000; /* 64KiB */ |
108 | } | 108 | } |
109 | window->size = 0xffffffffUL - window->phys + 1UL; | 109 | window->size = 0xffffffffUL - window->phys + 1UL; |
110 | 110 | ||
111 | /* | 111 | /* |
112 | * Try to reserve the window mem region. If this fails then | 112 | * Try to reserve the window mem region. If this fails then |
113 | * it is likely due to a fragment of the window being | 113 | * it is likely due to a fragment of the window being |
@@ -138,7 +138,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev, | |||
138 | /* Enable writes through the rom window */ | 138 | /* Enable writes through the rom window */ |
139 | pci_read_config_byte(pdev, 0x40, &byte); | 139 | pci_read_config_byte(pdev, 0x40, &byte); |
140 | pci_write_config_byte(pdev, 0x40, byte | 1); | 140 | pci_write_config_byte(pdev, 0x40, byte | 1); |
141 | 141 | ||
142 | /* FIXME handle registers 0x80 - 0x8C the bios region locks */ | 142 | /* FIXME handle registers 0x80 - 0x8C the bios region locks */ |
143 | 143 | ||
144 | /* For write accesses caches are useless */ | 144 | /* For write accesses caches are useless */ |
@@ -186,7 +186,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev, | |||
186 | MOD_NAME, map->map.phys); | 186 | MOD_NAME, map->map.phys); |
187 | 187 | ||
188 | /* There is no generic VPP support */ | 188 | /* There is no generic VPP support */ |
189 | for(map->map.bankwidth = 32; map->map.bankwidth; | 189 | for(map->map.bankwidth = 32; map->map.bankwidth; |
190 | map->map.bankwidth >>= 1) | 190 | map->map.bankwidth >>= 1) |
191 | { | 191 | { |
192 | char **probe_type; | 192 | char **probe_type; |
@@ -239,7 +239,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev, | |||
239 | for(i = 0; i < cfi->numchips; i++) { | 239 | for(i = 0; i < cfi->numchips; i++) { |
240 | cfi->chips[i].start += offset; | 240 | cfi->chips[i].start += offset; |
241 | } | 241 | } |
242 | 242 | ||
243 | /* Now that the mtd devices is complete claim and export it */ | 243 | /* Now that the mtd devices is complete claim and export it */ |
244 | map->mtd->owner = THIS_MODULE; | 244 | map->mtd->owner = THIS_MODULE; |
245 | if (add_mtd_device(map->mtd)) { | 245 | if (add_mtd_device(map->mtd)) { |
@@ -279,9 +279,9 @@ static void __devexit amd76xrom_remove_one (struct pci_dev *pdev) | |||
279 | } | 279 | } |
280 | 280 | ||
281 | static struct pci_device_id amd76xrom_pci_tbl[] = { | 281 | static struct pci_device_id amd76xrom_pci_tbl[] = { |
282 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410, | 282 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410, |
283 | PCI_ANY_ID, PCI_ANY_ID, }, | 283 | PCI_ANY_ID, PCI_ANY_ID, }, |
284 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7440, | 284 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7440, |
285 | PCI_ANY_ID, PCI_ANY_ID, }, | 285 | PCI_ANY_ID, PCI_ANY_ID, }, |
286 | { PCI_VENDOR_ID_AMD, 0x7468 }, /* amd8111 support */ | 286 | { PCI_VENDOR_ID_AMD, 0x7468 }, /* amd8111 support */ |
287 | { 0, } | 287 | { 0, } |
diff --git a/drivers/mtd/maps/arctic-mtd.c b/drivers/mtd/maps/arctic-mtd.c index 777276fd0e15..d95ae582fbe9 100644 --- a/drivers/mtd/maps/arctic-mtd.c +++ b/drivers/mtd/maps/arctic-mtd.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: arctic-mtd.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ | 2 | * $Id: arctic-mtd.c,v 1.14 2005/11/07 11:14:26 gleixner Exp $ |
3 | * | 3 | * |
4 | * drivers/mtd/maps/arctic-mtd.c MTD mappings and partition tables for | 4 | * drivers/mtd/maps/arctic-mtd.c MTD mappings and partition tables for |
5 | * IBM 405LP Arctic boards. | 5 | * IBM 405LP Arctic boards. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
diff --git a/drivers/mtd/maps/autcpu12-nvram.c b/drivers/mtd/maps/autcpu12-nvram.c index cf362ccc3c8e..7ed3424dd959 100644 --- a/drivers/mtd/maps/autcpu12-nvram.c +++ b/drivers/mtd/maps/autcpu12-nvram.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * NV-RAM memory access on autcpu12 | 2 | * NV-RAM memory access on autcpu12 |
3 | * (C) 2002 Thomas Gleixner (gleixner@autronix.de) | 3 | * (C) 2002 Thomas Gleixner (gleixner@autronix.de) |
4 | * | 4 | * |
5 | * $Id: autcpu12-nvram.c,v 1.8 2004/11/04 13:24:14 gleixner Exp $ | 5 | * $Id: autcpu12-nvram.c,v 1.9 2005/11/07 11:14:26 gleixner Exp $ |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -55,10 +55,10 @@ static int __init init_autcpu12_sram (void) | |||
55 | } | 55 | } |
56 | simple_map_init(&autcpu_sram_map); | 56 | simple_map_init(&autcpu_sram_map); |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Check for 32K/128K | 59 | * Check for 32K/128K |
60 | * read ofs 0 | 60 | * read ofs 0 |
61 | * read ofs 0x10000 | 61 | * read ofs 0x10000 |
62 | * Write complement to ofs 0x100000 | 62 | * Write complement to ofs 0x100000 |
63 | * Read and check result on ofs 0x0 | 63 | * Read and check result on ofs 0x0 |
64 | * Restore contents | 64 | * Restore contents |
@@ -66,7 +66,7 @@ static int __init init_autcpu12_sram (void) | |||
66 | save0 = map_read32(&autcpu12_sram_map,0); | 66 | save0 = map_read32(&autcpu12_sram_map,0); |
67 | save1 = map_read32(&autcpu12_sram_map,0x10000); | 67 | save1 = map_read32(&autcpu12_sram_map,0x10000); |
68 | map_write32(&autcpu12_sram_map,~save0,0x10000); | 68 | map_write32(&autcpu12_sram_map,~save0,0x10000); |
69 | /* if we find this pattern on 0x0, we have 32K size | 69 | /* if we find this pattern on 0x0, we have 32K size |
70 | * restore contents and exit | 70 | * restore contents and exit |
71 | */ | 71 | */ |
72 | if ( map_read32(&autcpu12_sram_map,0) != save0) { | 72 | if ( map_read32(&autcpu12_sram_map,0) != save0) { |
@@ -89,7 +89,7 @@ map: | |||
89 | 89 | ||
90 | sram_mtd->owner = THIS_MODULE; | 90 | sram_mtd->owner = THIS_MODULE; |
91 | sram_mtd->erasesize = 16; | 91 | sram_mtd->erasesize = 16; |
92 | 92 | ||
93 | if (add_mtd_device(sram_mtd)) { | 93 | if (add_mtd_device(sram_mtd)) { |
94 | printk("NV-RAM device addition failed\n"); | 94 | printk("NV-RAM device addition failed\n"); |
95 | err = -ENOMEM; | 95 | err = -ENOMEM; |
@@ -97,7 +97,7 @@ map: | |||
97 | } | 97 | } |
98 | 98 | ||
99 | printk("NV-RAM device size %ldKiB registered on AUTCPU12\n",autcpu12_sram_map.size/SZ_1K); | 99 | printk("NV-RAM device size %ldKiB registered on AUTCPU12\n",autcpu12_sram_map.size/SZ_1K); |
100 | 100 | ||
101 | return 0; | 101 | return 0; |
102 | 102 | ||
103 | out_probe: | 103 | out_probe: |
diff --git a/drivers/mtd/maps/bast-flash.c b/drivers/mtd/maps/bast-flash.c index 5ec53c17e431..610dfcaa2c86 100644 --- a/drivers/mtd/maps/bast-flash.c +++ b/drivers/mtd/maps/bast-flash.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * 20-Sep-2004 BJD Initial version | 9 | * 20-Sep-2004 BJD Initial version |
10 | * 17-Jan-2005 BJD Add whole device if no partitions found | 10 | * 17-Jan-2005 BJD Add whole device if no partitions found |
11 | * | 11 | * |
12 | * $Id: bast-flash.c,v 1.3 2005/10/10 00:13:38 bjd Exp $ | 12 | * $Id: bast-flash.c,v 1.5 2005/11/07 11:14:26 gleixner Exp $ |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or modify | 14 | * This program is free software; you can redistribute it and/or modify |
15 | * it under the terms of the GNU General Public License as published by | 15 | * it under the terms of the GNU General Public License as published by |
@@ -75,7 +75,7 @@ static void bast_flash_setrw(int to) | |||
75 | 75 | ||
76 | local_irq_save(flags); | 76 | local_irq_save(flags); |
77 | val = __raw_readb(BAST_VA_CTRL3); | 77 | val = __raw_readb(BAST_VA_CTRL3); |
78 | 78 | ||
79 | if (to) | 79 | if (to) |
80 | val |= BAST_CPLD_CTRL3_ROMWEN; | 80 | val |= BAST_CPLD_CTRL3_ROMWEN; |
81 | else | 81 | else |
@@ -93,7 +93,7 @@ static int bast_flash_remove(struct device *dev) | |||
93 | 93 | ||
94 | dev_set_drvdata(dev, NULL); | 94 | dev_set_drvdata(dev, NULL); |
95 | 95 | ||
96 | if (info == NULL) | 96 | if (info == NULL) |
97 | return 0; | 97 | return 0; |
98 | 98 | ||
99 | if (info->map.virt != NULL) | 99 | if (info->map.virt != NULL) |
@@ -111,7 +111,7 @@ static int bast_flash_remove(struct device *dev) | |||
111 | release_resource(info->area); | 111 | release_resource(info->area); |
112 | kfree(info->area); | 112 | kfree(info->area); |
113 | } | 113 | } |
114 | 114 | ||
115 | kfree(info); | 115 | kfree(info); |
116 | 116 | ||
117 | return 0; | 117 | return 0; |
@@ -138,15 +138,15 @@ static int bast_flash_probe(struct device *dev) | |||
138 | 138 | ||
139 | info->map.phys = res->start; | 139 | info->map.phys = res->start; |
140 | info->map.size = res->end - res->start + 1; | 140 | info->map.size = res->end - res->start + 1; |
141 | info->map.name = dev->bus_id; | 141 | info->map.name = dev->bus_id; |
142 | info->map.bankwidth = 2; | 142 | info->map.bankwidth = 2; |
143 | 143 | ||
144 | if (info->map.size > AREA_MAXSIZE) | 144 | if (info->map.size > AREA_MAXSIZE) |
145 | info->map.size = AREA_MAXSIZE; | 145 | info->map.size = AREA_MAXSIZE; |
146 | 146 | ||
147 | pr_debug("%s: area %08lx, size %ld\n", __FUNCTION__, | 147 | pr_debug("%s: area %08lx, size %ld\n", __FUNCTION__, |
148 | info->map.phys, info->map.size); | 148 | info->map.phys, info->map.size); |
149 | 149 | ||
150 | info->area = request_mem_region(res->start, info->map.size, | 150 | info->area = request_mem_region(res->start, info->map.size, |
151 | pdev->name); | 151 | pdev->name); |
152 | if (info->area == NULL) { | 152 | if (info->area == NULL) { |
@@ -163,7 +163,7 @@ static int bast_flash_probe(struct device *dev) | |||
163 | err = -EIO; | 163 | err = -EIO; |
164 | goto exit_error; | 164 | goto exit_error; |
165 | } | 165 | } |
166 | 166 | ||
167 | simple_map_init(&info->map); | 167 | simple_map_init(&info->map); |
168 | 168 | ||
169 | /* enable the write to the flash area */ | 169 | /* enable the write to the flash area */ |
@@ -188,7 +188,7 @@ static int bast_flash_probe(struct device *dev) | |||
188 | err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); | 188 | err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); |
189 | if (err > 0) { | 189 | if (err > 0) { |
190 | err = add_mtd_partitions(info->mtd, info->partitions, err); | 190 | err = add_mtd_partitions(info->mtd, info->partitions, err); |
191 | if (err) | 191 | if (err) |
192 | printk(KERN_ERR PFX "cannot add/parse partitions\n"); | 192 | printk(KERN_ERR PFX "cannot add/parse partitions\n"); |
193 | } else { | 193 | } else { |
194 | err = add_mtd_device(info->mtd); | 194 | err = add_mtd_device(info->mtd); |
diff --git a/drivers/mtd/maps/beech-mtd.c b/drivers/mtd/maps/beech-mtd.c index 5e79c9d5da2b..5df7361d1407 100644 --- a/drivers/mtd/maps/beech-mtd.c +++ b/drivers/mtd/maps/beech-mtd.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: beech-mtd.c,v 1.10 2004/11/04 13:24:14 gleixner Exp $ | 2 | * $Id: beech-mtd.c,v 1.11 2005/11/07 11:14:26 gleixner Exp $ |
3 | * | 3 | * |
4 | * drivers/mtd/maps/beech-mtd.c MTD mappings and partition tables for | 4 | * drivers/mtd/maps/beech-mtd.c MTD mappings and partition tables for |
5 | * IBM 405LP Beech boards. | 5 | * IBM 405LP Beech boards. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
diff --git a/drivers/mtd/maps/cdb89712.c b/drivers/mtd/maps/cdb89712.c index ab15dac2f936..9f17bb6c5a9d 100644 --- a/drivers/mtd/maps/cdb89712.c +++ b/drivers/mtd/maps/cdb89712.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Flash on Cirrus CDB89712 | 2 | * Flash on Cirrus CDB89712 |
3 | * | 3 | * |
4 | * $Id: cdb89712.c,v 1.10 2004/11/04 13:24:14 gleixner Exp $ | 4 | * $Id: cdb89712.c,v 1.11 2005/11/07 11:14:26 gleixner Exp $ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
@@ -37,13 +37,13 @@ struct resource cdb89712_flash_resource = { | |||
37 | static int __init init_cdb89712_flash (void) | 37 | static int __init init_cdb89712_flash (void) |
38 | { | 38 | { |
39 | int err; | 39 | int err; |
40 | 40 | ||
41 | if (request_resource (&ioport_resource, &cdb89712_flash_resource)) { | 41 | if (request_resource (&ioport_resource, &cdb89712_flash_resource)) { |
42 | printk(KERN_NOTICE "Failed to reserve Cdb89712 FLASH space\n"); | 42 | printk(KERN_NOTICE "Failed to reserve Cdb89712 FLASH space\n"); |
43 | err = -EBUSY; | 43 | err = -EBUSY; |
44 | goto out; | 44 | goto out; |
45 | } | 45 | } |
46 | 46 | ||
47 | cdb89712_flash_map.virt = ioremap(FLASH_START, FLASH_SIZE); | 47 | cdb89712_flash_map.virt = ioremap(FLASH_START, FLASH_SIZE); |
48 | if (!cdb89712_flash_map.virt) { | 48 | if (!cdb89712_flash_map.virt) { |
49 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 FLASH space\n"); | 49 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 FLASH space\n"); |
@@ -64,13 +64,13 @@ static int __init init_cdb89712_flash (void) | |||
64 | } | 64 | } |
65 | 65 | ||
66 | flash_mtd->owner = THIS_MODULE; | 66 | flash_mtd->owner = THIS_MODULE; |
67 | 67 | ||
68 | if (add_mtd_device(flash_mtd)) { | 68 | if (add_mtd_device(flash_mtd)) { |
69 | printk("FLASH device addition failed\n"); | 69 | printk("FLASH device addition failed\n"); |
70 | err = -ENOMEM; | 70 | err = -ENOMEM; |
71 | goto out_probe; | 71 | goto out_probe; |
72 | } | 72 | } |
73 | 73 | ||
74 | return 0; | 74 | return 0; |
75 | 75 | ||
76 | out_probe: | 76 | out_probe: |
@@ -107,13 +107,13 @@ struct resource cdb89712_sram_resource = { | |||
107 | static int __init init_cdb89712_sram (void) | 107 | static int __init init_cdb89712_sram (void) |
108 | { | 108 | { |
109 | int err; | 109 | int err; |
110 | 110 | ||
111 | if (request_resource (&ioport_resource, &cdb89712_sram_resource)) { | 111 | if (request_resource (&ioport_resource, &cdb89712_sram_resource)) { |
112 | printk(KERN_NOTICE "Failed to reserve Cdb89712 SRAM space\n"); | 112 | printk(KERN_NOTICE "Failed to reserve Cdb89712 SRAM space\n"); |
113 | err = -EBUSY; | 113 | err = -EBUSY; |
114 | goto out; | 114 | goto out; |
115 | } | 115 | } |
116 | 116 | ||
117 | cdb89712_sram_map.virt = ioremap(SRAM_START, SRAM_SIZE); | 117 | cdb89712_sram_map.virt = ioremap(SRAM_START, SRAM_SIZE); |
118 | if (!cdb89712_sram_map.virt) { | 118 | if (!cdb89712_sram_map.virt) { |
119 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 SRAM space\n"); | 119 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 SRAM space\n"); |
@@ -130,13 +130,13 @@ static int __init init_cdb89712_sram (void) | |||
130 | 130 | ||
131 | sram_mtd->owner = THIS_MODULE; | 131 | sram_mtd->owner = THIS_MODULE; |
132 | sram_mtd->erasesize = 16; | 132 | sram_mtd->erasesize = 16; |
133 | 133 | ||
134 | if (add_mtd_device(sram_mtd)) { | 134 | if (add_mtd_device(sram_mtd)) { |
135 | printk("SRAM device addition failed\n"); | 135 | printk("SRAM device addition failed\n"); |
136 | err = -ENOMEM; | 136 | err = -ENOMEM; |
137 | goto out_probe; | 137 | goto out_probe; |
138 | } | 138 | } |
139 | 139 | ||
140 | return 0; | 140 | return 0; |
141 | 141 | ||
142 | out_probe: | 142 | out_probe: |
@@ -175,13 +175,13 @@ struct resource cdb89712_bootrom_resource = { | |||
175 | static int __init init_cdb89712_bootrom (void) | 175 | static int __init init_cdb89712_bootrom (void) |
176 | { | 176 | { |
177 | int err; | 177 | int err; |
178 | 178 | ||
179 | if (request_resource (&ioport_resource, &cdb89712_bootrom_resource)) { | 179 | if (request_resource (&ioport_resource, &cdb89712_bootrom_resource)) { |
180 | printk(KERN_NOTICE "Failed to reserve Cdb89712 BOOTROM space\n"); | 180 | printk(KERN_NOTICE "Failed to reserve Cdb89712 BOOTROM space\n"); |
181 | err = -EBUSY; | 181 | err = -EBUSY; |
182 | goto out; | 182 | goto out; |
183 | } | 183 | } |
184 | 184 | ||
185 | cdb89712_bootrom_map.virt = ioremap(BOOTROM_START, BOOTROM_SIZE); | 185 | cdb89712_bootrom_map.virt = ioremap(BOOTROM_START, BOOTROM_SIZE); |
186 | if (!cdb89712_bootrom_map.virt) { | 186 | if (!cdb89712_bootrom_map.virt) { |
187 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 BootROM space\n"); | 187 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 BootROM space\n"); |
@@ -198,13 +198,13 @@ static int __init init_cdb89712_bootrom (void) | |||
198 | 198 | ||
199 | bootrom_mtd->owner = THIS_MODULE; | 199 | bootrom_mtd->owner = THIS_MODULE; |
200 | bootrom_mtd->erasesize = 0x10000; | 200 | bootrom_mtd->erasesize = 0x10000; |
201 | 201 | ||
202 | if (add_mtd_device(bootrom_mtd)) { | 202 | if (add_mtd_device(bootrom_mtd)) { |
203 | printk("BootROM device addition failed\n"); | 203 | printk("BootROM device addition failed\n"); |
204 | err = -ENOMEM; | 204 | err = -ENOMEM; |
205 | goto out_probe; | 205 | goto out_probe; |
206 | } | 206 | } |
207 | 207 | ||
208 | return 0; | 208 | return 0; |
209 | 209 | ||
210 | out_probe: | 210 | out_probe: |
@@ -225,16 +225,16 @@ out: | |||
225 | static int __init init_cdb89712_maps(void) | 225 | static int __init init_cdb89712_maps(void) |
226 | { | 226 | { |
227 | 227 | ||
228 | printk(KERN_INFO "Cirrus CDB89712 MTD mappings:\n Flash 0x%x at 0x%x\n SRAM 0x%x at 0x%x\n BootROM 0x%x at 0x%x\n", | 228 | printk(KERN_INFO "Cirrus CDB89712 MTD mappings:\n Flash 0x%x at 0x%x\n SRAM 0x%x at 0x%x\n BootROM 0x%x at 0x%x\n", |
229 | FLASH_SIZE, FLASH_START, SRAM_SIZE, SRAM_START, BOOTROM_SIZE, BOOTROM_START); | 229 | FLASH_SIZE, FLASH_START, SRAM_SIZE, SRAM_START, BOOTROM_SIZE, BOOTROM_START); |
230 | 230 | ||
231 | init_cdb89712_flash(); | 231 | init_cdb89712_flash(); |
232 | init_cdb89712_sram(); | 232 | init_cdb89712_sram(); |
233 | init_cdb89712_bootrom(); | 233 | init_cdb89712_bootrom(); |
234 | 234 | ||
235 | return 0; | 235 | return 0; |
236 | } | 236 | } |
237 | 237 | ||
238 | 238 | ||
239 | static void __exit cleanup_cdb89712_maps(void) | 239 | static void __exit cleanup_cdb89712_maps(void) |
240 | { | 240 | { |
@@ -244,7 +244,7 @@ static void __exit cleanup_cdb89712_maps(void) | |||
244 | iounmap((void *)cdb89712_sram_map.virt); | 244 | iounmap((void *)cdb89712_sram_map.virt); |
245 | release_resource (&cdb89712_sram_resource); | 245 | release_resource (&cdb89712_sram_resource); |
246 | } | 246 | } |
247 | 247 | ||
248 | if (flash_mtd) { | 248 | if (flash_mtd) { |
249 | del_mtd_device(flash_mtd); | 249 | del_mtd_device(flash_mtd); |
250 | map_destroy(flash_mtd); | 250 | map_destroy(flash_mtd); |
diff --git a/drivers/mtd/maps/cfi_flagadm.c b/drivers/mtd/maps/cfi_flagadm.c index f72e4f894b32..6a8c0415bde8 100644 --- a/drivers/mtd/maps/cfi_flagadm.c +++ b/drivers/mtd/maps/cfi_flagadm.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright © 2001 Flaga hf. Medical Devices, Kári Davíðsson <kd@flaga.is> | 2 | * Copyright © 2001 Flaga hf. Medical Devices, Kári Davíðsson <kd@flaga.is> |
3 | * | 3 | * |
4 | * $Id: cfi_flagadm.c,v 1.14 2004/11/04 13:24:14 gleixner Exp $ | 4 | * $Id: cfi_flagadm.c,v 1.15 2005/11/07 11:14:26 gleixner Exp $ |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #define FLASH_PHYS_ADDR 0x40000000 | 44 | #define FLASH_PHYS_ADDR 0x40000000 |
45 | #define FLASH_SIZE 0x400000 | 45 | #define FLASH_SIZE 0x400000 |
46 | 46 | ||
47 | #define FLASH_PARTITION0_ADDR 0x00000000 | 47 | #define FLASH_PARTITION0_ADDR 0x00000000 |
48 | #define FLASH_PARTITION0_SIZE 0x00020000 | 48 | #define FLASH_PARTITION0_SIZE 0x00020000 |
@@ -79,7 +79,7 @@ struct mtd_partition flagadm_parts[] = { | |||
79 | .offset = FLASH_PARTITION2_ADDR, | 79 | .offset = FLASH_PARTITION2_ADDR, |
80 | .size = FLASH_PARTITION2_SIZE | 80 | .size = FLASH_PARTITION2_SIZE |
81 | }, | 81 | }, |
82 | { | 82 | { |
83 | .name = "Persistant storage", | 83 | .name = "Persistant storage", |
84 | .offset = FLASH_PARTITION3_ADDR, | 84 | .offset = FLASH_PARTITION3_ADDR, |
85 | .size = FLASH_PARTITION3_SIZE | 85 | .size = FLASH_PARTITION3_SIZE |
@@ -91,10 +91,10 @@ struct mtd_partition flagadm_parts[] = { | |||
91 | static struct mtd_info *mymtd; | 91 | static struct mtd_info *mymtd; |
92 | 92 | ||
93 | int __init init_flagadm(void) | 93 | int __init init_flagadm(void) |
94 | { | 94 | { |
95 | printk(KERN_NOTICE "FlagaDM flash device: %x at %x\n", | 95 | printk(KERN_NOTICE "FlagaDM flash device: %x at %x\n", |
96 | FLASH_SIZE, FLASH_PHYS_ADDR); | 96 | FLASH_SIZE, FLASH_PHYS_ADDR); |
97 | 97 | ||
98 | flagadm_map.phys = FLASH_PHYS_ADDR; | 98 | flagadm_map.phys = FLASH_PHYS_ADDR; |
99 | flagadm_map.virt = ioremap(FLASH_PHYS_ADDR, | 99 | flagadm_map.virt = ioremap(FLASH_PHYS_ADDR, |
100 | FLASH_SIZE); | 100 | FLASH_SIZE); |
diff --git a/drivers/mtd/maps/cstm_mips_ixx.c b/drivers/mtd/maps/cstm_mips_ixx.c index ae9252fbf176..a370953c1513 100644 --- a/drivers/mtd/maps/cstm_mips_ixx.c +++ b/drivers/mtd/maps/cstm_mips_ixx.c | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: cstm_mips_ixx.c,v 1.12 2004/11/04 13:24:14 gleixner Exp $ | 2 | * $Id: cstm_mips_ixx.c,v 1.14 2005/11/07 11:14:26 gleixner Exp $ |
3 | * | 3 | * |
4 | * Mapping of a custom board with both AMD CFI and JEDEC flash in partitions. | 4 | * Mapping of a custom board with both AMD CFI and JEDEC flash in partitions. |
5 | * Config with both CFI and JEDEC device support. | 5 | * Config with both CFI and JEDEC device support. |
6 | * | 6 | * |
7 | * Basically physmap.c with the addition of partitions and | 7 | * Basically physmap.c with the addition of partitions and |
8 | * an array of mapping info to accomodate more than one flash type per board. | 8 | * an array of mapping info to accomodate more than one flash type per board. |
9 | * | 9 | * |
10 | * Copyright 2000 MontaVista Software Inc. | 10 | * Copyright 2000 MontaVista Software Inc. |
@@ -69,7 +69,7 @@ void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp) | |||
69 | __u16 data; | 69 | __u16 data; |
70 | __u8 data1; | 70 | __u8 data1; |
71 | static u8 first = 1; | 71 | static u8 first = 1; |
72 | 72 | ||
73 | // Set GPIO port B pin3 to high | 73 | // Set GPIO port B pin3 to high |
74 | data = *(__u16 *)(CC_GPBCR); | 74 | data = *(__u16 *)(CC_GPBCR); |
75 | data = (data & 0xff0f) | 0x0040; | 75 | data = (data & 0xff0f) | 0x0040; |
@@ -85,7 +85,7 @@ void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp) | |||
85 | } else { | 85 | } else { |
86 | if (!--vpp_count) { | 86 | if (!--vpp_count) { |
87 | __u16 data; | 87 | __u16 data; |
88 | 88 | ||
89 | // Set GPIO port B pin3 to high | 89 | // Set GPIO port B pin3 to high |
90 | data = *(__u16 *)(CC_GPBCR); | 90 | data = *(__u16 *)(CC_GPBCR); |
91 | data = (data & 0xff3f) | 0x0040; | 91 | data = (data & 0xff3f) | 0x0040; |
@@ -109,8 +109,8 @@ struct cstm_mips_ixx_info { | |||
109 | }; | 109 | }; |
110 | 110 | ||
111 | #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) | 111 | #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) |
112 | #define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type | 112 | #define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type |
113 | const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] = | 113 | const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] = |
114 | { | 114 | { |
115 | { // 28F128J3A in 2x16 configuration | 115 | { // 28F128J3A in 2x16 configuration |
116 | "big flash", // name | 116 | "big flash", // name |
@@ -131,10 +131,10 @@ static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP | |||
131 | }, | 131 | }, |
132 | }; | 132 | }; |
133 | #else /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */ | 133 | #else /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */ |
134 | #define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type | 134 | #define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type |
135 | const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] = | 135 | const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] = |
136 | { | 136 | { |
137 | { | 137 | { |
138 | "MTD flash", // name | 138 | "MTD flash", // name |
139 | CONFIG_MTD_CSTM_MIPS_IXX_START, // window_addr | 139 | CONFIG_MTD_CSTM_MIPS_IXX_START, // window_addr |
140 | CONFIG_MTD_CSTM_MIPS_IXX_LEN, // window_size | 140 | CONFIG_MTD_CSTM_MIPS_IXX_LEN, // window_size |
@@ -144,7 +144,7 @@ const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] = | |||
144 | 144 | ||
145 | }; | 145 | }; |
146 | static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP_PARTITIONS] = { | 146 | static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP_PARTITIONS] = { |
147 | { | 147 | { |
148 | { | 148 | { |
149 | .name = "main partition", | 149 | .name = "main partition", |
150 | .size = CONFIG_MTD_CSTM_MIPS_IXX_LEN, | 150 | .size = CONFIG_MTD_CSTM_MIPS_IXX_LEN, |
@@ -165,7 +165,7 @@ int __init init_cstm_mips_ixx(void) | |||
165 | 165 | ||
166 | /* Initialize mapping */ | 166 | /* Initialize mapping */ |
167 | for (i=0;i<PHYSMAP_NUMBER;i++) { | 167 | for (i=0;i<PHYSMAP_NUMBER;i++) { |
168 | printk(KERN_NOTICE "cstm_mips_ixx flash device: 0x%lx at 0x%lx\n", | 168 | printk(KERN_NOTICE "cstm_mips_ixx flash device: 0x%lx at 0x%lx\n", |
169 | cstm_mips_ixx_board_desc[i].window_size, cstm_mips_ixx_board_desc[i].window_addr); | 169 | cstm_mips_ixx_board_desc[i].window_size, cstm_mips_ixx_board_desc[i].window_addr); |
170 | 170 | ||
171 | 171 | ||
@@ -235,7 +235,7 @@ void PCISetULongByOffset(__u32 DevNumber, __u32 FuncNumber, __u32 Offset, __u32 | |||
235 | 235 | ||
236 | offset = ( unsigned long )( 0x80000000 | ( DevNumber << 11 ) + ( FuncNumber << 8 ) + Offset) ; | 236 | offset = ( unsigned long )( 0x80000000 | ( DevNumber << 11 ) + ( FuncNumber << 8 ) + Offset) ; |
237 | 237 | ||
238 | *(__u32 *)CC_CONFADDR = offset; | 238 | *(__u32 *)CC_CONFADDR = offset; |
239 | *(__u32 *)CC_CONFDATA = data; | 239 | *(__u32 *)CC_CONFDATA = data; |
240 | } | 240 | } |
241 | void setup_ITE_IVR_flash() | 241 | void setup_ITE_IVR_flash() |
diff --git a/drivers/mtd/maps/dbox2-flash.c b/drivers/mtd/maps/dbox2-flash.c index d850a27a4b59..49d90542fc75 100644 --- a/drivers/mtd/maps/dbox2-flash.c +++ b/drivers/mtd/maps/dbox2-flash.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: dbox2-flash.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ | 2 | * $Id: dbox2-flash.c,v 1.14 2005/11/07 11:14:26 gleixner Exp $ |
3 | * | 3 | * |
4 | * D-Box 2 flash driver | 4 | * D-Box 2 flash driver |
5 | */ | 5 | */ |
@@ -21,38 +21,38 @@ | |||
21 | static struct mtd_partition partition_info[]= { | 21 | static struct mtd_partition partition_info[]= { |
22 | { | 22 | { |
23 | .name = "BR bootloader", | 23 | .name = "BR bootloader", |
24 | .size = 128 * 1024, | 24 | .size = 128 * 1024, |
25 | .offset = 0, | 25 | .offset = 0, |
26 | .mask_flags = MTD_WRITEABLE | 26 | .mask_flags = MTD_WRITEABLE |
27 | }, | 27 | }, |
28 | { | 28 | { |
29 | .name = "FLFS (U-Boot)", | 29 | .name = "FLFS (U-Boot)", |
30 | .size = 128 * 1024, | 30 | .size = 128 * 1024, |
31 | .offset = MTDPART_OFS_APPEND, | 31 | .offset = MTDPART_OFS_APPEND, |
32 | .mask_flags = 0 | 32 | .mask_flags = 0 |
33 | }, | 33 | }, |
34 | { | 34 | { |
35 | .name = "Root (SquashFS)", | 35 | .name = "Root (SquashFS)", |
36 | .size = 7040 * 1024, | 36 | .size = 7040 * 1024, |
37 | .offset = MTDPART_OFS_APPEND, | 37 | .offset = MTDPART_OFS_APPEND, |
38 | .mask_flags = 0 | 38 | .mask_flags = 0 |
39 | }, | 39 | }, |
40 | { | 40 | { |
41 | .name = "var (JFFS2)", | 41 | .name = "var (JFFS2)", |
42 | .size = 896 * 1024, | 42 | .size = 896 * 1024, |
43 | .offset = MTDPART_OFS_APPEND, | 43 | .offset = MTDPART_OFS_APPEND, |
44 | .mask_flags = 0 | 44 | .mask_flags = 0 |
45 | }, | 45 | }, |
46 | { | 46 | { |
47 | .name = "Flash without bootloader", | 47 | .name = "Flash without bootloader", |
48 | .size = MTDPART_SIZ_FULL, | 48 | .size = MTDPART_SIZ_FULL, |
49 | .offset = 128 * 1024, | 49 | .offset = 128 * 1024, |
50 | .mask_flags = 0 | 50 | .mask_flags = 0 |
51 | }, | 51 | }, |
52 | { | 52 | { |
53 | .name = "Complete Flash", | 53 | .name = "Complete Flash", |
54 | .size = MTDPART_SIZ_FULL, | 54 | .size = MTDPART_SIZ_FULL, |
55 | .offset = 0, | 55 | .offset = 0, |
56 | .mask_flags = MTD_WRITEABLE | 56 | .mask_flags = MTD_WRITEABLE |
57 | } | 57 | } |
58 | }; | 58 | }; |
@@ -88,16 +88,16 @@ int __init init_dbox2_flash(void) | |||
88 | if (!mymtd) { | 88 | if (!mymtd) { |
89 | // Probe for single Intel 28F640 | 89 | // Probe for single Intel 28F640 |
90 | dbox2_flash_map.bankwidth = 2; | 90 | dbox2_flash_map.bankwidth = 2; |
91 | 91 | ||
92 | mymtd = do_map_probe("cfi_probe", &dbox2_flash_map); | 92 | mymtd = do_map_probe("cfi_probe", &dbox2_flash_map); |
93 | } | 93 | } |
94 | 94 | ||
95 | if (mymtd) { | 95 | if (mymtd) { |
96 | mymtd->owner = THIS_MODULE; | 96 | mymtd->owner = THIS_MODULE; |
97 | 97 | ||
98 | /* Create MTD devices for each partition. */ | 98 | /* Create MTD devices for each partition. */ |
99 | add_mtd_partitions(mymtd, partition_info, NUM_PARTITIONS); | 99 | add_mtd_partitions(mymtd, partition_info, NUM_PARTITIONS); |
100 | 100 | ||
101 | return 0; | 101 | return 0; |
102 | } | 102 | } |
103 | 103 | ||
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c index e5b74169fde6..701620b6baed 100644 --- a/drivers/mtd/maps/dc21285.c +++ b/drivers/mtd/maps/dc21285.c | |||
@@ -4,8 +4,8 @@ | |||
4 | * (C) 2000 Nicolas Pitre <nico@cam.org> | 4 | * (C) 2000 Nicolas Pitre <nico@cam.org> |
5 | * | 5 | * |
6 | * This code is GPL | 6 | * This code is GPL |
7 | * | 7 | * |
8 | * $Id: dc21285.c,v 1.22 2004/11/01 13:39:21 rmk Exp $ | 8 | * $Id: dc21285.c,v 1.24 2005/11/07 11:14:26 gleixner Exp $ |
9 | */ | 9 | */ |
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
@@ -27,9 +27,9 @@ | |||
27 | static struct mtd_info *dc21285_mtd; | 27 | static struct mtd_info *dc21285_mtd; |
28 | 28 | ||
29 | #ifdef CONFIG_ARCH_NETWINDER | 29 | #ifdef CONFIG_ARCH_NETWINDER |
30 | /* | 30 | /* |
31 | * This is really ugly, but it seams to be the only | 31 | * This is really ugly, but it seams to be the only |
32 | * realiable way to do it, as the cpld state machine | 32 | * realiable way to do it, as the cpld state machine |
33 | * is unpredictible. So we have a 25us penalty per | 33 | * is unpredictible. So we have a 25us penalty per |
34 | * write access. | 34 | * write access. |
35 | */ | 35 | */ |
@@ -150,7 +150,7 @@ static struct map_info dc21285_map = { | |||
150 | static struct mtd_partition *dc21285_parts; | 150 | static struct mtd_partition *dc21285_parts; |
151 | static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; | 151 | static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; |
152 | #endif | 152 | #endif |
153 | 153 | ||
154 | static int __init init_dc21285(void) | 154 | static int __init init_dc21285(void) |
155 | { | 155 | { |
156 | 156 | ||
@@ -160,20 +160,20 @@ static int __init init_dc21285(void) | |||
160 | 160 | ||
161 | /* Determine bankwidth */ | 161 | /* Determine bankwidth */ |
162 | switch (*CSR_SA110_CNTL & (3<<14)) { | 162 | switch (*CSR_SA110_CNTL & (3<<14)) { |
163 | case SA110_CNTL_ROMWIDTH_8: | 163 | case SA110_CNTL_ROMWIDTH_8: |
164 | dc21285_map.bankwidth = 1; | 164 | dc21285_map.bankwidth = 1; |
165 | dc21285_map.read = dc21285_read8; | 165 | dc21285_map.read = dc21285_read8; |
166 | dc21285_map.write = dc21285_write8; | 166 | dc21285_map.write = dc21285_write8; |
167 | dc21285_map.copy_to = dc21285_copy_to_8; | 167 | dc21285_map.copy_to = dc21285_copy_to_8; |
168 | break; | 168 | break; |
169 | case SA110_CNTL_ROMWIDTH_16: | 169 | case SA110_CNTL_ROMWIDTH_16: |
170 | dc21285_map.bankwidth = 2; | 170 | dc21285_map.bankwidth = 2; |
171 | dc21285_map.read = dc21285_read16; | 171 | dc21285_map.read = dc21285_read16; |
172 | dc21285_map.write = dc21285_write16; | 172 | dc21285_map.write = dc21285_write16; |
173 | dc21285_map.copy_to = dc21285_copy_to_16; | 173 | dc21285_map.copy_to = dc21285_copy_to_16; |
174 | break; | 174 | break; |
175 | case SA110_CNTL_ROMWIDTH_32: | 175 | case SA110_CNTL_ROMWIDTH_32: |
176 | dc21285_map.bankwidth = 4; | 176 | dc21285_map.bankwidth = 4; |
177 | dc21285_map.read = dc21285_read32; | 177 | dc21285_map.read = dc21285_read32; |
178 | dc21285_map.write = dc21285_write32; | 178 | dc21285_map.write = dc21285_write32; |
179 | dc21285_map.copy_to = dc21285_copy_to_32; | 179 | dc21285_map.copy_to = dc21285_copy_to_32; |
@@ -201,20 +201,20 @@ static int __init init_dc21285(void) | |||
201 | if (!dc21285_mtd) { | 201 | if (!dc21285_mtd) { |
202 | iounmap(dc21285_map.virt); | 202 | iounmap(dc21285_map.virt); |
203 | return -ENXIO; | 203 | return -ENXIO; |
204 | } | 204 | } |
205 | 205 | ||
206 | dc21285_mtd->owner = THIS_MODULE; | 206 | dc21285_mtd->owner = THIS_MODULE; |
207 | 207 | ||
208 | #ifdef CONFIG_MTD_PARTITIONS | 208 | #ifdef CONFIG_MTD_PARTITIONS |
209 | nrparts = parse_mtd_partitions(dc21285_mtd, probes, &dc21285_parts, 0); | 209 | nrparts = parse_mtd_partitions(dc21285_mtd, probes, &dc21285_parts, 0); |
210 | if (nrparts > 0) | 210 | if (nrparts > 0) |
211 | add_mtd_partitions(dc21285_mtd, dc21285_parts, nrparts); | 211 | add_mtd_partitions(dc21285_mtd, dc21285_parts, nrparts); |
212 | else | 212 | else |
213 | #endif | 213 | #endif |
214 | add_mtd_device(dc21285_mtd); | 214 | add_mtd_device(dc21285_mtd); |
215 | 215 | ||
216 | if(machine_is_ebsa285()) { | 216 | if(machine_is_ebsa285()) { |
217 | /* | 217 | /* |
218 | * Flash timing is determined with bits 19-16 of the | 218 | * Flash timing is determined with bits 19-16 of the |
219 | * CSR_SA110_CNTL. The value is the number of wait cycles, or | 219 | * CSR_SA110_CNTL. The value is the number of wait cycles, or |
220 | * 0 for 16 cycles (the default). Cycles are 20 ns. | 220 | * 0 for 16 cycles (the default). Cycles are 20 ns. |
@@ -227,7 +227,7 @@ static int __init init_dc21285(void) | |||
227 | /* tristate time */ | 227 | /* tristate time */ |
228 | *CSR_SA110_CNTL = ((*CSR_SA110_CNTL & ~0x0f000000) | (7 << 24)); | 228 | *CSR_SA110_CNTL = ((*CSR_SA110_CNTL & ~0x0f000000) | (7 << 24)); |
229 | } | 229 | } |
230 | 230 | ||
231 | return 0; | 231 | return 0; |
232 | } | 232 | } |
233 | 233 | ||
diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c index f99519692cb7..b51c757817d8 100644 --- a/drivers/mtd/maps/dilnetpc.c +++ b/drivers/mtd/maps/dilnetpc.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * along with this program; if not, write to the Free Software | 14 | * along with this program; if not, write to the Free Software |
15 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 15 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
16 | * | 16 | * |
17 | * $Id: dilnetpc.c,v 1.17 2004/11/28 09:40:39 dwmw2 Exp $ | 17 | * $Id: dilnetpc.c,v 1.20 2005/11/07 11:14:26 gleixner Exp $ |
18 | * | 18 | * |
19 | * The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems | 19 | * The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems |
20 | * featuring the AMD Elan SC410 processor. There are two variants of this | 20 | * featuring the AMD Elan SC410 processor. There are two variants of this |
@@ -272,13 +272,13 @@ static struct map_info dnpc_map = { | |||
272 | 272 | ||
273 | static struct mtd_partition partition_info[]= | 273 | static struct mtd_partition partition_info[]= |
274 | { | 274 | { |
275 | { | 275 | { |
276 | .name = "ADNP boot", | 276 | .name = "ADNP boot", |
277 | .offset = 0, | 277 | .offset = 0, |
278 | .size = 0xf0000, | 278 | .size = 0xf0000, |
279 | }, | 279 | }, |
280 | { | 280 | { |
281 | .name = "ADNP system BIOS", | 281 | .name = "ADNP system BIOS", |
282 | .offset = MTDPART_OFS_NXTBLK, | 282 | .offset = MTDPART_OFS_NXTBLK, |
283 | .size = 0x10000, | 283 | .size = 0x10000, |
284 | #ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED | 284 | #ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED |
@@ -291,7 +291,7 @@ static struct mtd_partition partition_info[]= | |||
291 | .size = 0x2f0000, | 291 | .size = 0x2f0000, |
292 | }, | 292 | }, |
293 | { | 293 | { |
294 | .name = "ADNP system BIOS entry", | 294 | .name = "ADNP system BIOS entry", |
295 | .offset = MTDPART_OFS_NXTBLK, | 295 | .offset = MTDPART_OFS_NXTBLK, |
296 | .size = MTDPART_SIZ_FULL, | 296 | .size = MTDPART_SIZ_FULL, |
297 | #ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED | 297 | #ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED |
@@ -325,9 +325,9 @@ static struct mtd_info *merged_mtd; | |||
325 | 325 | ||
326 | static struct mtd_partition higlvl_partition_info[]= | 326 | static struct mtd_partition higlvl_partition_info[]= |
327 | { | 327 | { |
328 | { | 328 | { |
329 | .name = "ADNP boot block", | 329 | .name = "ADNP boot block", |
330 | .offset = 0, | 330 | .offset = 0, |
331 | .size = CONFIG_MTD_DILNETPC_BOOTSIZE, | 331 | .size = CONFIG_MTD_DILNETPC_BOOTSIZE, |
332 | }, | 332 | }, |
333 | { | 333 | { |
@@ -335,8 +335,8 @@ static struct mtd_partition higlvl_partition_info[]= | |||
335 | .offset = MTDPART_OFS_NXTBLK, | 335 | .offset = MTDPART_OFS_NXTBLK, |
336 | .size = ADNP_WINDOW_SIZE-CONFIG_MTD_DILNETPC_BOOTSIZE-0x20000, | 336 | .size = ADNP_WINDOW_SIZE-CONFIG_MTD_DILNETPC_BOOTSIZE-0x20000, |
337 | }, | 337 | }, |
338 | { | 338 | { |
339 | .name = "ADNP system BIOS + BIOS Entry", | 339 | .name = "ADNP system BIOS + BIOS Entry", |
340 | .offset = MTDPART_OFS_NXTBLK, | 340 | .offset = MTDPART_OFS_NXTBLK, |
341 | .size = MTDPART_SIZ_FULL, | 341 | .size = MTDPART_SIZ_FULL, |
342 | #ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED | 342 | #ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED |
@@ -371,7 +371,7 @@ static int __init init_dnpc(void) | |||
371 | 371 | ||
372 | /* | 372 | /* |
373 | ** determine hardware (DNP/ADNP/invalid) | 373 | ** determine hardware (DNP/ADNP/invalid) |
374 | */ | 374 | */ |
375 | if((is_dnp = dnp_adnp_probe()) < 0) | 375 | if((is_dnp = dnp_adnp_probe()) < 0) |
376 | return -ENXIO; | 376 | return -ENXIO; |
377 | 377 | ||
@@ -397,13 +397,13 @@ static int __init init_dnpc(void) | |||
397 | ++dnpc_map.name; | 397 | ++dnpc_map.name; |
398 | for(i = 0; i < NUM_PARTITIONS; i++) | 398 | for(i = 0; i < NUM_PARTITIONS; i++) |
399 | ++partition_info[i].name; | 399 | ++partition_info[i].name; |
400 | higlvl_partition_info[1].size = DNP_WINDOW_SIZE - | 400 | higlvl_partition_info[1].size = DNP_WINDOW_SIZE - |
401 | CONFIG_MTD_DILNETPC_BOOTSIZE - 0x20000; | 401 | CONFIG_MTD_DILNETPC_BOOTSIZE - 0x20000; |
402 | for(i = 0; i < NUM_HIGHLVL_PARTITIONS; i++) | 402 | for(i = 0; i < NUM_HIGHLVL_PARTITIONS; i++) |
403 | ++higlvl_partition_info[i].name; | 403 | ++higlvl_partition_info[i].name; |
404 | } | 404 | } |
405 | 405 | ||
406 | printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n", | 406 | printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n", |
407 | is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys); | 407 | is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys); |
408 | 408 | ||
409 | dnpc_map.virt = ioremap_nocache(dnpc_map.phys, dnpc_map.size); | 409 | dnpc_map.virt = ioremap_nocache(dnpc_map.phys, dnpc_map.size); |
@@ -436,7 +436,7 @@ static int __init init_dnpc(void) | |||
436 | iounmap(dnpc_map.virt); | 436 | iounmap(dnpc_map.virt); |
437 | return -ENXIO; | 437 | return -ENXIO; |
438 | } | 438 | } |
439 | 439 | ||
440 | mymtd->owner = THIS_MODULE; | 440 | mymtd->owner = THIS_MODULE; |
441 | 441 | ||
442 | /* | 442 | /* |
diff --git a/drivers/mtd/maps/dmv182.c b/drivers/mtd/maps/dmv182.c index b9bc63503e26..b993ac01a9a5 100644 --- a/drivers/mtd/maps/dmv182.c +++ b/drivers/mtd/maps/dmv182.c | |||
@@ -1,10 +1,10 @@ | |||
1 | 1 | ||
2 | /* | 2 | /* |
3 | * drivers/mtd/maps/svme182.c | 3 | * drivers/mtd/maps/svme182.c |
4 | * | 4 | * |
5 | * Flash map driver for the Dy4 SVME182 board | 5 | * Flash map driver for the Dy4 SVME182 board |
6 | * | 6 | * |
7 | * $Id: dmv182.c,v 1.5 2004/11/04 13:24:14 gleixner Exp $ | 7 | * $Id: dmv182.c,v 1.6 2005/11/07 11:14:26 gleixner Exp $ |
8 | * | 8 | * |
9 | * Copyright 2003-2004, TimeSys Corporation | 9 | * Copyright 2003-2004, TimeSys Corporation |
10 | * | 10 | * |
@@ -104,7 +104,7 @@ static int __init init_svme182(void) | |||
104 | partitions = svme182_partitions; | 104 | partitions = svme182_partitions; |
105 | 105 | ||
106 | svme182_map.virt = ioremap(FLASH_BASE_ADDR, svme182_map.size); | 106 | svme182_map.virt = ioremap(FLASH_BASE_ADDR, svme182_map.size); |
107 | 107 | ||
108 | if (svme182_map.virt == 0) { | 108 | if (svme182_map.virt == 0) { |
109 | printk("Failed to ioremap FLASH memory area.\n"); | 109 | printk("Failed to ioremap FLASH memory area.\n"); |
110 | return -EIO; | 110 | return -EIO; |
diff --git a/drivers/mtd/maps/ebony.c b/drivers/mtd/maps/ebony.c index b9d9cf4854b6..c0daf58357ca 100644 --- a/drivers/mtd/maps/ebony.c +++ b/drivers/mtd/maps/ebony.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: ebony.c,v 1.15 2004/12/09 18:39:54 holindho Exp $ | 2 | * $Id: ebony.c,v 1.16 2005/11/07 11:14:26 gleixner Exp $ |
3 | * | 3 | * |
4 | * Mapping for Ebony user flash | 4 | * Mapping for Ebony user flash |
5 | * | 5 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 6 | * Matt Porter <mporter@kernel.crashing.org> |
@@ -85,7 +85,7 @@ int __init init_ebony(void) | |||
85 | small_flash_base = EBONY_SMALL_FLASH_LOW2; | 85 | small_flash_base = EBONY_SMALL_FLASH_LOW2; |
86 | else | 86 | else |
87 | small_flash_base = EBONY_SMALL_FLASH_LOW1; | 87 | small_flash_base = EBONY_SMALL_FLASH_LOW1; |
88 | 88 | ||
89 | if (EBONY_BOOT_SMALL_FLASH(fpga0_reg) && | 89 | if (EBONY_BOOT_SMALL_FLASH(fpga0_reg) && |
90 | !EBONY_ONBRD_FLASH_EN(fpga0_reg)) | 90 | !EBONY_ONBRD_FLASH_EN(fpga0_reg)) |
91 | large_flash_base = EBONY_LARGE_FLASH_LOW; | 91 | large_flash_base = EBONY_LARGE_FLASH_LOW; |
diff --git a/drivers/mtd/maps/edb7312.c b/drivers/mtd/maps/edb7312.c index 8b0da394f3fa..b48a3473ffc1 100644 --- a/drivers/mtd/maps/edb7312.c +++ b/drivers/mtd/maps/edb7312.c | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: edb7312.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ | 2 | * $Id: edb7312.c,v 1.14 2005/11/07 11:14:27 gleixner Exp $ |
3 | * | 3 | * |
4 | * Handle mapping of the NOR flash on Cogent EDB7312 boards | 4 | * Handle mapping of the NOR flash on Cogent EDB7312 boards |
5 | * | 5 | * |
6 | * Copyright 2002 SYSGO Real-Time Solutions GmbH | 6 | * Copyright 2002 SYSGO Real-Time Solutions GmbH |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
@@ -46,7 +46,7 @@ struct map_info edb7312nor_map = { | |||
46 | #ifdef CONFIG_MTD_PARTITIONS | 46 | #ifdef CONFIG_MTD_PARTITIONS |
47 | 47 | ||
48 | /* | 48 | /* |
49 | * MTD partitioning stuff | 49 | * MTD partitioning stuff |
50 | */ | 50 | */ |
51 | static struct mtd_partition static_partitions[3] = | 51 | static struct mtd_partition static_partitions[3] = |
52 | { | 52 | { |
@@ -80,7 +80,7 @@ int __init init_edb7312nor(void) | |||
80 | const char **type; | 80 | const char **type; |
81 | const char *part_type = 0; | 81 | const char *part_type = 0; |
82 | 82 | ||
83 | printk(KERN_NOTICE MSG_PREFIX "0x%08x at 0x%08x\n", | 83 | printk(KERN_NOTICE MSG_PREFIX "0x%08x at 0x%08x\n", |
84 | WINDOW_SIZE, WINDOW_ADDR); | 84 | WINDOW_SIZE, WINDOW_ADDR); |
85 | edb7312nor_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); | 85 | edb7312nor_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); |
86 | 86 | ||
@@ -88,7 +88,7 @@ int __init init_edb7312nor(void) | |||
88 | printk(MSG_PREFIX "failed to ioremap\n"); | 88 | printk(MSG_PREFIX "failed to ioremap\n"); |
89 | return -EIO; | 89 | return -EIO; |
90 | } | 90 | } |
91 | 91 | ||
92 | simple_map_init(&edb7312nor_map); | 92 | simple_map_init(&edb7312nor_map); |
93 | 93 | ||
94 | mymtd = 0; | 94 | mymtd = 0; |
diff --git a/drivers/mtd/maps/epxa10db-flash.c b/drivers/mtd/maps/epxa10db-flash.c index 1df6188926b3..265b079fe934 100644 --- a/drivers/mtd/maps/epxa10db-flash.c +++ b/drivers/mtd/maps/epxa10db-flash.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * Copyright (C) 2001 Altera Corporation | 5 | * Copyright (C) 2001 Altera Corporation |
6 | * Copyright (C) 2001 Red Hat, Inc. | 6 | * Copyright (C) 2001 Red Hat, Inc. |
7 | * | 7 | * |
8 | * $Id: epxa10db-flash.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ | 8 | * $Id: epxa10db-flash.c,v 1.15 2005/11/07 11:14:27 gleixner Exp $ |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
@@ -62,7 +62,7 @@ static const char *probes[] = { "RedBoot", "afs", NULL }; | |||
62 | static int __init epxa_mtd_init(void) | 62 | static int __init epxa_mtd_init(void) |
63 | { | 63 | { |
64 | int i; | 64 | int i; |
65 | 65 | ||
66 | printk(KERN_NOTICE "%s flash device: 0x%x at 0x%x\n", BOARD_NAME, FLASH_SIZE, FLASH_START); | 66 | printk(KERN_NOTICE "%s flash device: 0x%x at 0x%x\n", BOARD_NAME, FLASH_SIZE, FLASH_START); |
67 | 67 | ||
68 | epxa_map.virt = ioremap(FLASH_START, FLASH_SIZE); | 68 | epxa_map.virt = ioremap(FLASH_START, FLASH_SIZE); |
@@ -126,8 +126,8 @@ static void __exit epxa_mtd_cleanup(void) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | 128 | ||
129 | /* | 129 | /* |
130 | * This will do for now, once we decide which bootldr we're finally | 130 | * This will do for now, once we decide which bootldr we're finally |
131 | * going to use then we'll remove this function and do it properly | 131 | * going to use then we'll remove this function and do it properly |
132 | * | 132 | * |
133 | * Partions are currently (as offsets from base of flash): | 133 | * Partions are currently (as offsets from base of flash): |
@@ -140,7 +140,7 @@ static int __init epxa_default_partitions(struct mtd_info *master, struct mtd_pa | |||
140 | struct mtd_partition *parts; | 140 | struct mtd_partition *parts; |
141 | int ret, i; | 141 | int ret, i; |
142 | int npartitions = 0; | 142 | int npartitions = 0; |
143 | char *names; | 143 | char *names; |
144 | const char *name = "jffs"; | 144 | const char *name = "jffs"; |
145 | 145 | ||
146 | printk("Using default partitions for %s\n",BOARD_NAME); | 146 | printk("Using default partitions for %s\n",BOARD_NAME); |
@@ -152,7 +152,7 @@ static int __init epxa_default_partitions(struct mtd_info *master, struct mtd_pa | |||
152 | goto out; | 152 | goto out; |
153 | } | 153 | } |
154 | i=0; | 154 | i=0; |
155 | names = (char *)&parts[npartitions]; | 155 | names = (char *)&parts[npartitions]; |
156 | parts[i].name = names; | 156 | parts[i].name = names; |
157 | names += strlen(name) + 1; | 157 | names += strlen(name) + 1; |
158 | strcpy(parts[i].name, name); | 158 | strcpy(parts[i].name, name); |
diff --git a/drivers/mtd/maps/fortunet.c b/drivers/mtd/maps/fortunet.c index 00f7bbe5479e..c6bf4e1219ef 100644 --- a/drivers/mtd/maps/fortunet.c +++ b/drivers/mtd/maps/fortunet.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* fortunet.c memory map | 1 | /* fortunet.c memory map |
2 | * | 2 | * |
3 | * $Id: fortunet.c,v 1.9 2004/11/04 13:24:14 gleixner Exp $ | 3 | * $Id: fortunet.c,v 1.11 2005/11/07 11:14:27 gleixner Exp $ |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
@@ -212,7 +212,7 @@ int __init init_fortunet(void) | |||
212 | 212 | ||
213 | map_regions[ix].map_info.phys = map_regions[ix].window_addr_physical, | 213 | map_regions[ix].map_info.phys = map_regions[ix].window_addr_physical, |
214 | 214 | ||
215 | map_regions[ix].map_info.virt = | 215 | map_regions[ix].map_info.virt = |
216 | ioremap_nocache( | 216 | ioremap_nocache( |
217 | map_regions[ix].window_addr_physical, | 217 | map_regions[ix].window_addr_physical, |
218 | map_regions[ix].map_info.size); | 218 | map_regions[ix].map_info.size); |
diff --git a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c index c73828171d9b..319094821101 100644 --- a/drivers/mtd/maps/h720x-flash.c +++ b/drivers/mtd/maps/h720x-flash.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * Flash memory access on Hynix GMS30C7201/HMS30C7202 based | 2 | * Flash memory access on Hynix GMS30C7201/HMS30C7202 based |
3 | * evaluation boards | 3 | * evaluation boards |
4 | * | 4 | * |
5 | * $Id: h720x-flash.c,v 1.11 2004/11/04 13:24:14 gleixner Exp $ | 5 | * $Id: h720x-flash.c,v 1.12 2005/11/07 11:14:27 gleixner Exp $ |
6 | * | 6 | * |
7 | * (C) 2002 Jungjun Kim <jungjun.kim@hynix.com> | 7 | * (C) 2002 Jungjun Kim <jungjun.kim@hynix.com> |
8 | * 2003 Thomas Gleixner <tglx@linutronix.de> | 8 | * 2003 Thomas Gleixner <tglx@linutronix.de> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
@@ -72,7 +72,7 @@ int __init h720x_mtd_init(void) | |||
72 | { | 72 | { |
73 | 73 | ||
74 | char *part_type = NULL; | 74 | char *part_type = NULL; |
75 | 75 | ||
76 | h720x_map.virt = ioremap(FLASH_PHYS, FLASH_SIZE); | 76 | h720x_map.virt = ioremap(FLASH_PHYS, FLASH_SIZE); |
77 | 77 | ||
78 | if (!h720x_map.virt) { | 78 | if (!h720x_map.virt) { |
@@ -91,7 +91,7 @@ int __init h720x_mtd_init(void) | |||
91 | h720x_map.bankwidth = 2; | 91 | h720x_map.bankwidth = 2; |
92 | mymtd = do_map_probe("cfi_probe", &h720x_map); | 92 | mymtd = do_map_probe("cfi_probe", &h720x_map); |
93 | } | 93 | } |
94 | 94 | ||
95 | if (mymtd) { | 95 | if (mymtd) { |
96 | mymtd->owner = THIS_MODULE; | 96 | mymtd->owner = THIS_MODULE; |
97 | 97 | ||
@@ -124,11 +124,11 @@ static void __exit h720x_mtd_cleanup(void) | |||
124 | del_mtd_partitions(mymtd); | 124 | del_mtd_partitions(mymtd); |
125 | map_destroy(mymtd); | 125 | map_destroy(mymtd); |
126 | } | 126 | } |
127 | 127 | ||
128 | /* Free partition info, if commandline partition was used */ | 128 | /* Free partition info, if commandline partition was used */ |
129 | if (mtd_parts && (mtd_parts != h720x_partitions)) | 129 | if (mtd_parts && (mtd_parts != h720x_partitions)) |
130 | kfree (mtd_parts); | 130 | kfree (mtd_parts); |
131 | 131 | ||
132 | if (h720x_map.virt) { | 132 | if (h720x_map.virt) { |
133 | iounmap((void *)h720x_map.virt); | 133 | iounmap((void *)h720x_map.virt); |
134 | h720x_map.virt = 0; | 134 | h720x_map.virt = 0; |
diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c index e505207cd489..aa9720ec4cd5 100644 --- a/drivers/mtd/maps/ichxrom.c +++ b/drivers/mtd/maps/ichxrom.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * ichxrom.c | 2 | * ichxrom.c |
3 | * | 3 | * |
4 | * Normal mappings of chips in physical memory | 4 | * Normal mappings of chips in physical memory |
5 | * $Id: ichxrom.c,v 1.18 2005/07/07 10:26:20 dwmw2 Exp $ | 5 | * $Id: ichxrom.c,v 1.19 2005/11/07 11:14:27 gleixner Exp $ |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
@@ -101,7 +101,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev, | |||
101 | * you can only really attach a FWH to an ICHX there | 101 | * you can only really attach a FWH to an ICHX there |
102 | * a number of simplifications you can make. | 102 | * a number of simplifications you can make. |
103 | * | 103 | * |
104 | * Also you can page firmware hubs if an 8MB window isn't enough | 104 | * Also you can page firmware hubs if an 8MB window isn't enough |
105 | * but don't currently handle that case either. | 105 | * but don't currently handle that case either. |
106 | */ | 106 | */ |
107 | window->pdev = pdev; | 107 | window->pdev = pdev; |
@@ -144,7 +144,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev, | |||
144 | window->phys = 0xfff00000; | 144 | window->phys = 0xfff00000; |
145 | } | 145 | } |
146 | else if ((byte & 0x80) == 0x80) { | 146 | else if ((byte & 0x80) == 0x80) { |
147 | window->phys = 0xfff80000; | 147 | window->phys = 0xfff80000; |
148 | } | 148 | } |
149 | 149 | ||
150 | if (window->phys == 0) { | 150 | if (window->phys == 0) { |
@@ -233,7 +233,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev, | |||
233 | * in a factory setting. So in-place programming | 233 | * in a factory setting. So in-place programming |
234 | * needs to use a different method. | 234 | * needs to use a different method. |
235 | */ | 235 | */ |
236 | for(map->map.bankwidth = 32; map->map.bankwidth; | 236 | for(map->map.bankwidth = 32; map->map.bankwidth; |
237 | map->map.bankwidth >>= 1) | 237 | map->map.bankwidth >>= 1) |
238 | { | 238 | { |
239 | char **probe_type; | 239 | char **probe_type; |
@@ -286,7 +286,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev, | |||
286 | for(i = 0; i < cfi->numchips; i++) { | 286 | for(i = 0; i < cfi->numchips; i++) { |
287 | cfi->chips[i].start += offset; | 287 | cfi->chips[i].start += offset; |
288 | } | 288 | } |
289 | 289 | ||
290 | /* Now that the mtd devices is complete claim and export it */ | 290 | /* Now that the mtd devices is complete claim and export it */ |
291 | map->mtd->owner = THIS_MODULE; | 291 | map->mtd->owner = THIS_MODULE; |
292 | if (add_mtd_device(map->mtd)) { | 292 | if (add_mtd_device(map->mtd)) { |
@@ -325,11 +325,11 @@ static void __devexit ichxrom_remove_one (struct pci_dev *pdev) | |||
325 | } | 325 | } |
326 | 326 | ||
327 | static struct pci_device_id ichxrom_pci_tbl[] __devinitdata = { | 327 | static struct pci_device_id ichxrom_pci_tbl[] __devinitdata = { |
328 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, | 328 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, |
329 | PCI_ANY_ID, PCI_ANY_ID, }, | 329 | PCI_ANY_ID, PCI_ANY_ID, }, |
330 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, | 330 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, |
331 | PCI_ANY_ID, PCI_ANY_ID, }, | 331 | PCI_ANY_ID, PCI_ANY_ID, }, |
332 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, | 332 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, |
333 | PCI_ANY_ID, PCI_ANY_ID, }, | 333 | PCI_ANY_ID, PCI_ANY_ID, }, |
334 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, | 334 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, |
335 | PCI_ANY_ID, PCI_ANY_ID, }, | 335 | PCI_ANY_ID, PCI_ANY_ID, }, |
diff --git a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c index cb39172c81d2..ba7f40311a7e 100644 --- a/drivers/mtd/maps/impa7.c +++ b/drivers/mtd/maps/impa7.c | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: impa7.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $ | 2 | * $Id: impa7.c,v 1.14 2005/11/07 11:14:27 gleixner Exp $ |
3 | * | 3 | * |
4 | * Handle mapping of the NOR flash on implementa A7 boards | 4 | * Handle mapping of the NOR flash on implementa A7 boards |
5 | * | 5 | * |
6 | * Copyright 2002 SYSGO Real-Time Solutions GmbH | 6 | * Copyright 2002 SYSGO Real-Time Solutions GmbH |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
@@ -55,7 +55,7 @@ static struct map_info impa7_map[NUM_FLASHBANKS] = { | |||
55 | #ifdef CONFIG_MTD_PARTITIONS | 55 | #ifdef CONFIG_MTD_PARTITIONS |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * MTD partitioning stuff | 58 | * MTD partitioning stuff |
59 | */ | 59 | */ |
60 | static struct mtd_partition static_partitions[] = | 60 | static struct mtd_partition static_partitions[] = |
61 | { | 61 | { |
@@ -108,9 +108,9 @@ int __init init_impa7(void) | |||
108 | impa7_mtd[i]->owner = THIS_MODULE; | 108 | impa7_mtd[i]->owner = THIS_MODULE; |
109 | devicesfound++; | 109 | devicesfound++; |
110 | #ifdef CONFIG_MTD_PARTITIONS | 110 | #ifdef CONFIG_MTD_PARTITIONS |
111 | mtd_parts_nb[i] = parse_mtd_partitions(impa7_mtd[i], | 111 | mtd_parts_nb[i] = parse_mtd_partitions(impa7_mtd[i], |
112 | probes, | 112 | probes, |
113 | &mtd_parts[i], | 113 | &mtd_parts[i], |
114 | 0); | 114 | 0); |
115 | if (mtd_parts_nb[i] > 0) { | 115 | if (mtd_parts_nb[i] > 0) { |
116 | part_type = "command line"; | 116 | part_type = "command line"; |
@@ -121,16 +121,16 @@ int __init init_impa7(void) | |||
121 | } | 121 | } |
122 | 122 | ||
123 | printk(KERN_NOTICE MSG_PREFIX | 123 | printk(KERN_NOTICE MSG_PREFIX |
124 | "using %s partition definition\n", | 124 | "using %s partition definition\n", |
125 | part_type); | 125 | part_type); |
126 | add_mtd_partitions(impa7_mtd[i], | 126 | add_mtd_partitions(impa7_mtd[i], |
127 | mtd_parts[i], mtd_parts_nb[i]); | 127 | mtd_parts[i], mtd_parts_nb[i]); |
128 | #else | 128 | #else |
129 | add_mtd_device(impa7_mtd[i]); | 129 | add_mtd_device(impa7_mtd[i]); |
130 | 130 | ||
131 | #endif | 131 | #endif |
132 | } | 132 | } |
133 | else | 133 | else |
134 | iounmap((void *)impa7_map[i].virt); | 134 | iounmap((void *)impa7_map[i].virt); |
135 | } | 135 | } |
136 | return devicesfound == 0 ? -ENXIO : 0; | 136 | return devicesfound == 0 ? -ENXIO : 0; |
diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c index d14a0185b8f4..549614693ac8 100644 --- a/drivers/mtd/maps/integrator-flash.c +++ b/drivers/mtd/maps/integrator-flash.c | |||
@@ -1,28 +1,28 @@ | |||
1 | /*====================================================================== | 1 | /*====================================================================== |
2 | 2 | ||
3 | drivers/mtd/maps/integrator-flash.c: ARM Integrator flash map driver | 3 | drivers/mtd/maps/integrator-flash.c: ARM Integrator flash map driver |
4 | 4 | ||
5 | Copyright (C) 2000 ARM Limited | 5 | Copyright (C) 2000 ARM Limited |
6 | Copyright (C) 2003 Deep Blue Solutions Ltd. | 6 | Copyright (C) 2003 Deep Blue Solutions Ltd. |
7 | 7 | ||
8 | This program is free software; you can redistribute it and/or modify | 8 | This program is free software; you can redistribute it and/or modify |
9 | it under the terms of the GNU General Public License as published by | 9 | it under the terms of the GNU General Public License as published by |
10 | the Free Software Foundation; either version 2 of the License, or | 10 | the Free Software Foundation; either version 2 of the License, or |
11 | (at your option) any later version. | 11 | (at your option) any later version. |
12 | 12 | ||
13 | This program is distributed in the hope that it will be useful, | 13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. | 16 | GNU General Public License for more details. |
17 | 17 | ||
18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software | 19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | 21 | ||
22 | This is access code for flashes using ARM's flash partitioning | 22 | This is access code for flashes using ARM's flash partitioning |
23 | standards. | 23 | standards. |
24 | 24 | ||
25 | $Id: integrator-flash.c,v 1.18 2004/11/01 13:26:15 rmk Exp $ | 25 | $Id: integrator-flash.c,v 1.20 2005/11/07 11:14:27 gleixner Exp $ |
26 | 26 | ||
27 | ======================================================================*/ | 27 | ======================================================================*/ |
28 | 28 | ||
diff --git a/drivers/mtd/maps/ipaq-flash.c b/drivers/mtd/maps/ipaq-flash.c index 712401810841..fbace127df30 100644 --- a/drivers/mtd/maps/ipaq-flash.c +++ b/drivers/mtd/maps/ipaq-flash.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * Flash memory access on iPAQ Handhelds (either SA1100 or PXA250 based) | 2 | * Flash memory access on iPAQ Handhelds (either SA1100 or PXA250 based) |
3 | * | 3 | * |
4 | * (C) 2000 Nicolas Pitre <nico@cam.org> | 4 | * (C) 2000 Nicolas Pitre <nico@cam.org> |
5 | * (C) 2002 Hewlett-Packard Company <jamey.hicks@hp.com> | 5 | * (C) 2002 Hewlett-Packard Company <jamey.hicks@hp.com> |
6 | * (C) 2003 Christian Pellegrin <chri@ascensit.com>, <chri@infis.univ.ts.it>: concatenation of multiple flashes | 6 | * (C) 2003 Christian Pellegrin <chri@ascensit.com>, <chri@infis.univ.ts.it>: concatenation of multiple flashes |
7 | * | 7 | * |
8 | * $Id: ipaq-flash.c,v 1.3 2004/11/04 13:24:15 gleixner Exp $ | 8 | * $Id: ipaq-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
@@ -107,7 +107,7 @@ static struct mtd_partition h3xxx_partitions[] = { | |||
107 | #ifndef CONFIG_LAB | 107 | #ifndef CONFIG_LAB |
108 | mask_flags: MTD_WRITEABLE, /* force read-only */ | 108 | mask_flags: MTD_WRITEABLE, /* force read-only */ |
109 | #endif | 109 | #endif |
110 | }, | 110 | }, |
111 | { | 111 | { |
112 | name: "H3XXX root jffs2", | 112 | name: "H3XXX root jffs2", |
113 | #ifndef CONFIG_LAB | 113 | #ifndef CONFIG_LAB |
@@ -148,7 +148,7 @@ static DEFINE_SPINLOCK(ipaq_vpp_lock); | |||
148 | static void h3xxx_set_vpp(struct map_info *map, int vpp) | 148 | static void h3xxx_set_vpp(struct map_info *map, int vpp) |
149 | { | 149 | { |
150 | static int nest = 0; | 150 | static int nest = 0; |
151 | 151 | ||
152 | spin_lock(&ipaq_vpp_lock); | 152 | spin_lock(&ipaq_vpp_lock); |
153 | if (vpp) | 153 | if (vpp) |
154 | nest++; | 154 | nest++; |
@@ -191,7 +191,7 @@ static unsigned long cs_phys[] = { | |||
191 | SA1100_CS3_PHYS, | 191 | SA1100_CS3_PHYS, |
192 | SA1100_CS4_PHYS, | 192 | SA1100_CS4_PHYS, |
193 | SA1100_CS5_PHYS, | 193 | SA1100_CS5_PHYS, |
194 | #else | 194 | #else |
195 | PXA_CS0_PHYS, | 195 | PXA_CS0_PHYS, |
196 | PXA_CS1_PHYS, | 196 | PXA_CS1_PHYS, |
197 | PXA_CS2_PHYS, | 197 | PXA_CS2_PHYS, |
@@ -216,7 +216,7 @@ int __init ipaq_mtd_init(void) | |||
216 | 216 | ||
217 | /* Default flash bankwidth */ | 217 | /* Default flash bankwidth */ |
218 | // ipaq_map.bankwidth = (MSC0 & MSC_RBW) ? 2 : 4; | 218 | // ipaq_map.bankwidth = (MSC0 & MSC_RBW) ? 2 : 4; |
219 | 219 | ||
220 | if (machine_is_h1900()) | 220 | if (machine_is_h1900()) |
221 | { | 221 | { |
222 | /* For our intents, the h1900 is not a real iPAQ, so we special-case it. */ | 222 | /* For our intents, the h1900 is not a real iPAQ, so we special-case it. */ |
@@ -229,7 +229,7 @@ int __init ipaq_mtd_init(void) | |||
229 | else | 229 | else |
230 | for(i=0; i<MAX_IPAQ_CS; i++) | 230 | for(i=0; i<MAX_IPAQ_CS; i++) |
231 | ipaq_map[i].bankwidth = 4; | 231 | ipaq_map[i].bankwidth = 4; |
232 | 232 | ||
233 | /* | 233 | /* |
234 | * Static partition definition selection | 234 | * Static partition definition selection |
235 | */ | 235 | */ |
@@ -309,7 +309,7 @@ int __init ipaq_mtd_init(void) | |||
309 | return -ENXIO; | 309 | return -ENXIO; |
310 | } else | 310 | } else |
311 | printk(KERN_NOTICE "iPAQ flash: found %d bytes\n", my_sub_mtd[i]->size); | 311 | printk(KERN_NOTICE "iPAQ flash: found %d bytes\n", my_sub_mtd[i]->size); |
312 | 312 | ||
313 | /* do we really need this debugging? --joshua 20030703 */ | 313 | /* do we really need this debugging? --joshua 20030703 */ |
314 | // printk("my_sub_mtd[%d]=%p\n", i, my_sub_mtd[i]); | 314 | // printk("my_sub_mtd[%d]=%p\n", i, my_sub_mtd[i]); |
315 | my_sub_mtd[i]->owner = THIS_MODULE; | 315 | my_sub_mtd[i]->owner = THIS_MODULE; |
@@ -333,11 +333,11 @@ int __init ipaq_mtd_init(void) | |||
333 | #else | 333 | #else |
334 | mymtd = my_sub_mtd[0]; | 334 | mymtd = my_sub_mtd[0]; |
335 | 335 | ||
336 | /* | 336 | /* |
337 | *In the very near future, command line partition parsing | 337 | *In the very near future, command line partition parsing |
338 | * will use the device name as 'mtd-id' instead of a value | 338 | * will use the device name as 'mtd-id' instead of a value |
339 | * passed to the parse_cmdline_partitions() routine. Since | 339 | * passed to the parse_cmdline_partitions() routine. Since |
340 | * the bootldr says 'ipaq', make sure it continues to work. | 340 | * the bootldr says 'ipaq', make sure it continues to work. |
341 | */ | 341 | */ |
342 | mymtd->name = "ipaq"; | 342 | mymtd->name = "ipaq"; |
343 | 343 | ||
@@ -385,7 +385,7 @@ int __init ipaq_mtd_init(void) | |||
385 | */ | 385 | */ |
386 | 386 | ||
387 | i = parse_mtd_partitions(mymtd, part_probes, &parsed_parts, 0); | 387 | i = parse_mtd_partitions(mymtd, part_probes, &parsed_parts, 0); |
388 | 388 | ||
389 | if (i > 0) { | 389 | if (i > 0) { |
390 | nb_parts = parsed_nr_parts = i; | 390 | nb_parts = parsed_nr_parts = i; |
391 | parts = parsed_parts; | 391 | parts = parsed_parts; |
@@ -423,10 +423,10 @@ static void __exit ipaq_mtd_cleanup(void) | |||
423 | #endif | 423 | #endif |
424 | map_destroy(mymtd); | 424 | map_destroy(mymtd); |
425 | #ifdef CONFIG_MTD_CONCAT | 425 | #ifdef CONFIG_MTD_CONCAT |
426 | for(i=0; i<MAX_IPAQ_CS; i++) | 426 | for(i=0; i<MAX_IPAQ_CS; i++) |
427 | #else | 427 | #else |
428 | for(i=1; i<MAX_IPAQ_CS; i++) | 428 | for(i=1; i<MAX_IPAQ_CS; i++) |
429 | #endif | 429 | #endif |
430 | { | 430 | { |
431 | if (my_sub_mtd[i]) | 431 | if (my_sub_mtd[i]) |
432 | map_destroy(my_sub_mtd[i]); | 432 | map_destroy(my_sub_mtd[i]); |
@@ -445,14 +445,14 @@ static int __init h1900_special_case(void) | |||
445 | ipaq_map[0].phys = 0x0; | 445 | ipaq_map[0].phys = 0x0; |
446 | ipaq_map[0].virt = __ioremap(0x0, 0x04000000, 0, 1); | 446 | ipaq_map[0].virt = __ioremap(0x0, 0x04000000, 0, 1); |
447 | ipaq_map[0].bankwidth = 2; | 447 | ipaq_map[0].bankwidth = 2; |
448 | 448 | ||
449 | printk(KERN_NOTICE "iPAQ flash: probing %d-bit flash bus, window=%lx with JEDEC.\n", ipaq_map[0].bankwidth*8, ipaq_map[0].virt); | 449 | printk(KERN_NOTICE "iPAQ flash: probing %d-bit flash bus, window=%lx with JEDEC.\n", ipaq_map[0].bankwidth*8, ipaq_map[0].virt); |
450 | mymtd = do_map_probe("jedec_probe", &ipaq_map[0]); | 450 | mymtd = do_map_probe("jedec_probe", &ipaq_map[0]); |
451 | if (!mymtd) | 451 | if (!mymtd) |
452 | return -ENODEV; | 452 | return -ENODEV; |
453 | add_mtd_device(mymtd); | 453 | add_mtd_device(mymtd); |
454 | printk(KERN_NOTICE "iPAQ flash: registered h1910 flash\n"); | 454 | printk(KERN_NOTICE "iPAQ flash: registered h1910 flash\n"); |
455 | 455 | ||
456 | return 0; | 456 | return 0; |
457 | } | 457 | } |
458 | 458 | ||
diff --git a/drivers/mtd/maps/iq80310.c b/drivers/mtd/maps/iq80310.c index 558d014e7acc..5b2fd3617c50 100644 --- a/drivers/mtd/maps/iq80310.c +++ b/drivers/mtd/maps/iq80310.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: iq80310.c,v 1.20 2004/11/04 13:24:15 gleixner Exp $ | 2 | * $Id: iq80310.c,v 1.21 2005/11/07 11:14:27 gleixner Exp $ |
3 | * | 3 | * |
4 | * Mapping for the Intel XScale IQ80310 evaluation board | 4 | * Mapping for the Intel XScale IQ80310 evaluation board |
5 | * | 5 | * |
6 | * Author: Nicolas Pitre | 6 | * Author: Nicolas Pitre |
7 | * Copyright: (C) 2001 MontaVista Software Inc. | 7 | * Copyright: (C) 2001 MontaVista Software Inc. |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c index 78c68f49be83..aa29a4a741bf 100644 --- a/drivers/mtd/maps/ixp2000.c +++ b/drivers/mtd/maps/ixp2000.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: ixp2000.c,v 1.8 2005/11/07 08:09:02 gleixner Exp $ | 2 | * $Id: ixp2000.c,v 1.9 2005/11/07 11:14:27 gleixner Exp $ |
3 | * | 3 | * |
4 | * drivers/mtd/maps/ixp2000.c | 4 | * drivers/mtd/maps/ixp2000.c |
5 | * | 5 | * |
@@ -14,7 +14,7 @@ | |||
14 | * This program is free software; you can redistribute it and/or modify | 14 | * This program is free software; you can redistribute it and/or modify |
15 | * it under the terms of the GNU General Public License version 2 as | 15 | * it under the terms of the GNU General Public License version 2 as |
16 | * published by the Free Software Foundation. | 16 | * published by the Free Software Foundation. |
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
@@ -46,8 +46,8 @@ struct ixp2000_flash_info { | |||
46 | }; | 46 | }; |
47 | 47 | ||
48 | static inline unsigned long flash_bank_setup(struct map_info *map, unsigned long ofs) | 48 | static inline unsigned long flash_bank_setup(struct map_info *map, unsigned long ofs) |
49 | { | 49 | { |
50 | unsigned long (*set_bank)(unsigned long) = | 50 | unsigned long (*set_bank)(unsigned long) = |
51 | (unsigned long(*)(unsigned long))map->map_priv_2; | 51 | (unsigned long(*)(unsigned long))map->map_priv_2; |
52 | 52 | ||
53 | return (set_bank ? set_bank(ofs) : ofs); | 53 | return (set_bank ? set_bank(ofs) : ofs); |
@@ -55,8 +55,8 @@ static inline unsigned long flash_bank_setup(struct map_info *map, unsigned long | |||
55 | 55 | ||
56 | #ifdef __ARMEB__ | 56 | #ifdef __ARMEB__ |
57 | /* | 57 | /* |
58 | * Rev A0 and A1 of IXP2400 silicon have a broken addressing unit which | 58 | * Rev A0 and A1 of IXP2400 silicon have a broken addressing unit which |
59 | * causes the lower address bits to be XORed with 0x11 on 8 bit accesses | 59 | * causes the lower address bits to be XORed with 0x11 on 8 bit accesses |
60 | * and XORed with 0x10 on 16 bit accesses. See the spec update, erratum 44. | 60 | * and XORed with 0x10 on 16 bit accesses. See the spec update, erratum 44. |
61 | */ | 61 | */ |
62 | static int erratum44_workaround = 0; | 62 | static int erratum44_workaround = 0; |
@@ -90,7 +90,7 @@ static void ixp2000_flash_copy_from(struct map_info *map, void *to, | |||
90 | unsigned long from, ssize_t len) | 90 | unsigned long from, ssize_t len) |
91 | { | 91 | { |
92 | from = flash_bank_setup(map, from); | 92 | from = flash_bank_setup(map, from); |
93 | while(len--) | 93 | while(len--) |
94 | *(__u8 *) to++ = *(__u8 *)(map->map_priv_1 + from++); | 94 | *(__u8 *) to++ = *(__u8 *)(map->map_priv_1 + from++); |
95 | } | 95 | } |
96 | 96 | ||
@@ -149,11 +149,11 @@ static int ixp2000_flash_probe(struct device *_dev) | |||
149 | static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; | 149 | static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; |
150 | struct platform_device *dev = to_platform_device(_dev); | 150 | struct platform_device *dev = to_platform_device(_dev); |
151 | struct ixp2000_flash_data *ixp_data = dev->dev.platform_data; | 151 | struct ixp2000_flash_data *ixp_data = dev->dev.platform_data; |
152 | struct flash_platform_data *plat; | 152 | struct flash_platform_data *plat; |
153 | struct ixp2000_flash_info *info; | 153 | struct ixp2000_flash_info *info; |
154 | unsigned long window_size; | 154 | unsigned long window_size; |
155 | int err = -1; | 155 | int err = -1; |
156 | 156 | ||
157 | if (!ixp_data) | 157 | if (!ixp_data) |
158 | return -ENODEV; | 158 | return -ENODEV; |
159 | 159 | ||
@@ -162,7 +162,7 @@ static int ixp2000_flash_probe(struct device *_dev) | |||
162 | return -ENODEV; | 162 | return -ENODEV; |
163 | 163 | ||
164 | window_size = dev->resource->end - dev->resource->start + 1; | 164 | window_size = dev->resource->end - dev->resource->start + 1; |
165 | dev_info(_dev, "Probe of IXP2000 flash(%d banks x %dMiB)\n", | 165 | dev_info(_dev, "Probe of IXP2000 flash(%d banks x %dMiB)\n", |
166 | ixp_data->nr_banks, ((u32)window_size >> 20)); | 166 | ixp_data->nr_banks, ((u32)window_size >> 20)); |
167 | 167 | ||
168 | if (plat->width != 1) { | 168 | if (plat->width != 1) { |
@@ -175,7 +175,7 @@ static int ixp2000_flash_probe(struct device *_dev) | |||
175 | if(!info) { | 175 | if(!info) { |
176 | err = -ENOMEM; | 176 | err = -ENOMEM; |
177 | goto Error; | 177 | goto Error; |
178 | } | 178 | } |
179 | memzero(info, sizeof(struct ixp2000_flash_info)); | 179 | memzero(info, sizeof(struct ixp2000_flash_info)); |
180 | 180 | ||
181 | dev_set_drvdata(&dev->dev, info); | 181 | dev_set_drvdata(&dev->dev, info); |
@@ -185,7 +185,7 @@ static int ixp2000_flash_probe(struct device *_dev) | |||
185 | * not attempt to do a direct access on us. | 185 | * not attempt to do a direct access on us. |
186 | */ | 186 | */ |
187 | info->map.phys = NO_XIP; | 187 | info->map.phys = NO_XIP; |
188 | 188 | ||
189 | info->nr_banks = ixp_data->nr_banks; | 189 | info->nr_banks = ixp_data->nr_banks; |
190 | info->map.size = ixp_data->nr_banks * window_size; | 190 | info->map.size = ixp_data->nr_banks * window_size; |
191 | info->map.bankwidth = 1; | 191 | info->map.bankwidth = 1; |
@@ -201,8 +201,8 @@ static int ixp2000_flash_probe(struct device *_dev) | |||
201 | info->map.copy_from = ixp2000_flash_copy_from; | 201 | info->map.copy_from = ixp2000_flash_copy_from; |
202 | info->map.copy_to = ixp2000_flash_copy_to; | 202 | info->map.copy_to = ixp2000_flash_copy_to; |
203 | 203 | ||
204 | info->res = request_mem_region(dev->resource->start, | 204 | info->res = request_mem_region(dev->resource->start, |
205 | dev->resource->end - dev->resource->start + 1, | 205 | dev->resource->end - dev->resource->start + 1, |
206 | dev->dev.bus_id); | 206 | dev->dev.bus_id); |
207 | if (!info->res) { | 207 | if (!info->res) { |
208 | dev_err(_dev, "Could not reserve memory region\n"); | 208 | dev_err(_dev, "Could not reserve memory region\n"); |
@@ -210,7 +210,7 @@ static int ixp2000_flash_probe(struct device *_dev) | |||
210 | goto Error; | 210 | goto Error; |
211 | } | 211 | } |
212 | 212 | ||
213 | info->map.map_priv_1 = (unsigned long) ioremap(dev->resource->start, | 213 | info->map.map_priv_1 = (unsigned long) ioremap(dev->resource->start, |
214 | dev->resource->end - dev->resource->start + 1); | 214 | dev->resource->end - dev->resource->start + 1); |
215 | if (!info->map.map_priv_1) { | 215 | if (!info->map.map_priv_1) { |
216 | dev_err(_dev, "Failed to ioremap flash region\n"); | 216 | dev_err(_dev, "Failed to ioremap flash region\n"); |
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index c510c736ed97..471553a3da69 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: ixp4xx.c,v 1.11 2005/11/06 11:15:51 gleixner Exp $ | 2 | * $Id: ixp4xx.c,v 1.12 2005/11/07 11:14:27 gleixner Exp $ |
3 | * | 3 | * |
4 | * drivers/mtd/maps/ixp4xx.c | 4 | * drivers/mtd/maps/ixp4xx.c |
5 | * | 5 | * |
@@ -72,7 +72,7 @@ static void ixp4xx_copy_from(struct map_info *map, void *to, | |||
72 | dest[len - 1] = BYTE0(le16_to_cpu(readw(src + 2*i))); | 72 | dest[len - 1] = BYTE0(le16_to_cpu(readw(src + 2*i))); |
73 | } | 73 | } |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * Unaligned writes are ignored, causing the 8-bit | 76 | * Unaligned writes are ignored, causing the 8-bit |
77 | * probe to fail and proceed to the 16-bit probe (which succeeds). | 77 | * probe to fail and proceed to the 16-bit probe (which succeeds). |
78 | */ | 78 | */ |
@@ -82,7 +82,7 @@ static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long | |||
82 | writew(cpu_to_le16(d.x[0]), map->virt + adr); | 82 | writew(cpu_to_le16(d.x[0]), map->virt + adr); |
83 | } | 83 | } |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * Fast write16 function without the probing check above | 86 | * Fast write16 function without the probing check above |
87 | */ | 87 | */ |
88 | static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr) | 88 | static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr) |
@@ -151,7 +151,7 @@ static int ixp4xx_flash_probe(struct device *_dev) | |||
151 | if(!info) { | 151 | if(!info) { |
152 | err = -ENOMEM; | 152 | err = -ENOMEM; |
153 | goto Error; | 153 | goto Error; |
154 | } | 154 | } |
155 | memzero(info, sizeof(struct ixp4xx_flash_info)); | 155 | memzero(info, sizeof(struct ixp4xx_flash_info)); |
156 | 156 | ||
157 | dev_set_drvdata(&dev->dev, info); | 157 | dev_set_drvdata(&dev->dev, info); |
@@ -174,8 +174,8 @@ static int ixp4xx_flash_probe(struct device *_dev) | |||
174 | info->map.write = ixp4xx_probe_write16, | 174 | info->map.write = ixp4xx_probe_write16, |
175 | info->map.copy_from = ixp4xx_copy_from, | 175 | info->map.copy_from = ixp4xx_copy_from, |
176 | 176 | ||
177 | info->res = request_mem_region(dev->resource->start, | 177 | info->res = request_mem_region(dev->resource->start, |
178 | dev->resource->end - dev->resource->start + 1, | 178 | dev->resource->end - dev->resource->start + 1, |
179 | "IXP4XXFlash"); | 179 | "IXP4XXFlash"); |
180 | if (!info->res) { | 180 | if (!info->res) { |
181 | printk(KERN_ERR "IXP4XXFlash: Could not reserve memory region\n"); | 181 | printk(KERN_ERR "IXP4XXFlash: Could not reserve memory region\n"); |
@@ -198,7 +198,7 @@ static int ixp4xx_flash_probe(struct device *_dev) | |||
198 | goto Error; | 198 | goto Error; |
199 | } | 199 | } |
200 | info->mtd->owner = THIS_MODULE; | 200 | info->mtd->owner = THIS_MODULE; |
201 | 201 | ||
202 | /* Use the fast version */ | 202 | /* Use the fast version */ |
203 | info->map.write = ixp4xx_write16, | 203 | info->map.write = ixp4xx_write16, |
204 | 204 | ||
diff --git a/drivers/mtd/maps/l440gx.c b/drivers/mtd/maps/l440gx.c index b08668212ab7..851bf9576052 100644 --- a/drivers/mtd/maps/l440gx.c +++ b/drivers/mtd/maps/l440gx.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: l440gx.c,v 1.17 2004/11/28 09:40:39 dwmw2 Exp $ | 2 | * $Id: l440gx.c,v 1.18 2005/11/07 11:14:27 gleixner Exp $ |
3 | * | 3 | * |
4 | * BIOS Flash chip on Intel 440GX board. | 4 | * BIOS Flash chip on Intel 440GX board. |
5 | * | 5 | * |
@@ -49,7 +49,7 @@ static struct map_info l440gx_map = { | |||
49 | .bankwidth = BUSWIDTH, | 49 | .bankwidth = BUSWIDTH, |
50 | .phys = WINDOW_ADDR, | 50 | .phys = WINDOW_ADDR, |
51 | #if 0 | 51 | #if 0 |
52 | /* FIXME verify that this is the | 52 | /* FIXME verify that this is the |
53 | * appripriate code for vpp enable/disable | 53 | * appripriate code for vpp enable/disable |
54 | */ | 54 | */ |
55 | .set_vpp = l440gx_set_vpp | 55 | .set_vpp = l440gx_set_vpp |
@@ -62,10 +62,10 @@ static int __init init_l440gx(void) | |||
62 | struct resource *pm_iobase; | 62 | struct resource *pm_iobase; |
63 | __u16 word; | 63 | __u16 word; |
64 | 64 | ||
65 | dev = pci_find_device(PCI_VENDOR_ID_INTEL, | 65 | dev = pci_find_device(PCI_VENDOR_ID_INTEL, |
66 | PCI_DEVICE_ID_INTEL_82371AB_0, NULL); | 66 | PCI_DEVICE_ID_INTEL_82371AB_0, NULL); |
67 | 67 | ||
68 | pm_dev = pci_find_device(PCI_VENDOR_ID_INTEL, | 68 | pm_dev = pci_find_device(PCI_VENDOR_ID_INTEL, |
69 | PCI_DEVICE_ID_INTEL_82371AB_3, NULL); | 69 | PCI_DEVICE_ID_INTEL_82371AB_3, NULL); |
70 | 70 | ||
71 | if (!dev || !pm_dev) { | 71 | if (!dev || !pm_dev) { |
@@ -82,10 +82,10 @@ static int __init init_l440gx(void) | |||
82 | simple_map_init(&l440gx_map); | 82 | simple_map_init(&l440gx_map); |
83 | printk(KERN_NOTICE "window_addr = 0x%08lx\n", (unsigned long)l440gx_map.virt); | 83 | printk(KERN_NOTICE "window_addr = 0x%08lx\n", (unsigned long)l440gx_map.virt); |
84 | 84 | ||
85 | /* Setup the pm iobase resource | 85 | /* Setup the pm iobase resource |
86 | * This code should move into some kind of generic bridge | 86 | * This code should move into some kind of generic bridge |
87 | * driver but for the moment I'm content with getting the | 87 | * driver but for the moment I'm content with getting the |
88 | * allocation correct. | 88 | * allocation correct. |
89 | */ | 89 | */ |
90 | pm_iobase = &pm_dev->resource[PIIXE_IOBASE_RESOURCE]; | 90 | pm_iobase = &pm_dev->resource[PIIXE_IOBASE_RESOURCE]; |
91 | if (!(pm_iobase->flags & IORESOURCE_IO)) { | 91 | if (!(pm_iobase->flags & IORESOURCE_IO)) { |
@@ -110,7 +110,7 @@ static int __init init_l440gx(void) | |||
110 | /* Set the iobase */ | 110 | /* Set the iobase */ |
111 | iobase = pm_iobase->start; | 111 | iobase = pm_iobase->start; |
112 | pci_write_config_dword(pm_dev, 0x40, iobase | 1); | 112 | pci_write_config_dword(pm_dev, 0x40, iobase | 1); |
113 | 113 | ||
114 | 114 | ||
115 | /* Set XBCS# */ | 115 | /* Set XBCS# */ |
116 | pci_read_config_word(dev, 0x4e, &word); | 116 | pci_read_config_word(dev, 0x4e, &word); |
@@ -122,7 +122,7 @@ static int __init init_l440gx(void) | |||
122 | 122 | ||
123 | /* Enable the gate on the WE line */ | 123 | /* Enable the gate on the WE line */ |
124 | outb(inb(TRIBUF_PORT) & ~1, TRIBUF_PORT); | 124 | outb(inb(TRIBUF_PORT) & ~1, TRIBUF_PORT); |
125 | 125 | ||
126 | printk(KERN_NOTICE "Enabled WE line to L440GX BIOS flash chip.\n"); | 126 | printk(KERN_NOTICE "Enabled WE line to L440GX BIOS flash chip.\n"); |
127 | 127 | ||
128 | mymtd = do_map_probe("jedec_probe", &l440gx_map); | 128 | mymtd = do_map_probe("jedec_probe", &l440gx_map); |
@@ -145,7 +145,7 @@ static void __exit cleanup_l440gx(void) | |||
145 | { | 145 | { |
146 | del_mtd_device(mymtd); | 146 | del_mtd_device(mymtd); |
147 | map_destroy(mymtd); | 147 | map_destroy(mymtd); |
148 | 148 | ||
149 | iounmap(l440gx_map.virt); | 149 | iounmap(l440gx_map.virt); |
150 | } | 150 | } |
151 | 151 | ||
diff --git a/drivers/mtd/maps/lubbock-flash.c b/drivers/mtd/maps/lubbock-flash.c index 2337e0c46750..10f681f39c96 100644 --- a/drivers/mtd/maps/lubbock-flash.c +++ b/drivers/mtd/maps/lubbock-flash.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: lubbock-flash.c,v 1.19 2004/11/04 13:24:15 gleixner Exp $ | 2 | * $Id: lubbock-flash.c,v 1.21 2005/11/07 11:14:27 gleixner Exp $ |
3 | * | 3 | * |
4 | * Map driver for the Lubbock developer platform. | 4 | * Map driver for the Lubbock developer platform. |
5 | * | 5 | * |
6 | * Author: Nicolas Pitre | 6 | * Author: Nicolas Pitre |
7 | * Copyright: (C) 2001 MontaVista Software Inc. | 7 | * Copyright: (C) 2001 MontaVista Software Inc. |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
@@ -76,7 +76,7 @@ static int __init init_lubbock(void) | |||
76 | int flashboot = (LUB_CONF_SWITCHES & 1); | 76 | int flashboot = (LUB_CONF_SWITCHES & 1); |
77 | int ret = 0, i; | 77 | int ret = 0, i; |
78 | 78 | ||
79 | lubbock_maps[0].bankwidth = lubbock_maps[1].bankwidth = | 79 | lubbock_maps[0].bankwidth = lubbock_maps[1].bankwidth = |
80 | (BOOT_DEF & 1) ? 2 : 4; | 80 | (BOOT_DEF & 1) ? 2 : 4; |
81 | 81 | ||
82 | /* Compensate for the nROMBT switch which swaps the flash banks */ | 82 | /* Compensate for the nROMBT switch which swaps the flash banks */ |
@@ -100,11 +100,11 @@ static int __init init_lubbock(void) | |||
100 | simple_map_init(&lubbock_maps[i]); | 100 | simple_map_init(&lubbock_maps[i]); |
101 | 101 | ||
102 | printk(KERN_NOTICE "Probing %s at physical address 0x%08lx (%d-bit bankwidth)\n", | 102 | printk(KERN_NOTICE "Probing %s at physical address 0x%08lx (%d-bit bankwidth)\n", |
103 | lubbock_maps[i].name, lubbock_maps[i].phys, | 103 | lubbock_maps[i].name, lubbock_maps[i].phys, |
104 | lubbock_maps[i].bankwidth * 8); | 104 | lubbock_maps[i].bankwidth * 8); |
105 | 105 | ||
106 | mymtds[i] = do_map_probe("cfi_probe", &lubbock_maps[i]); | 106 | mymtds[i] = do_map_probe("cfi_probe", &lubbock_maps[i]); |
107 | 107 | ||
108 | if (!mymtds[i]) { | 108 | if (!mymtds[i]) { |
109 | iounmap((void *)lubbock_maps[i].virt); | 109 | iounmap((void *)lubbock_maps[i].virt); |
110 | if (lubbock_maps[i].cached) | 110 | if (lubbock_maps[i].cached) |
@@ -124,7 +124,7 @@ static int __init init_lubbock(void) | |||
124 | 124 | ||
125 | if (!mymtds[0] && !mymtds[1]) | 125 | if (!mymtds[0] && !mymtds[1]) |
126 | return ret; | 126 | return ret; |
127 | 127 | ||
128 | for (i = 0; i < 2; i++) { | 128 | for (i = 0; i < 2; i++) { |
129 | if (!mymtds[i]) { | 129 | if (!mymtds[i]) { |
130 | printk(KERN_WARNING "%s is absent. Skipping\n", lubbock_maps[i].name); | 130 | printk(KERN_WARNING "%s is absent. Skipping\n", lubbock_maps[i].name); |
@@ -151,7 +151,7 @@ static void __exit cleanup_lubbock(void) | |||
151 | if (nr_parsed_parts[i] || !i) | 151 | if (nr_parsed_parts[i] || !i) |
152 | del_mtd_partitions(mymtds[i]); | 152 | del_mtd_partitions(mymtds[i]); |
153 | else | 153 | else |
154 | del_mtd_device(mymtds[i]); | 154 | del_mtd_device(mymtds[i]); |
155 | 155 | ||
156 | map_destroy(mymtds[i]); | 156 | map_destroy(mymtds[i]); |
157 | iounmap((void *)lubbock_maps[i].virt); | 157 | iounmap((void *)lubbock_maps[i].virt); |
diff --git a/drivers/mtd/maps/mainstone-flash.c b/drivers/mtd/maps/mainstone-flash.c index da0f8a692628..eaa4bbb868a3 100644 --- a/drivers/mtd/maps/mainstone-flash.c +++ b/drivers/mtd/maps/mainstone-flash.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Author: Nicolas Pitre | 6 | * Author: Nicolas Pitre |
7 | * Copyright: (C) 2001 MontaVista Software Inc. | 7 | * Copyright: (C) 2001 MontaVista Software Inc. |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
@@ -91,27 +91,27 @@ static int __init init_mainstone(void) | |||
91 | mainstone_maps[i].virt = ioremap(mainstone_maps[i].phys, | 91 | mainstone_maps[i].virt = ioremap(mainstone_maps[i].phys, |
92 | WINDOW_SIZE); | 92 | WINDOW_SIZE); |
93 | if (!mainstone_maps[i].virt) { | 93 | if (!mainstone_maps[i].virt) { |
94 | printk(KERN_WARNING "Failed to ioremap %s\n", | 94 | printk(KERN_WARNING "Failed to ioremap %s\n", |
95 | mainstone_maps[i].name); | 95 | mainstone_maps[i].name); |
96 | if (!ret) | 96 | if (!ret) |
97 | ret = -ENOMEM; | 97 | ret = -ENOMEM; |
98 | continue; | 98 | continue; |
99 | } | 99 | } |
100 | mainstone_maps[i].cached = | 100 | mainstone_maps[i].cached = |
101 | ioremap_cached(mainstone_maps[i].phys, WINDOW_SIZE); | 101 | ioremap_cached(mainstone_maps[i].phys, WINDOW_SIZE); |
102 | if (!mainstone_maps[i].cached) | 102 | if (!mainstone_maps[i].cached) |
103 | printk(KERN_WARNING "Failed to ioremap cached %s\n", | 103 | printk(KERN_WARNING "Failed to ioremap cached %s\n", |
104 | mainstone_maps[i].name); | 104 | mainstone_maps[i].name); |
105 | simple_map_init(&mainstone_maps[i]); | 105 | simple_map_init(&mainstone_maps[i]); |
106 | 106 | ||
107 | printk(KERN_NOTICE | 107 | printk(KERN_NOTICE |
108 | "Probing %s at physical address 0x%08lx" | 108 | "Probing %s at physical address 0x%08lx" |
109 | " (%d-bit bankwidth)\n", | 109 | " (%d-bit bankwidth)\n", |
110 | mainstone_maps[i].name, mainstone_maps[i].phys, | 110 | mainstone_maps[i].name, mainstone_maps[i].phys, |
111 | mainstone_maps[i].bankwidth * 8); | 111 | mainstone_maps[i].bankwidth * 8); |
112 | 112 | ||
113 | mymtds[i] = do_map_probe("cfi_probe", &mainstone_maps[i]); | 113 | mymtds[i] = do_map_probe("cfi_probe", &mainstone_maps[i]); |
114 | 114 | ||
115 | if (!mymtds[i]) { | 115 | if (!mymtds[i]) { |
116 | iounmap((void *)mainstone_maps[i].virt); | 116 | iounmap((void *)mainstone_maps[i].virt); |
117 | if (mainstone_maps[i].cached) | 117 | if (mainstone_maps[i].cached) |
@@ -131,21 +131,21 @@ static int __init init_mainstone(void) | |||
131 | 131 | ||
132 | if (!mymtds[0] && !mymtds[1]) | 132 | if (!mymtds[0] && !mymtds[1]) |
133 | return ret; | 133 | return ret; |
134 | 134 | ||
135 | for (i = 0; i < 2; i++) { | 135 | for (i = 0; i < 2; i++) { |
136 | if (!mymtds[i]) { | 136 | if (!mymtds[i]) { |
137 | printk(KERN_WARNING "%s is absent. Skipping\n", | 137 | printk(KERN_WARNING "%s is absent. Skipping\n", |
138 | mainstone_maps[i].name); | 138 | mainstone_maps[i].name); |
139 | } else if (nr_parsed_parts[i]) { | 139 | } else if (nr_parsed_parts[i]) { |
140 | add_mtd_partitions(mymtds[i], parsed_parts[i], | 140 | add_mtd_partitions(mymtds[i], parsed_parts[i], |
141 | nr_parsed_parts[i]); | 141 | nr_parsed_parts[i]); |
142 | } else if (!i) { | 142 | } else if (!i) { |
143 | printk("Using static partitions on %s\n", | 143 | printk("Using static partitions on %s\n", |
144 | mainstone_maps[i].name); | 144 | mainstone_maps[i].name); |
145 | add_mtd_partitions(mymtds[i], mainstone_partitions, | 145 | add_mtd_partitions(mymtds[i], mainstone_partitions, |
146 | ARRAY_SIZE(mainstone_partitions)); | 146 | ARRAY_SIZE(mainstone_partitions)); |
147 | } else { | 147 | } else { |
148 | printk("Registering %s as whole device\n", | 148 | printk("Registering %s as whole device\n", |
149 | mainstone_maps[i].name); | 149 | mainstone_maps[i].name); |
150 | add_mtd_device(mymtds[i]); | 150 | add_mtd_device(mymtds[i]); |
151 | } | 151 | } |
diff --git a/drivers/mtd/maps/mbx860.c b/drivers/mtd/maps/mbx860.c index c5c6901a4763..06b118727846 100644 --- a/drivers/mtd/maps/mbx860.c +++ b/drivers/mtd/maps/mbx860.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: mbx860.c,v 1.8 2004/11/04 13:24:15 gleixner Exp $ | 2 | * $Id: mbx860.c,v 1.9 2005/11/07 11:14:27 gleixner Exp $ |
3 | * | 3 | * |
4 | * Handle mapping of the flash on MBX860 boards | 4 | * Handle mapping of the flash on MBX860 boards |
5 | * | 5 | * |
6 | * Author: Anton Todorov | 6 | * Author: Anton Todorov |
7 | * Copyright: (C) 2001 Emness Technology | 7 | * Copyright: (C) 2001 Emness Technology |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
@@ -46,7 +46,7 @@ static struct mtd_partition partition_info[]={ | |||
46 | { .name = "MBX flash APPLICATION partition", | 46 | { .name = "MBX flash APPLICATION partition", |
47 | .offset = (BOOT_PARTITION_SIZE_KiB+KERNEL_PARTITION_SIZE_KiB)*1024 } | 47 | .offset = (BOOT_PARTITION_SIZE_KiB+KERNEL_PARTITION_SIZE_KiB)*1024 } |
48 | }; | 48 | }; |
49 | 49 | ||
50 | 50 | ||
51 | static struct mtd_info *mymtd; | 51 | static struct mtd_info *mymtd; |
52 | 52 | ||
diff --git a/drivers/mtd/maps/mtx-1_flash.c b/drivers/mtd/maps/mtx-1_flash.c index 43f4416a611a..d1e66e186746 100644 --- a/drivers/mtd/maps/mtx-1_flash.c +++ b/drivers/mtd/maps/mtx-1_flash.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Flash memory access on 4G Systems MTX-1 boards | 2 | * Flash memory access on 4G Systems MTX-1 boards |
3 | * | 3 | * |
4 | * $Id: mtx-1_flash.c,v 1.1 2005/09/18 10:46:41 joern Exp $ | 4 | * $Id: mtx-1_flash.c,v 1.2 2005/11/07 11:14:27 gleixner Exp $ |
5 | * | 5 | * |
6 | * (C) 2005 Bruno Randolf <bruno.randolf@4g-systems.biz> | 6 | * (C) 2005 Bruno Randolf <bruno.randolf@4g-systems.biz> |
7 | * (C) 2005 Jörn Engel <joern@wohnheim.fh-wedel.de> | 7 | * (C) 2005 Jörn Engel <joern@wohnheim.fh-wedel.de> |
@@ -66,7 +66,7 @@ int __init mtx1_mtd_init(void) | |||
66 | 66 | ||
67 | mtx1_mtd->owner = THIS_MODULE; | 67 | mtx1_mtd->owner = THIS_MODULE; |
68 | 68 | ||
69 | ret = add_mtd_partitions(mtx1_mtd, mtx1_partitions, | 69 | ret = add_mtd_partitions(mtx1_mtd, mtx1_partitions, |
70 | ARRAY_SIZE(mtx1_partitions)); | 70 | ARRAY_SIZE(mtx1_partitions)); |
71 | if (ret) | 71 | if (ret) |
72 | goto err; | 72 | goto err; |
diff --git a/drivers/mtd/maps/netsc520.c b/drivers/mtd/maps/netsc520.c index ab7e6358d281..33060a315722 100644 --- a/drivers/mtd/maps/netsc520.c +++ b/drivers/mtd/maps/netsc520.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com) | 3 | * Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com) |
4 | * based on sc520cdp.c by Sysgo Real-Time Solutions GmbH | 4 | * based on sc520cdp.c by Sysgo Real-Time Solutions GmbH |
5 | * | 5 | * |
6 | * $Id: netsc520.c,v 1.13 2004/11/28 09:40:40 dwmw2 Exp $ | 6 | * $Id: netsc520.c,v 1.14 2005/11/07 11:14:27 gleixner Exp $ |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -38,7 +38,7 @@ | |||
38 | ** The single, 16 megabyte flash bank is divided into four virtual | 38 | ** The single, 16 megabyte flash bank is divided into four virtual |
39 | ** partitions. The first partition is 768 KiB and is intended to | 39 | ** partitions. The first partition is 768 KiB and is intended to |
40 | ** store the kernel image loaded by the bootstrap loader. The second | 40 | ** store the kernel image loaded by the bootstrap loader. The second |
41 | ** partition is 256 KiB and holds the BIOS image. The third | 41 | ** partition is 256 KiB and holds the BIOS image. The third |
42 | ** partition is 14.5 MiB and is intended for the flash file system | 42 | ** partition is 14.5 MiB and is intended for the flash file system |
43 | ** image. The last partition is 512 KiB and contains another copy | 43 | ** image. The last partition is 512 KiB and contains another copy |
44 | ** of the BIOS image and the reset vector. | 44 | ** of the BIOS image and the reset vector. |
@@ -51,28 +51,28 @@ | |||
51 | ** recoverable afterwards. | 51 | ** recoverable afterwards. |
52 | */ | 52 | */ |
53 | 53 | ||
54 | /* partition_info gives details on the logical partitions that the split the | 54 | /* partition_info gives details on the logical partitions that the split the |
55 | * single flash device into. If the size if zero we use up to the end of the | 55 | * single flash device into. If the size if zero we use up to the end of the |
56 | * device. */ | 56 | * device. */ |
57 | static struct mtd_partition partition_info[]={ | 57 | static struct mtd_partition partition_info[]={ |
58 | { | 58 | { |
59 | .name = "NetSc520 boot kernel", | 59 | .name = "NetSc520 boot kernel", |
60 | .offset = 0, | 60 | .offset = 0, |
61 | .size = 0xc0000 | 61 | .size = 0xc0000 |
62 | }, | 62 | }, |
63 | { | 63 | { |
64 | .name = "NetSc520 Low BIOS", | 64 | .name = "NetSc520 Low BIOS", |
65 | .offset = 0xc0000, | 65 | .offset = 0xc0000, |
66 | .size = 0x40000 | 66 | .size = 0x40000 |
67 | }, | 67 | }, |
68 | { | 68 | { |
69 | .name = "NetSc520 file system", | 69 | .name = "NetSc520 file system", |
70 | .offset = 0x100000, | 70 | .offset = 0x100000, |
71 | .size = 0xe80000 | 71 | .size = 0xe80000 |
72 | }, | 72 | }, |
73 | { | 73 | { |
74 | .name = "NetSc520 High BIOS", | 74 | .name = "NetSc520 High BIOS", |
75 | .offset = 0xf80000, | 75 | .offset = 0xf80000, |
76 | .size = 0x80000 | 76 | .size = 0x80000 |
77 | }, | 77 | }, |
78 | }; | 78 | }; |
@@ -114,7 +114,7 @@ static int __init init_netsc520(void) | |||
114 | iounmap(netsc520_map.virt); | 114 | iounmap(netsc520_map.virt); |
115 | return -ENXIO; | 115 | return -ENXIO; |
116 | } | 116 | } |
117 | 117 | ||
118 | mymtd->owner = THIS_MODULE; | 118 | mymtd->owner = THIS_MODULE; |
119 | add_mtd_partitions( mymtd, partition_info, NUM_PARTITIONS ); | 119 | add_mtd_partitions( mymtd, partition_info, NUM_PARTITIONS ); |
120 | return 0; | 120 | return 0; |
diff --git a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c index 61be5a4148c9..f00ee7e54dba 100644 --- a/drivers/mtd/maps/nettel.c +++ b/drivers/mtd/maps/nettel.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com) | 6 | * (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com) |
7 | * (C) Copyright 2001-2002, SnapGear (www.snapgear.com) | 7 | * (C) Copyright 2001-2002, SnapGear (www.snapgear.com) |
8 | * | 8 | * |
9 | * $Id: nettel.c,v 1.10 2005/01/05 17:11:29 dwmw2 Exp $ | 9 | * $Id: nettel.c,v 1.11 2005/11/07 11:14:27 gleixner Exp $ |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /****************************************************************************/ | 12 | /****************************************************************************/ |
@@ -143,7 +143,7 @@ static int nettel_reboot_notifier(struct notifier_block *nb, unsigned long val, | |||
143 | { | 143 | { |
144 | struct cfi_private *cfi = nettel_intel_map.fldrv_priv; | 144 | struct cfi_private *cfi = nettel_intel_map.fldrv_priv; |
145 | unsigned long b; | 145 | unsigned long b; |
146 | 146 | ||
147 | /* Make sure all FLASH chips are put back into read mode */ | 147 | /* Make sure all FLASH chips are put back into read mode */ |
148 | for (b = 0; (b < nettel_intel_partitions[3].size); b += 0x100000) { | 148 | for (b = 0; (b < nettel_intel_partitions[3].size); b += 0x100000) { |
149 | cfi_send_gen_cmd(0xff, 0x55, b, &nettel_intel_map, cfi, | 149 | cfi_send_gen_cmd(0xff, 0x55, b, &nettel_intel_map, cfi, |
@@ -199,7 +199,7 @@ int nettel_eraseconfig(void) | |||
199 | 199 | ||
200 | schedule(); /* Wait for erase to finish. */ | 200 | schedule(); /* Wait for erase to finish. */ |
201 | remove_wait_queue(&wait_q, &wait); | 201 | remove_wait_queue(&wait_q, &wait); |
202 | 202 | ||
203 | put_mtd_device(mtd); | 203 | put_mtd_device(mtd); |
204 | } | 204 | } |
205 | 205 | ||
@@ -430,7 +430,7 @@ int __init nettel_init(void) | |||
430 | nettel_intel_partitions[1].size = (intel0size + intel1size) - | 430 | nettel_intel_partitions[1].size = (intel0size + intel1size) - |
431 | (1024*1024 + intel_mtd->erasesize); | 431 | (1024*1024 + intel_mtd->erasesize); |
432 | nettel_intel_partitions[3].size = intel0size + intel1size; | 432 | nettel_intel_partitions[3].size = intel0size + intel1size; |
433 | nettel_intel_partitions[4].offset = | 433 | nettel_intel_partitions[4].offset = |
434 | (intel0size + intel1size) - intel_mtd->erasesize; | 434 | (intel0size + intel1size) - intel_mtd->erasesize; |
435 | nettel_intel_partitions[4].size = intel_mtd->erasesize; | 435 | nettel_intel_partitions[4].size = intel_mtd->erasesize; |
436 | nettel_intel_partitions[5].offset = | 436 | nettel_intel_partitions[5].offset = |
diff --git a/drivers/mtd/maps/ocelot.c b/drivers/mtd/maps/ocelot.c index 82c3070678c5..6977963d7897 100644 --- a/drivers/mtd/maps/ocelot.c +++ b/drivers/mtd/maps/ocelot.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: ocelot.c,v 1.16 2005/01/05 18:05:13 dwmw2 Exp $ | 2 | * $Id: ocelot.c,v 1.17 2005/11/07 11:14:27 gleixner Exp $ |
3 | * | 3 | * |
4 | * Flash on Momenco Ocelot | 4 | * Flash on Momenco Ocelot |
5 | */ | 5 | */ |
@@ -31,7 +31,7 @@ static void ocelot_ram_write(struct mtd_info *mtd, loff_t to, size_t len, size_t | |||
31 | struct map_info *map = mtd->priv; | 31 | struct map_info *map = mtd->priv; |
32 | size_t done = 0; | 32 | size_t done = 0; |
33 | 33 | ||
34 | /* If we use memcpy, it does word-wide writes. Even though we told the | 34 | /* If we use memcpy, it does word-wide writes. Even though we told the |
35 | GT64120A that it's an 8-bit wide region, word-wide writes don't work. | 35 | GT64120A that it's an 8-bit wide region, word-wide writes don't work. |
36 | We end up just writing the first byte of the four to all four bytes. | 36 | We end up just writing the first byte of the four to all four bytes. |
37 | So we have this loop instead */ | 37 | So we have this loop instead */ |
@@ -68,7 +68,7 @@ static int __init init_ocelot_maps(void) | |||
68 | int nr_parts; | 68 | int nr_parts; |
69 | unsigned char brd_status; | 69 | unsigned char brd_status; |
70 | 70 | ||
71 | printk(KERN_INFO "Momenco Ocelot MTD mappings: Flash 0x%x at 0x%x, NVRAM 0x%x at 0x%x\n", | 71 | printk(KERN_INFO "Momenco Ocelot MTD mappings: Flash 0x%x at 0x%x, NVRAM 0x%x at 0x%x\n", |
72 | FLASH_WINDOW_SIZE, FLASH_WINDOW_ADDR, NVRAM_WINDOW_SIZE, NVRAM_WINDOW_ADDR); | 72 | FLASH_WINDOW_SIZE, FLASH_WINDOW_ADDR, NVRAM_WINDOW_SIZE, NVRAM_WINDOW_ADDR); |
73 | 73 | ||
74 | /* First check whether the flash jumper is present */ | 74 | /* First check whether the flash jumper is present */ |
@@ -138,8 +138,8 @@ static int __init init_ocelot_maps(void) | |||
138 | add_mtd_device(flash_mtd); | 138 | add_mtd_device(flash_mtd); |
139 | 139 | ||
140 | return 0; | 140 | return 0; |
141 | 141 | ||
142 | fail3: | 142 | fail3: |
143 | iounmap((void *)ocelot_flash_map.virt); | 143 | iounmap((void *)ocelot_flash_map.virt); |
144 | if (ocelot_flash_map.cached) | 144 | if (ocelot_flash_map.cached) |
145 | iounmap((void *)ocelot_flash_map.cached); | 145 | iounmap((void *)ocelot_flash_map.cached); |
diff --git a/drivers/mtd/maps/octagon-5066.c b/drivers/mtd/maps/octagon-5066.c index e5ff83de420e..a6642db3d325 100644 --- a/drivers/mtd/maps/octagon-5066.c +++ b/drivers/mtd/maps/octagon-5066.c | |||
@@ -1,12 +1,12 @@ | |||
1 | // $Id: octagon-5066.c,v 1.26 2004/07/12 22:38:29 dwmw2 Exp $ | 1 | // $Id: octagon-5066.c,v 1.28 2005/11/07 11:14:27 gleixner Exp $ |
2 | /* ###################################################################### | 2 | /* ###################################################################### |
3 | 3 | ||
4 | Octagon 5066 MTD Driver. | 4 | Octagon 5066 MTD Driver. |
5 | 5 | ||
6 | The Octagon 5066 is a SBC based on AMD's 586-WB running at 133 MHZ. It | 6 | The Octagon 5066 is a SBC based on AMD's 586-WB running at 133 MHZ. It |
7 | comes with a builtin AMD 29F016 flash chip and a socketed EEPROM that | 7 | comes with a builtin AMD 29F016 flash chip and a socketed EEPROM that |
8 | is replacable by flash. Both units are mapped through a multiplexer | 8 | is replacable by flash. Both units are mapped through a multiplexer |
9 | into a 32k memory window at 0xe8000. The control register for the | 9 | into a 32k memory window at 0xe8000. The control register for the |
10 | multiplexing unit is located at IO 0x208 with a bit map of | 10 | multiplexing unit is located at IO 0x208 with a bit map of |
11 | 0-5 Page Selection in 32k increments | 11 | 0-5 Page Selection in 32k increments |
12 | 6-7 Device selection: | 12 | 6-7 Device selection: |
@@ -14,14 +14,14 @@ | |||
14 | 01 SSD 0 (Socket) | 14 | 01 SSD 0 (Socket) |
15 | 10 SSD 1 (Flash chip) | 15 | 10 SSD 1 (Flash chip) |
16 | 11 undefined | 16 | 11 undefined |
17 | 17 | ||
18 | On each SSD, the first 128k is reserved for use by the bios | 18 | On each SSD, the first 128k is reserved for use by the bios |
19 | (actually it IS the bios..) This only matters if you are booting off the | 19 | (actually it IS the bios..) This only matters if you are booting off the |
20 | flash, you must not put a file system starting there. | 20 | flash, you must not put a file system starting there. |
21 | 21 | ||
22 | The driver tries to do a detection algorithm to guess what sort of devices | 22 | The driver tries to do a detection algorithm to guess what sort of devices |
23 | are plugged into the sockets. | 23 | are plugged into the sockets. |
24 | 24 | ||
25 | ##################################################################### */ | 25 | ##################################################################### */ |
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -56,7 +56,7 @@ static void __oct5066_page(struct map_info *map, __u8 byte) | |||
56 | static inline void oct5066_page(struct map_info *map, unsigned long ofs) | 56 | static inline void oct5066_page(struct map_info *map, unsigned long ofs) |
57 | { | 57 | { |
58 | __u8 byte = map->map_priv_1 | (ofs >> WINDOW_SHIFT); | 58 | __u8 byte = map->map_priv_1 | (ofs >> WINDOW_SHIFT); |
59 | 59 | ||
60 | if (page_n_dev != byte) | 60 | if (page_n_dev != byte) |
61 | __oct5066_page(map, byte); | 61 | __oct5066_page(map, byte); |
62 | } | 62 | } |
@@ -78,7 +78,7 @@ static void oct5066_copy_from(struct map_info *map, void *to, unsigned long from | |||
78 | unsigned long thislen = len; | 78 | unsigned long thislen = len; |
79 | if (len > (WINDOW_LENGTH - (from & WINDOW_MASK))) | 79 | if (len > (WINDOW_LENGTH - (from & WINDOW_MASK))) |
80 | thislen = WINDOW_LENGTH-(from & WINDOW_MASK); | 80 | thislen = WINDOW_LENGTH-(from & WINDOW_MASK); |
81 | 81 | ||
82 | spin_lock(&oct5066_spin); | 82 | spin_lock(&oct5066_spin); |
83 | oct5066_page(map, from); | 83 | oct5066_page(map, from); |
84 | memcpy_fromio(to, iomapadr + from, thislen); | 84 | memcpy_fromio(to, iomapadr + from, thislen); |
@@ -103,7 +103,7 @@ static void oct5066_copy_to(struct map_info *map, unsigned long to, const void * | |||
103 | unsigned long thislen = len; | 103 | unsigned long thislen = len; |
104 | if (len > (WINDOW_LENGTH - (to & WINDOW_MASK))) | 104 | if (len > (WINDOW_LENGTH - (to & WINDOW_MASK))) |
105 | thislen = WINDOW_LENGTH-(to & WINDOW_MASK); | 105 | thislen = WINDOW_LENGTH-(to & WINDOW_MASK); |
106 | 106 | ||
107 | spin_lock(&oct5066_spin); | 107 | spin_lock(&oct5066_spin); |
108 | oct5066_page(map, to); | 108 | oct5066_page(map, to); |
109 | memcpy_toio(iomapadr + to, from, thislen); | 109 | memcpy_toio(iomapadr + to, from, thislen); |
@@ -144,7 +144,7 @@ static struct mtd_info *oct5066_mtd[2] = {NULL, NULL}; | |||
144 | // OctProbe - Sense if this is an octagon card | 144 | // OctProbe - Sense if this is an octagon card |
145 | // --------------------------------------------------------------------- | 145 | // --------------------------------------------------------------------- |
146 | /* Perform a simple validity test, we map the window select SSD0 and | 146 | /* Perform a simple validity test, we map the window select SSD0 and |
147 | change pages while monitoring the window. A change in the window, | 147 | change pages while monitoring the window. A change in the window, |
148 | controlled by the PAGE_IO port is a functioning 5066 board. This will | 148 | controlled by the PAGE_IO port is a functioning 5066 board. This will |
149 | fail if the thing in the socket is set to a uniform value. */ | 149 | fail if the thing in the socket is set to a uniform value. */ |
150 | static int __init OctProbe(void) | 150 | static int __init OctProbe(void) |
@@ -161,13 +161,13 @@ static int __init OctProbe(void) | |||
161 | Values[I%10] = readl(iomapadr); | 161 | Values[I%10] = readl(iomapadr); |
162 | if (I > 0 && Values[I%10] == Values[0]) | 162 | if (I > 0 && Values[I%10] == Values[0]) |
163 | return -EAGAIN; | 163 | return -EAGAIN; |
164 | } | 164 | } |
165 | else | 165 | else |
166 | { | 166 | { |
167 | // Make sure we get the same values on the second pass | 167 | // Make sure we get the same values on the second pass |
168 | if (Values[I%10] != readl(iomapadr)) | 168 | if (Values[I%10] != readl(iomapadr)) |
169 | return -EAGAIN; | 169 | return -EAGAIN; |
170 | } | 170 | } |
171 | } | 171 | } |
172 | return 0; | 172 | return 0; |
173 | } | 173 | } |
@@ -207,11 +207,11 @@ int __init init_oct5066(void) | |||
207 | ret = -EAGAIN; | 207 | ret = -EAGAIN; |
208 | goto out_unmap; | 208 | goto out_unmap; |
209 | } | 209 | } |
210 | 210 | ||
211 | // Print out our little header.. | 211 | // Print out our little header.. |
212 | printk("Octagon 5066 SSD IO:0x%x MEM:0x%x-0x%x\n",PAGE_IO,WINDOW_START, | 212 | printk("Octagon 5066 SSD IO:0x%x MEM:0x%x-0x%x\n",PAGE_IO,WINDOW_START, |
213 | WINDOW_START+WINDOW_LENGTH); | 213 | WINDOW_START+WINDOW_LENGTH); |
214 | 214 | ||
215 | for (i=0; i<2; i++) { | 215 | for (i=0; i<2; i++) { |
216 | oct5066_mtd[i] = do_map_probe("cfi_probe", &oct5066_map[i]); | 216 | oct5066_mtd[i] = do_map_probe("cfi_probe", &oct5066_map[i]); |
217 | if (!oct5066_mtd[i]) | 217 | if (!oct5066_mtd[i]) |
@@ -225,11 +225,11 @@ int __init init_oct5066(void) | |||
225 | add_mtd_device(oct5066_mtd[i]); | 225 | add_mtd_device(oct5066_mtd[i]); |
226 | } | 226 | } |
227 | } | 227 | } |
228 | 228 | ||
229 | if (!oct5066_mtd[0] && !oct5066_mtd[1]) { | 229 | if (!oct5066_mtd[0] && !oct5066_mtd[1]) { |
230 | cleanup_oct5066(); | 230 | cleanup_oct5066(); |
231 | return -ENXIO; | 231 | return -ENXIO; |
232 | } | 232 | } |
233 | 233 | ||
234 | return 0; | 234 | return 0; |
235 | 235 | ||
diff --git a/drivers/mtd/maps/omap-toto-flash.c b/drivers/mtd/maps/omap-toto-flash.c index da36e8dddd17..a88ed6691caf 100644 --- a/drivers/mtd/maps/omap-toto-flash.c +++ b/drivers/mtd/maps/omap-toto-flash.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * (C) 2002 MontVista Software, Inc. | 6 | * (C) 2002 MontVista Software, Inc. |
7 | * | 7 | * |
8 | * $Id: omap-toto-flash.c,v 1.3 2004/09/16 23:27:13 gleixner Exp $ | 8 | * $Id: omap-toto-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
@@ -38,7 +38,7 @@ static struct map_info omap_toto_map_flash = { | |||
38 | .virt = (void __iomem *)OMAP_TOTO_FLASH_BASE, | 38 | .virt = (void __iomem *)OMAP_TOTO_FLASH_BASE, |
39 | }; | 39 | }; |
40 | 40 | ||
41 | 41 | ||
42 | static struct mtd_partition toto_flash_partitions[] = { | 42 | static struct mtd_partition toto_flash_partitions[] = { |
43 | { | 43 | { |
44 | .name = "BootLoader", | 44 | .name = "BootLoader", |
@@ -54,21 +54,21 @@ static struct mtd_partition toto_flash_partitions[] = { | |||
54 | .name = "EnvArea", /* bottom 64KiB for env vars */ | 54 | .name = "EnvArea", /* bottom 64KiB for env vars */ |
55 | .size = MTDPART_SIZ_FULL, | 55 | .size = MTDPART_SIZ_FULL, |
56 | .offset = MTDPART_OFS_APPEND, | 56 | .offset = MTDPART_OFS_APPEND, |
57 | } | 57 | } |
58 | }; | 58 | }; |
59 | 59 | ||
60 | static struct mtd_partition *parsed_parts; | 60 | static struct mtd_partition *parsed_parts; |
61 | 61 | ||
62 | static struct mtd_info *flash_mtd; | 62 | static struct mtd_info *flash_mtd; |
63 | 63 | ||
64 | static int __init init_flash (void) | 64 | static int __init init_flash (void) |
65 | { | 65 | { |
66 | 66 | ||
67 | struct mtd_partition *parts; | 67 | struct mtd_partition *parts; |
68 | int nb_parts = 0; | 68 | int nb_parts = 0; |
69 | int parsed_nr_parts = 0; | 69 | int parsed_nr_parts = 0; |
70 | const char *part_type; | 70 | const char *part_type; |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Static partition definition selection | 73 | * Static partition definition selection |
74 | */ | 74 | */ |
@@ -89,7 +89,7 @@ static int __init init_flash (void) | |||
89 | flash_mtd = do_map_probe("jedec_probe", &omap_toto_map_flash); | 89 | flash_mtd = do_map_probe("jedec_probe", &omap_toto_map_flash); |
90 | if (!flash_mtd) | 90 | if (!flash_mtd) |
91 | return -ENXIO; | 91 | return -ENXIO; |
92 | 92 | ||
93 | if (parsed_nr_parts > 0) { | 93 | if (parsed_nr_parts > 0) { |
94 | parts = parsed_parts; | 94 | parts = parsed_parts; |
95 | nb_parts = parsed_nr_parts; | 95 | nb_parts = parsed_nr_parts; |
@@ -108,8 +108,8 @@ static int __init init_flash (void) | |||
108 | } | 108 | } |
109 | return 0; | 109 | return 0; |
110 | } | 110 | } |
111 | 111 | ||
112 | int __init omap_toto_mtd_init(void) | 112 | int __init omap_toto_mtd_init(void) |
113 | { | 113 | { |
114 | int status; | 114 | int status; |
115 | 115 | ||
@@ -119,7 +119,7 @@ int __init omap_toto_mtd_init(void) | |||
119 | return status; | 119 | return status; |
120 | } | 120 | } |
121 | 121 | ||
122 | static void __exit omap_toto_mtd_cleanup(void) | 122 | static void __exit omap_toto_mtd_cleanup(void) |
123 | { | 123 | { |
124 | if (flash_mtd) { | 124 | if (flash_mtd) { |
125 | del_mtd_partitions(flash_mtd); | 125 | del_mtd_partitions(flash_mtd); |
diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c index 7f370bb794fe..fd3b4a5fc207 100644 --- a/drivers/mtd/maps/omap_nor.c +++ b/drivers/mtd/maps/omap_nor.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2001-2002 MontaVista Software Inc. | 4 | * Copyright (C) 2001-2002 MontaVista Software Inc. |
5 | * Copyright (C) 2003-2004 Texas Instruments | 5 | * Copyright (C) 2003-2004 Texas Instruments |
6 | * Copyright (C) 2004 Nokia Corporation | 6 | * Copyright (C) 2004 Nokia Corporation |
7 | * | 7 | * |
8 | * Assembled using driver code copyright the companies above | 8 | * Assembled using driver code copyright the companies above |
9 | * and written by David Brownell, Jian Zhang <jzhang@ti.com>, | 9 | * and written by David Brownell, Jian Zhang <jzhang@ti.com>, |
diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c index d9c64e99ee32..8b3570b09095 100644 --- a/drivers/mtd/maps/pci.c +++ b/drivers/mtd/maps/pci.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * $Id: pci.c,v 1.10 2005/03/18 14:04:35 gleixner Exp $ | 10 | * $Id: pci.c,v 1.13 2005/11/07 11:14:27 gleixner Exp $ |
11 | * | 11 | * |
12 | * Generic PCI memory map driver. We support the following boards: | 12 | * Generic PCI memory map driver. We support the following boards: |
13 | * - Intel IQ80310 ATU. | 13 | * - Intel IQ80310 ATU. |
14 | * - Intel EBSA285 (blank rom programming mode). Tested working 27/09/2001 | 14 | * - Intel EBSA285 (blank rom programming mode). Tested working 27/09/2001 |
@@ -38,7 +38,7 @@ struct map_pci_info { | |||
38 | void (*exit)(struct pci_dev *dev, struct map_pci_info *map); | 38 | void (*exit)(struct pci_dev *dev, struct map_pci_info *map); |
39 | unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs); | 39 | unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs); |
40 | struct pci_dev *dev; | 40 | struct pci_dev *dev; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static map_word mtd_pci_read8(struct map_info *_map, unsigned long ofs) | 43 | static map_word mtd_pci_read8(struct map_info *_map, unsigned long ofs) |
44 | { | 44 | { |
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index ff7c50d10180..af24216a0626 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: pcmciamtd.c,v 1.51 2004/07/12 22:38:29 dwmw2 Exp $ | 2 | * $Id: pcmciamtd.c,v 1.55 2005/11/07 11:14:28 gleixner Exp $ |
3 | * | 3 | * |
4 | * pcmciamtd.c - MTD driver for PCMCIA flash memory cards | 4 | * pcmciamtd.c - MTD driver for PCMCIA flash memory cards |
5 | * | 5 | * |
@@ -48,7 +48,7 @@ static const int debug = 0; | |||
48 | 48 | ||
49 | 49 | ||
50 | #define DRIVER_DESC "PCMCIA Flash memory card driver" | 50 | #define DRIVER_DESC "PCMCIA Flash memory card driver" |
51 | #define DRIVER_VERSION "$Revision: 1.51 $" | 51 | #define DRIVER_VERSION "$Revision: 1.55 $" |
52 | 52 | ||
53 | /* Size of the PCMCIA address space: 26 bits = 64 MB */ | 53 | /* Size of the PCMCIA address space: 26 bits = 64 MB */ |
54 | #define MAX_PCMCIA_ADDR 0x4000000 | 54 | #define MAX_PCMCIA_ADDR 0x4000000 |
@@ -176,7 +176,7 @@ static void pcmcia_copy_from_remap(struct map_info *map, void *to, unsigned long | |||
176 | 176 | ||
177 | if(toread > len) | 177 | if(toread > len) |
178 | toread = len; | 178 | toread = len; |
179 | 179 | ||
180 | addr = remap_window(map, from); | 180 | addr = remap_window(map, from); |
181 | if(!addr) | 181 | if(!addr) |
182 | return; | 182 | return; |
@@ -386,7 +386,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_ | |||
386 | cs_error(link->handle, ParseTuple, rc); | 386 | cs_error(link->handle, ParseTuple, rc); |
387 | break; | 387 | break; |
388 | } | 388 | } |
389 | 389 | ||
390 | switch(tuple.TupleCode) { | 390 | switch(tuple.TupleCode) { |
391 | case CISTPL_FORMAT: { | 391 | case CISTPL_FORMAT: { |
392 | cistpl_format_t *t = &parse.format; | 392 | cistpl_format_t *t = &parse.format; |
@@ -394,9 +394,9 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_ | |||
394 | DEBUG(2, "Format type: %u, Error Detection: %u, offset = %u, length =%u", | 394 | DEBUG(2, "Format type: %u, Error Detection: %u, offset = %u, length =%u", |
395 | t->type, t->edc, t->offset, t->length); | 395 | t->type, t->edc, t->offset, t->length); |
396 | break; | 396 | break; |
397 | 397 | ||
398 | } | 398 | } |
399 | 399 | ||
400 | case CISTPL_DEVICE: { | 400 | case CISTPL_DEVICE: { |
401 | cistpl_device_t *t = &parse.device; | 401 | cistpl_device_t *t = &parse.device; |
402 | int i; | 402 | int i; |
@@ -410,7 +410,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_ | |||
410 | } | 410 | } |
411 | break; | 411 | break; |
412 | } | 412 | } |
413 | 413 | ||
414 | case CISTPL_VERS_1: { | 414 | case CISTPL_VERS_1: { |
415 | cistpl_vers_1_t *t = &parse.version_1; | 415 | cistpl_vers_1_t *t = &parse.version_1; |
416 | int i; | 416 | int i; |
@@ -425,7 +425,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_ | |||
425 | DEBUG(2, "Found name: %s", dev->mtd_name); | 425 | DEBUG(2, "Found name: %s", dev->mtd_name); |
426 | break; | 426 | break; |
427 | } | 427 | } |
428 | 428 | ||
429 | case CISTPL_JEDEC_C: { | 429 | case CISTPL_JEDEC_C: { |
430 | cistpl_jedec_t *t = &parse.jedec; | 430 | cistpl_jedec_t *t = &parse.jedec; |
431 | int i; | 431 | int i; |
@@ -434,7 +434,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_ | |||
434 | } | 434 | } |
435 | break; | 435 | break; |
436 | } | 436 | } |
437 | 437 | ||
438 | case CISTPL_DEVICE_GEO: { | 438 | case CISTPL_DEVICE_GEO: { |
439 | cistpl_device_geo_t *t = &parse.device_geo; | 439 | cistpl_device_geo_t *t = &parse.device_geo; |
440 | int i; | 440 | int i; |
@@ -449,11 +449,11 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_ | |||
449 | } | 449 | } |
450 | break; | 450 | break; |
451 | } | 451 | } |
452 | 452 | ||
453 | default: | 453 | default: |
454 | DEBUG(2, "Unknown tuple code %d", tuple.TupleCode); | 454 | DEBUG(2, "Unknown tuple code %d", tuple.TupleCode); |
455 | } | 455 | } |
456 | 456 | ||
457 | rc = pcmcia_get_next_tuple(link->handle, &tuple); | 457 | rc = pcmcia_get_next_tuple(link->handle, &tuple); |
458 | } | 458 | } |
459 | if(!dev->pcmcia_map.size) | 459 | if(!dev->pcmcia_map.size) |
@@ -470,7 +470,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_ | |||
470 | if(bankwidth) { | 470 | if(bankwidth) { |
471 | dev->pcmcia_map.bankwidth = bankwidth; | 471 | dev->pcmcia_map.bankwidth = bankwidth; |
472 | DEBUG(2, "bankwidth forced to %d", bankwidth); | 472 | DEBUG(2, "bankwidth forced to %d", bankwidth); |
473 | } | 473 | } |
474 | 474 | ||
475 | dev->pcmcia_map.name = dev->mtd_name; | 475 | dev->pcmcia_map.name = dev->mtd_name; |
476 | if(!dev->mtd_name[0]) { | 476 | if(!dev->mtd_name[0]) { |
@@ -568,7 +568,7 @@ static void pcmciamtd_config(dev_link_t *link) | |||
568 | return; | 568 | return; |
569 | } | 569 | } |
570 | DEBUG(1, "Allocated a window of %dKiB", dev->win_size >> 10); | 570 | DEBUG(1, "Allocated a window of %dKiB", dev->win_size >> 10); |
571 | 571 | ||
572 | /* Get write protect status */ | 572 | /* Get write protect status */ |
573 | CS_CHECK(GetStatus, pcmcia_get_status(link->handle, &status)); | 573 | CS_CHECK(GetStatus, pcmcia_get_status(link->handle, &status)); |
574 | DEBUG(2, "status value: 0x%x window handle = 0x%8.8lx", | 574 | DEBUG(2, "status value: 0x%x window handle = 0x%8.8lx", |
@@ -624,11 +624,11 @@ static void pcmciamtd_config(dev_link_t *link) | |||
624 | mtd = do_map_probe(probes[i], &dev->pcmcia_map); | 624 | mtd = do_map_probe(probes[i], &dev->pcmcia_map); |
625 | if(mtd) | 625 | if(mtd) |
626 | break; | 626 | break; |
627 | 627 | ||
628 | DEBUG(1, "FAILED: %s", probes[i]); | 628 | DEBUG(1, "FAILED: %s", probes[i]); |
629 | } | 629 | } |
630 | } | 630 | } |
631 | 631 | ||
632 | if(!mtd) { | 632 | if(!mtd) { |
633 | DEBUG(1, "Cant find an MTD"); | 633 | DEBUG(1, "Cant find an MTD"); |
634 | pcmciamtd_release(link); | 634 | pcmciamtd_release(link); |
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index b853670bfb81..9ee760f97bc6 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: physmap.c,v 1.37 2004/11/28 09:40:40 dwmw2 Exp $ | 2 | * $Id: physmap.c,v 1.38 2005/11/07 11:14:28 gleixner Exp $ |
3 | * | 3 | * |
4 | * Normal mappings of chips in physical memory | 4 | * Normal mappings of chips in physical memory |
5 | * | 5 | * |
@@ -69,7 +69,7 @@ static int __init init_physmap(void) | |||
69 | mymtd->owner = THIS_MODULE; | 69 | mymtd->owner = THIS_MODULE; |
70 | 70 | ||
71 | #ifdef CONFIG_MTD_PARTITIONS | 71 | #ifdef CONFIG_MTD_PARTITIONS |
72 | mtd_parts_nb = parse_mtd_partitions(mymtd, part_probes, | 72 | mtd_parts_nb = parse_mtd_partitions(mymtd, part_probes, |
73 | &mtd_parts, 0); | 73 | &mtd_parts, 0); |
74 | 74 | ||
75 | if (mtd_parts_nb > 0) | 75 | if (mtd_parts_nb > 0) |
@@ -78,9 +78,9 @@ static int __init init_physmap(void) | |||
78 | return 0; | 78 | return 0; |
79 | } | 79 | } |
80 | 80 | ||
81 | if (num_physmap_partitions != 0) | 81 | if (num_physmap_partitions != 0) |
82 | { | 82 | { |
83 | printk(KERN_NOTICE | 83 | printk(KERN_NOTICE |
84 | "Using physmap partition definition\n"); | 84 | "Using physmap partition definition\n"); |
85 | add_mtd_partitions (mymtd, physmap_partitions, num_physmap_partitions); | 85 | add_mtd_partitions (mymtd, physmap_partitions, num_physmap_partitions); |
86 | return 0; | 86 | return 0; |
diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c index e35a1c428e52..a02eed94a231 100644 --- a/drivers/mtd/maps/plat-ram.c +++ b/drivers/mtd/maps/plat-ram.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * Generic platfrom device based RAM map | 7 | * Generic platfrom device based RAM map |
8 | * | 8 | * |
9 | * $Id: plat-ram.c,v 1.6 2005/11/07 00:52:24 gleixner Exp $ | 9 | * $Id: plat-ram.c,v 1.7 2005/11/07 11:14:28 gleixner Exp $ |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by | 12 | * it under the terms of the GNU General Public License as published by |
@@ -91,7 +91,7 @@ static int platram_remove(struct device *dev) | |||
91 | 91 | ||
92 | dev_dbg(dev, "removing device\n"); | 92 | dev_dbg(dev, "removing device\n"); |
93 | 93 | ||
94 | if (info == NULL) | 94 | if (info == NULL) |
95 | return 0; | 95 | return 0; |
96 | 96 | ||
97 | if (info->mtd) { | 97 | if (info->mtd) { |
@@ -118,7 +118,7 @@ static int platram_remove(struct device *dev) | |||
118 | 118 | ||
119 | if (info->map.virt != NULL) | 119 | if (info->map.virt != NULL) |
120 | iounmap(info->map.virt); | 120 | iounmap(info->map.virt); |
121 | 121 | ||
122 | kfree(info); | 122 | kfree(info); |
123 | 123 | ||
124 | return 0; | 124 | return 0; |
@@ -139,7 +139,7 @@ static int platram_probe(struct device *dev) | |||
139 | int err = 0; | 139 | int err = 0; |
140 | 140 | ||
141 | dev_dbg(dev, "probe entered\n"); | 141 | dev_dbg(dev, "probe entered\n"); |
142 | 142 | ||
143 | if (dev->platform_data == NULL) { | 143 | if (dev->platform_data == NULL) { |
144 | dev_err(dev, "no platform data supplied\n"); | 144 | dev_err(dev, "no platform data supplied\n"); |
145 | err = -ENOENT; | 145 | err = -ENOENT; |
@@ -240,7 +240,7 @@ static int platram_probe(struct device *dev) | |||
240 | dev_err(dev, "add_mtd_device() failed\n"); | 240 | dev_err(dev, "add_mtd_device() failed\n"); |
241 | err = -ENOMEM; | 241 | err = -ENOMEM; |
242 | } | 242 | } |
243 | 243 | ||
244 | dev_info(dev, "registered mtd device\n"); | 244 | dev_info(dev, "registered mtd device\n"); |
245 | return err; | 245 | return err; |
246 | 246 | ||
diff --git a/drivers/mtd/maps/pnc2000.c b/drivers/mtd/maps/pnc2000.c index a0f43dad8985..d7e16c2d5c44 100644 --- a/drivers/mtd/maps/pnc2000.c +++ b/drivers/mtd/maps/pnc2000.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * This code is GPL | 6 | * This code is GPL |
7 | * | 7 | * |
8 | * $Id: pnc2000.c,v 1.17 2004/11/16 18:29:02 dwmw2 Exp $ | 8 | * $Id: pnc2000.c,v 1.18 2005/11/07 11:14:28 gleixner Exp $ |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
@@ -21,7 +21,7 @@ | |||
21 | #define WINDOW_ADDR 0xbf000000 | 21 | #define WINDOW_ADDR 0xbf000000 |
22 | #define WINDOW_SIZE 0x00400000 | 22 | #define WINDOW_SIZE 0x00400000 |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * MAP DRIVER STUFF | 25 | * MAP DRIVER STUFF |
26 | */ | 26 | */ |
27 | 27 | ||
@@ -36,7 +36,7 @@ static struct map_info pnc_map = { | |||
36 | 36 | ||
37 | 37 | ||
38 | /* | 38 | /* |
39 | * MTD 'PARTITIONING' STUFF | 39 | * MTD 'PARTITIONING' STUFF |
40 | */ | 40 | */ |
41 | static struct mtd_partition pnc_partitions[3] = { | 41 | static struct mtd_partition pnc_partitions[3] = { |
42 | { | 42 | { |
@@ -56,7 +56,7 @@ static struct mtd_partition pnc_partitions[3] = { | |||
56 | } | 56 | } |
57 | }; | 57 | }; |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * This is the master MTD device for which all the others are just | 60 | * This is the master MTD device for which all the others are just |
61 | * auto-relocating aliases. | 61 | * auto-relocating aliases. |
62 | */ | 62 | */ |
diff --git a/drivers/mtd/maps/pq2fads.c b/drivers/mtd/maps/pq2fads.c index e959076b1bf6..fb78d87cc130 100644 --- a/drivers/mtd/maps/pq2fads.c +++ b/drivers/mtd/maps/pq2fads.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
24 | 24 | ||
25 | /* | 25 | /* |
26 | NOTE: bank width and interleave relative to the installed flash | 26 | NOTE: bank width and interleave relative to the installed flash |
27 | should have been chosen within MTD_CFI_GEOMETRY options. | 27 | should have been chosen within MTD_CFI_GEOMETRY options. |
28 | */ | 28 | */ |
29 | #define PQ2FADS_BANK_WIDTH 4 | 29 | #define PQ2FADS_BANK_WIDTH 4 |
@@ -35,7 +35,7 @@ static struct mtd_partition pq2fads_partitions[] = { | |||
35 | .size = 0x40000, | 35 | .size = 0x40000, |
36 | .offset = 0, | 36 | .offset = 0, |
37 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | 37 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
38 | }, { | 38 | }, { |
39 | .name = "User FS", | 39 | .name = "User FS", |
40 | .size = 0x5c0000, | 40 | .size = 0x5c0000, |
41 | .offset = 0x40000, | 41 | .offset = 0x40000, |
@@ -44,17 +44,17 @@ static struct mtd_partition pq2fads_partitions[] = { | |||
44 | .size = 0x600000, | 44 | .size = 0x600000, |
45 | .offset = 0, | 45 | .offset = 0, |
46 | #endif | 46 | #endif |
47 | }, { | 47 | }, { |
48 | .name = "uImage", | 48 | .name = "uImage", |
49 | .size = 0x100000, | 49 | .size = 0x100000, |
50 | .offset = 0x600000, | 50 | .offset = 0x600000, |
51 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | 51 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
52 | }, { | 52 | }, { |
53 | .name = "bootloader", | 53 | .name = "bootloader", |
54 | .size = 0x40000, | 54 | .size = 0x40000, |
55 | .offset = 0x700000, | 55 | .offset = 0x700000, |
56 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | 56 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
57 | }, { | 57 | }, { |
58 | .name = "bootloader env", | 58 | .name = "bootloader env", |
59 | .size = 0x40000, | 59 | .size = 0x40000, |
60 | .offset = 0x740000, | 60 | .offset = 0x740000, |
@@ -80,9 +80,9 @@ static int __init init_pq2fads_mtd(void) | |||
80 | static void __exit cleanup_pq2fads_mtd(void) | 80 | static void __exit cleanup_pq2fads_mtd(void) |
81 | { | 81 | { |
82 | } | 82 | } |
83 | 83 | ||
84 | module_init(init_pq2fads_mtd); | 84 | module_init(init_pq2fads_mtd); |
85 | module_exit(cleanup_pq2fads_mtd); | 85 | module_exit(cleanup_pq2fads_mtd); |
86 | 86 | ||
87 | MODULE_LICENSE("GPL"); | 87 | MODULE_LICENSE("GPL"); |
88 | MODULE_DESCRIPTION("MTD map and partitions for MPC8272ADS boards"); | 88 | MODULE_DESCRIPTION("MTD map and partitions for MPC8272ADS boards"); |
diff --git a/drivers/mtd/maps/redwood.c b/drivers/mtd/maps/redwood.c index edd01ee4f90b..5b76ed886185 100644 --- a/drivers/mtd/maps/redwood.c +++ b/drivers/mtd/maps/redwood.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: redwood.c,v 1.10 2004/11/04 13:24:15 gleixner Exp $ | 2 | * $Id: redwood.c,v 1.11 2005/11/07 11:14:28 gleixner Exp $ |
3 | * | 3 | * |
4 | * drivers/mtd/maps/redwood.c | 4 | * drivers/mtd/maps/redwood.c |
5 | * | 5 | * |
@@ -79,7 +79,7 @@ static struct mtd_partition redwood_flash_partitions[] = { | |||
79 | 79 | ||
80 | #define RW_PART0_OF 0 | 80 | #define RW_PART0_OF 0 |
81 | #define RW_PART0_SZ 0x400000 /* 4 MiB data */ | 81 | #define RW_PART0_SZ 0x400000 /* 4 MiB data */ |
82 | #define RW_PART1_OF RW_PART0_OF + RW_PART0_SZ | 82 | #define RW_PART1_OF RW_PART0_OF + RW_PART0_SZ |
83 | #define RW_PART1_SZ 0x10000 /* 64K VPD */ | 83 | #define RW_PART1_SZ 0x10000 /* 64K VPD */ |
84 | #define RW_PART2_OF RW_PART1_OF + RW_PART1_SZ | 84 | #define RW_PART2_OF RW_PART1_OF + RW_PART1_SZ |
85 | #define RW_PART2_SZ 0x400000 - (0x10000 + 0x20000) | 85 | #define RW_PART2_SZ 0x400000 - (0x10000 + 0x20000) |
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c index c8d0da19d897..92cf158abb1f 100644 --- a/drivers/mtd/maps/sa1100-flash.c +++ b/drivers/mtd/maps/sa1100-flash.c | |||
@@ -1,9 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Flash memory access on SA11x0 based devices | 2 | * Flash memory access on SA11x0 based devices |
3 | * | 3 | * |
4 | * (C) 2000 Nicolas Pitre <nico@cam.org> | 4 | * (C) 2000 Nicolas Pitre <nico@cam.org> |
5 | * | 5 | * |
6 | * $Id: sa1100-flash.c,v 1.47 2004/11/01 13:44:36 rmk Exp $ | 6 | * $Id: sa1100-flash.c,v 1.51 2005/11/07 11:14:28 gleixner Exp $ |
7 | */ | 7 | */ |
8 | #include <linux/config.h> | 8 | #include <linux/config.h> |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
diff --git a/drivers/mtd/maps/sbc8240.c b/drivers/mtd/maps/sbc8240.c index da684d3384e9..225cdd9ba5b2 100644 --- a/drivers/mtd/maps/sbc8240.c +++ b/drivers/mtd/maps/sbc8240.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * This code is GPLed | 6 | * This code is GPLed |
7 | * | 7 | * |
8 | * $Id: sbc8240.c,v 1.4 2004/07/12 22:38:29 dwmw2 Exp $ | 8 | * $Id: sbc8240.c,v 1.5 2005/11/07 11:14:28 gleixner Exp $ |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
@@ -205,7 +205,7 @@ int __init init_sbc8240_mtd (void) | |||
205 | } else { | 205 | } else { |
206 | printk (KERN_NOTICE MSG_PREFIX | 206 | printk (KERN_NOTICE MSG_PREFIX |
207 | "Using %s partition definition\n", sbc8240_part_banks[i].mtd_part->name); | 207 | "Using %s partition definition\n", sbc8240_part_banks[i].mtd_part->name); |
208 | add_mtd_partitions (sbc8240_mtd[i], | 208 | add_mtd_partitions (sbc8240_mtd[i], |
209 | sbc8240_part_banks[i].mtd_part, | 209 | sbc8240_part_banks[i].mtd_part, |
210 | sbc8240_part_banks[i].nums); | 210 | sbc8240_part_banks[i].nums); |
211 | } | 211 | } |
diff --git a/drivers/mtd/maps/sbc_gxx.c b/drivers/mtd/maps/sbc_gxx.c index 65add28bde14..7cc4041d096d 100644 --- a/drivers/mtd/maps/sbc_gxx.c +++ b/drivers/mtd/maps/sbc_gxx.c | |||
@@ -1,35 +1,35 @@ | |||
1 | /* sbc_gxx.c -- MTD map driver for Arcom Control Systems SBC-MediaGX, | 1 | /* sbc_gxx.c -- MTD map driver for Arcom Control Systems SBC-MediaGX, |
2 | SBC-GXm and SBC-GX1 series boards. | 2 | SBC-GXm and SBC-GX1 series boards. |
3 | 3 | ||
4 | Copyright (C) 2001 Arcom Control System Ltd | 4 | Copyright (C) 2001 Arcom Control System Ltd |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
19 | 19 | ||
20 | $Id: sbc_gxx.c,v 1.33 2004/11/28 09:40:40 dwmw2 Exp $ | 20 | $Id: sbc_gxx.c,v 1.35 2005/11/07 11:14:28 gleixner Exp $ |
21 | 21 | ||
22 | The SBC-MediaGX / SBC-GXx has up to 16 MiB of | 22 | The SBC-MediaGX / SBC-GXx has up to 16 MiB of |
23 | Intel StrataFlash (28F320/28F640) in x8 mode. | 23 | Intel StrataFlash (28F320/28F640) in x8 mode. |
24 | 24 | ||
25 | This driver uses the CFI probe and Intel Extended Command Set drivers. | 25 | This driver uses the CFI probe and Intel Extended Command Set drivers. |
26 | 26 | ||
27 | The flash is accessed as follows: | 27 | The flash is accessed as follows: |
28 | 28 | ||
29 | 16 KiB memory window at 0xdc000-0xdffff | 29 | 16 KiB memory window at 0xdc000-0xdffff |
30 | 30 | ||
31 | Two IO address locations for paging | 31 | Two IO address locations for paging |
32 | 32 | ||
33 | 0x258 | 33 | 0x258 |
34 | bit 0-7: address bit 14-21 | 34 | bit 0-7: address bit 14-21 |
35 | 0x259 | 35 | 0x259 |
@@ -37,7 +37,7 @@ The flash is accessed as follows: | |||
37 | bit 7: 0 - reset/powered down | 37 | bit 7: 0 - reset/powered down |
38 | 1 - device enabled | 38 | 1 - device enabled |
39 | 39 | ||
40 | The single flash device is divided into 3 partition which appear as | 40 | The single flash device is divided into 3 partition which appear as |
41 | separate MTD devices. | 41 | separate MTD devices. |
42 | 42 | ||
43 | 25/04/2001 AJL (Arcom) Modified signon strings and partition sizes | 43 | 25/04/2001 AJL (Arcom) Modified signon strings and partition sizes |
@@ -87,17 +87,17 @@ static volatile int page_in_window = -1; // Current page in window. | |||
87 | static void __iomem *iomapadr; | 87 | static void __iomem *iomapadr; |
88 | static DEFINE_SPINLOCK(sbc_gxx_spin); | 88 | static DEFINE_SPINLOCK(sbc_gxx_spin); |
89 | 89 | ||
90 | /* partition_info gives details on the logical partitions that the split the | 90 | /* partition_info gives details on the logical partitions that the split the |
91 | * single flash device into. If the size if zero we use up to the end of the | 91 | * single flash device into. If the size if zero we use up to the end of the |
92 | * device. */ | 92 | * device. */ |
93 | static struct mtd_partition partition_info[]={ | 93 | static struct mtd_partition partition_info[]={ |
94 | { .name = "SBC-GXx flash boot partition", | 94 | { .name = "SBC-GXx flash boot partition", |
95 | .offset = 0, | 95 | .offset = 0, |
96 | .size = BOOT_PARTITION_SIZE_KiB*1024 }, | 96 | .size = BOOT_PARTITION_SIZE_KiB*1024 }, |
97 | { .name = "SBC-GXx flash data partition", | 97 | { .name = "SBC-GXx flash data partition", |
98 | .offset = BOOT_PARTITION_SIZE_KiB*1024, | 98 | .offset = BOOT_PARTITION_SIZE_KiB*1024, |
99 | .size = (DATA_PARTITION_SIZE_KiB)*1024 }, | 99 | .size = (DATA_PARTITION_SIZE_KiB)*1024 }, |
100 | { .name = "SBC-GXx flash application partition", | 100 | { .name = "SBC-GXx flash application partition", |
101 | .offset = (BOOT_PARTITION_SIZE_KiB+DATA_PARTITION_SIZE_KiB)*1024 } | 101 | .offset = (BOOT_PARTITION_SIZE_KiB+DATA_PARTITION_SIZE_KiB)*1024 } |
102 | }; | 102 | }; |
103 | 103 | ||
@@ -130,7 +130,7 @@ static void sbc_gxx_copy_from(struct map_info *map, void *to, unsigned long from | |||
130 | unsigned long thislen = len; | 130 | unsigned long thislen = len; |
131 | if (len > (WINDOW_LENGTH - (from & WINDOW_MASK))) | 131 | if (len > (WINDOW_LENGTH - (from & WINDOW_MASK))) |
132 | thislen = WINDOW_LENGTH-(from & WINDOW_MASK); | 132 | thislen = WINDOW_LENGTH-(from & WINDOW_MASK); |
133 | 133 | ||
134 | spin_lock(&sbc_gxx_spin); | 134 | spin_lock(&sbc_gxx_spin); |
135 | sbc_gxx_page(map, from); | 135 | sbc_gxx_page(map, from); |
136 | memcpy_fromio(to, iomapadr + (from & WINDOW_MASK), thislen); | 136 | memcpy_fromio(to, iomapadr + (from & WINDOW_MASK), thislen); |
@@ -150,12 +150,12 @@ static void sbc_gxx_write8(struct map_info *map, map_word d, unsigned long adr) | |||
150 | } | 150 | } |
151 | 151 | ||
152 | static void sbc_gxx_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len) | 152 | static void sbc_gxx_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len) |
153 | { | 153 | { |
154 | while(len) { | 154 | while(len) { |
155 | unsigned long thislen = len; | 155 | unsigned long thislen = len; |
156 | if (len > (WINDOW_LENGTH - (to & WINDOW_MASK))) | 156 | if (len > (WINDOW_LENGTH - (to & WINDOW_MASK))) |
157 | thislen = WINDOW_LENGTH-(to & WINDOW_MASK); | 157 | thislen = WINDOW_LENGTH-(to & WINDOW_MASK); |
158 | 158 | ||
159 | spin_lock(&sbc_gxx_spin); | 159 | spin_lock(&sbc_gxx_spin); |
160 | sbc_gxx_page(map, to); | 160 | sbc_gxx_page(map, to); |
161 | memcpy_toio(iomapadr + (to & WINDOW_MASK), from, thislen); | 161 | memcpy_toio(iomapadr + (to & WINDOW_MASK), from, thislen); |
@@ -201,7 +201,7 @@ static int __init init_sbc_gxx(void) | |||
201 | sbc_gxx_map.name ); | 201 | sbc_gxx_map.name ); |
202 | return -EIO; | 202 | return -EIO; |
203 | } | 203 | } |
204 | 204 | ||
205 | if (!request_region( PAGE_IO, PAGE_IO_SIZE, "SBC-GXx flash")) { | 205 | if (!request_region( PAGE_IO, PAGE_IO_SIZE, "SBC-GXx flash")) { |
206 | printk( KERN_ERR"%s: IO ports 0x%x-0x%x in use\n", | 206 | printk( KERN_ERR"%s: IO ports 0x%x-0x%x in use\n", |
207 | sbc_gxx_map.name, | 207 | sbc_gxx_map.name, |
@@ -209,8 +209,8 @@ static int __init init_sbc_gxx(void) | |||
209 | iounmap(iomapadr); | 209 | iounmap(iomapadr); |
210 | return -EAGAIN; | 210 | return -EAGAIN; |
211 | } | 211 | } |
212 | 212 | ||
213 | 213 | ||
214 | printk( KERN_INFO"%s: IO:0x%x-0x%x MEM:0x%x-0x%x\n", | 214 | printk( KERN_INFO"%s: IO:0x%x-0x%x MEM:0x%x-0x%x\n", |
215 | sbc_gxx_map.name, | 215 | sbc_gxx_map.name, |
216 | PAGE_IO, PAGE_IO+PAGE_IO_SIZE-1, | 216 | PAGE_IO, PAGE_IO+PAGE_IO_SIZE-1, |
@@ -222,7 +222,7 @@ static int __init init_sbc_gxx(void) | |||
222 | cleanup_sbc_gxx(); | 222 | cleanup_sbc_gxx(); |
223 | return -ENXIO; | 223 | return -ENXIO; |
224 | } | 224 | } |
225 | 225 | ||
226 | all_mtd->owner = THIS_MODULE; | 226 | all_mtd->owner = THIS_MODULE; |
227 | 227 | ||
228 | /* Create MTD devices for each partition. */ | 228 | /* Create MTD devices for each partition. */ |
diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c index a06ed21e7ed1..6fb9f3c57aab 100644 --- a/drivers/mtd/maps/sc520cdp.c +++ b/drivers/mtd/maps/sc520cdp.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
18 | * | 18 | * |
19 | * $Id: sc520cdp.c,v 1.21 2004/12/13 10:27:08 dedekind Exp $ | 19 | * $Id: sc520cdp.c,v 1.22 2005/11/07 11:14:28 gleixner Exp $ |
20 | * | 20 | * |
21 | * | 21 | * |
22 | * The SC520CDP is an evaluation board for the Elan SC520 processor available | 22 | * The SC520CDP is an evaluation board for the Elan SC520 processor available |
@@ -231,7 +231,7 @@ static void sc520cdp_setup_par(void) | |||
231 | static int __init init_sc520cdp(void) | 231 | static int __init init_sc520cdp(void) |
232 | { | 232 | { |
233 | int i, devices_found = 0; | 233 | int i, devices_found = 0; |
234 | 234 | ||
235 | #ifdef REPROGRAM_PAR | 235 | #ifdef REPROGRAM_PAR |
236 | /* reprogram PAR registers so flash appears at the desired addresses */ | 236 | /* reprogram PAR registers so flash appears at the desired addresses */ |
237 | sc520cdp_setup_par(); | 237 | sc520cdp_setup_par(); |
@@ -278,7 +278,7 @@ static int __init init_sc520cdp(void) | |||
278 | static void __exit cleanup_sc520cdp(void) | 278 | static void __exit cleanup_sc520cdp(void) |
279 | { | 279 | { |
280 | int i; | 280 | int i; |
281 | 281 | ||
282 | if (merged_mtd) { | 282 | if (merged_mtd) { |
283 | del_mtd_device(merged_mtd); | 283 | del_mtd_device(merged_mtd); |
284 | mtd_concat_destroy(merged_mtd); | 284 | mtd_concat_destroy(merged_mtd); |
diff --git a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c index 0ece3786d6ea..2c91dff8bb60 100644 --- a/drivers/mtd/maps/scx200_docflash.c +++ b/drivers/mtd/maps/scx200_docflash.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* linux/drivers/mtd/maps/scx200_docflash.c | 1 | /* linux/drivers/mtd/maps/scx200_docflash.c |
2 | 2 | ||
3 | Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com> | 3 | Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com> |
4 | 4 | ||
5 | $Id: scx200_docflash.c,v 1.10 2004/11/28 09:40:40 dwmw2 Exp $ | 5 | $Id: scx200_docflash.c,v 1.12 2005/11/07 11:14:28 gleixner Exp $ |
6 | 6 | ||
7 | National Semiconductor SCx200 flash mapped with DOCCS | 7 | National Semiconductor SCx200 flash mapped with DOCCS |
8 | */ | 8 | */ |
@@ -49,23 +49,23 @@ static struct mtd_info *mymtd; | |||
49 | 49 | ||
50 | #ifdef CONFIG_MTD_PARTITIONS | 50 | #ifdef CONFIG_MTD_PARTITIONS |
51 | static struct mtd_partition partition_info[] = { | 51 | static struct mtd_partition partition_info[] = { |
52 | { | 52 | { |
53 | .name = "DOCCS Boot kernel", | 53 | .name = "DOCCS Boot kernel", |
54 | .offset = 0, | 54 | .offset = 0, |
55 | .size = 0xc0000 | 55 | .size = 0xc0000 |
56 | }, | 56 | }, |
57 | { | 57 | { |
58 | .name = "DOCCS Low BIOS", | 58 | .name = "DOCCS Low BIOS", |
59 | .offset = 0xc0000, | 59 | .offset = 0xc0000, |
60 | .size = 0x40000 | 60 | .size = 0x40000 |
61 | }, | 61 | }, |
62 | { | 62 | { |
63 | .name = "DOCCS File system", | 63 | .name = "DOCCS File system", |
64 | .offset = 0x100000, | 64 | .offset = 0x100000, |
65 | .size = ~0 /* calculate from flash size */ | 65 | .size = ~0 /* calculate from flash size */ |
66 | }, | 66 | }, |
67 | { | 67 | { |
68 | .name = "DOCCS High BIOS", | 68 | .name = "DOCCS High BIOS", |
69 | .offset = ~0, /* calculate from flash size */ | 69 | .offset = ~0, /* calculate from flash size */ |
70 | .size = 0x80000 | 70 | .size = 0x80000 |
71 | }, | 71 | }, |
@@ -88,7 +88,7 @@ static int __init init_scx200_docflash(void) | |||
88 | 88 | ||
89 | printk(KERN_DEBUG NAME ": NatSemi SCx200 DOCCS Flash Driver\n"); | 89 | printk(KERN_DEBUG NAME ": NatSemi SCx200 DOCCS Flash Driver\n"); |
90 | 90 | ||
91 | if ((bridge = pci_find_device(PCI_VENDOR_ID_NS, | 91 | if ((bridge = pci_find_device(PCI_VENDOR_ID_NS, |
92 | PCI_DEVICE_ID_NS_SCx200_BRIDGE, | 92 | PCI_DEVICE_ID_NS_SCx200_BRIDGE, |
93 | NULL)) == NULL) | 93 | NULL)) == NULL) |
94 | return -ENODEV; | 94 | return -ENODEV; |
@@ -134,28 +134,28 @@ static int __init init_scx200_docflash(void) | |||
134 | printk(KERN_ERR NAME ": invalid size for flash mapping\n"); | 134 | printk(KERN_ERR NAME ": invalid size for flash mapping\n"); |
135 | return -EINVAL; | 135 | return -EINVAL; |
136 | } | 136 | } |
137 | 137 | ||
138 | if (width != 8 && width != 16) { | 138 | if (width != 8 && width != 16) { |
139 | printk(KERN_ERR NAME ": invalid bus width for flash mapping\n"); | 139 | printk(KERN_ERR NAME ": invalid bus width for flash mapping\n"); |
140 | return -EINVAL; | 140 | return -EINVAL; |
141 | } | 141 | } |
142 | 142 | ||
143 | if (allocate_resource(&iomem_resource, &docmem, | 143 | if (allocate_resource(&iomem_resource, &docmem, |
144 | size, | 144 | size, |
145 | 0xc0000000, 0xffffffff, | 145 | 0xc0000000, 0xffffffff, |
146 | size, NULL, NULL)) { | 146 | size, NULL, NULL)) { |
147 | printk(KERN_ERR NAME ": unable to allocate memory for flash mapping\n"); | 147 | printk(KERN_ERR NAME ": unable to allocate memory for flash mapping\n"); |
148 | return -ENOMEM; | 148 | return -ENOMEM; |
149 | } | 149 | } |
150 | 150 | ||
151 | ctrl = 0x07000000 | ((size-1) >> 13); | 151 | ctrl = 0x07000000 | ((size-1) >> 13); |
152 | 152 | ||
153 | printk(KERN_INFO "DOCCS BASE=0x%08lx, CTRL=0x%08lx\n", (long)docmem.start, (long)ctrl); | 153 | printk(KERN_INFO "DOCCS BASE=0x%08lx, CTRL=0x%08lx\n", (long)docmem.start, (long)ctrl); |
154 | 154 | ||
155 | pci_write_config_dword(bridge, SCx200_DOCCS_BASE, docmem.start); | 155 | pci_write_config_dword(bridge, SCx200_DOCCS_BASE, docmem.start); |
156 | pci_write_config_dword(bridge, SCx200_DOCCS_CTRL, ctrl); | 156 | pci_write_config_dword(bridge, SCx200_DOCCS_CTRL, ctrl); |
157 | pmr = inl(scx200_cb_base + SCx200_PMR); | 157 | pmr = inl(scx200_cb_base + SCx200_PMR); |
158 | 158 | ||
159 | if (width == 8) { | 159 | if (width == 8) { |
160 | pmr &= ~(1<<6); | 160 | pmr &= ~(1<<6); |
161 | } else { | 161 | } else { |
@@ -163,8 +163,8 @@ static int __init init_scx200_docflash(void) | |||
163 | } | 163 | } |
164 | outl(pmr, scx200_cb_base + SCx200_PMR); | 164 | outl(pmr, scx200_cb_base + SCx200_PMR); |
165 | } | 165 | } |
166 | 166 | ||
167 | printk(KERN_INFO NAME ": DOCCS mapped at 0x%lx-0x%lx, width %d\n", | 167 | printk(KERN_INFO NAME ": DOCCS mapped at 0x%lx-0x%lx, width %d\n", |
168 | docmem.start, docmem.end, width); | 168 | docmem.start, docmem.end, width); |
169 | 169 | ||
170 | scx200_docflash_map.size = size; | 170 | scx200_docflash_map.size = size; |
diff --git a/drivers/mtd/maps/sharpsl-flash.c b/drivers/mtd/maps/sharpsl-flash.c index b7f093fbf9b0..999f4bb3d845 100644 --- a/drivers/mtd/maps/sharpsl-flash.c +++ b/drivers/mtd/maps/sharpsl-flash.c | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * sharpsl-flash.c | 2 | * sharpsl-flash.c |
3 | * | 3 | * |
4 | * Copyright (C) 2001 Lineo Japan, Inc. | 4 | * Copyright (C) 2001 Lineo Japan, Inc. |
5 | * Copyright (C) 2002 SHARP | 5 | * Copyright (C) 2002 SHARP |
6 | * | 6 | * |
7 | * $Id: sharpsl-flash.c,v 1.5 2005/03/21 08:42:11 rpurdie Exp $ | 7 | * $Id: sharpsl-flash.c,v 1.7 2005/11/07 11:14:28 gleixner Exp $ |
8 | * | 8 | * |
9 | * based on rpxlite.c,v 1.15 2001/10/02 15:05:14 dwmw2 Exp | 9 | * based on rpxlite.c,v 1.15 2001/10/02 15:05:14 dwmw2 Exp |
10 | * Handle mapping of the flash on the RPX Lite and CLLF boards | 10 | * Handle mapping of the flash on the RPX Lite and CLLF boards |
@@ -57,7 +57,7 @@ int __init init_sharpsl(void) | |||
57 | int nb_parts = 0; | 57 | int nb_parts = 0; |
58 | char *part_type = "static"; | 58 | char *part_type = "static"; |
59 | 59 | ||
60 | printk(KERN_NOTICE "Sharp SL series flash device: %x at %x\n", | 60 | printk(KERN_NOTICE "Sharp SL series flash device: %x at %x\n", |
61 | WINDOW_SIZE, WINDOW_ADDR); | 61 | WINDOW_SIZE, WINDOW_ADDR); |
62 | sharpsl_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); | 62 | sharpsl_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); |
63 | if (!sharpsl_map.virt) { | 63 | if (!sharpsl_map.virt) { |
@@ -75,7 +75,7 @@ int __init init_sharpsl(void) | |||
75 | 75 | ||
76 | mymtd->owner = THIS_MODULE; | 76 | mymtd->owner = THIS_MODULE; |
77 | 77 | ||
78 | if (machine_is_corgi() || machine_is_shepherd() || machine_is_husky() | 78 | if (machine_is_corgi() || machine_is_shepherd() || machine_is_husky() |
79 | || machine_is_poodle()) { | 79 | || machine_is_poodle()) { |
80 | sharpsl_partitions[0].size=0x006d0000; | 80 | sharpsl_partitions[0].size=0x006d0000; |
81 | sharpsl_partitions[0].offset=0x00120000; | 81 | sharpsl_partitions[0].offset=0x00120000; |
@@ -87,10 +87,10 @@ int __init init_sharpsl(void) | |||
87 | sharpsl_partitions[0].offset=0x00140000; | 87 | sharpsl_partitions[0].offset=0x00140000; |
88 | } else { | 88 | } else { |
89 | map_destroy(mymtd); | 89 | map_destroy(mymtd); |
90 | iounmap(sharpsl_map.virt); | 90 | iounmap(sharpsl_map.virt); |
91 | return -ENODEV; | 91 | return -ENODEV; |
92 | } | 92 | } |
93 | 93 | ||
94 | parts = sharpsl_partitions; | 94 | parts = sharpsl_partitions; |
95 | nb_parts = NB_OF(sharpsl_partitions); | 95 | nb_parts = NB_OF(sharpsl_partitions); |
96 | 96 | ||
diff --git a/drivers/mtd/maps/solutionengine.c b/drivers/mtd/maps/solutionengine.c index 8ce5d897645c..c53c2c369c9d 100644 --- a/drivers/mtd/maps/solutionengine.c +++ b/drivers/mtd/maps/solutionengine.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: solutionengine.c,v 1.14 2004/09/16 23:27:14 gleixner Exp $ | 2 | * $Id: solutionengine.c,v 1.15 2005/11/07 11:14:28 gleixner Exp $ |
3 | * | 3 | * |
4 | * Flash and EPROM on Hitachi Solution Engine and similar boards. | 4 | * Flash and EPROM on Hitachi Solution Engine and similar boards. |
5 | * | 5 | * |
@@ -67,7 +67,7 @@ static int __init init_soleng_maps(void) | |||
67 | soleng_eprom_map.virt = (void __iomem *)P1SEGADDR(0x01000000); | 67 | soleng_eprom_map.virt = (void __iomem *)P1SEGADDR(0x01000000); |
68 | simple_map_init(&soleng_eprom_map); | 68 | simple_map_init(&soleng_eprom_map); |
69 | simple_map_init(&soleng_flash_map); | 69 | simple_map_init(&soleng_flash_map); |
70 | 70 | ||
71 | printk(KERN_NOTICE "Probing for flash chips at 0x00000000:\n"); | 71 | printk(KERN_NOTICE "Probing for flash chips at 0x00000000:\n"); |
72 | flash_mtd = do_map_probe("cfi_probe", &soleng_flash_map); | 72 | flash_mtd = do_map_probe("cfi_probe", &soleng_flash_map); |
73 | if (!flash_mtd) { | 73 | if (!flash_mtd) { |
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index 29091d10030a..47941fbe74f6 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sun_uflash.c,v 1.11 2004/11/04 13:24:15 gleixner Exp $ | 1 | /* $Id: sun_uflash.c,v 1.13 2005/11/07 11:14:28 gleixner Exp $ |
2 | * | 2 | * |
3 | * sun_uflash - Driver implementation for user-programmable flash | 3 | * sun_uflash - Driver implementation for user-programmable flash |
4 | * present on many Sun Microsystems SME boardsets. | 4 | * present on many Sun Microsystems SME boardsets. |
@@ -63,7 +63,7 @@ int uflash_devinit(struct linux_ebus_device* edev) | |||
63 | iTmp = prom_getproperty( | 63 | iTmp = prom_getproperty( |
64 | edev->prom_node, "reg", (void *)regs, sizeof(regs)); | 64 | edev->prom_node, "reg", (void *)regs, sizeof(regs)); |
65 | if ((iTmp % sizeof(regs[0])) != 0) { | 65 | if ((iTmp % sizeof(regs[0])) != 0) { |
66 | printk("%s: Strange reg property size %d\n", | 66 | printk("%s: Strange reg property size %d\n", |
67 | UFLASH_DEVNAME, iTmp); | 67 | UFLASH_DEVNAME, iTmp); |
68 | return -ENODEV; | 68 | return -ENODEV; |
69 | } | 69 | } |
@@ -75,7 +75,7 @@ int uflash_devinit(struct linux_ebus_device* edev) | |||
75 | * can work on supporting it. | 75 | * can work on supporting it. |
76 | */ | 76 | */ |
77 | printk("%s: unsupported device at 0x%lx (%d regs): " \ | 77 | printk("%s: unsupported device at 0x%lx (%d regs): " \ |
78 | "email ebrower@usa.net\n", | 78 | "email ebrower@usa.net\n", |
79 | UFLASH_DEVNAME, edev->resource[0].start, nregs); | 79 | UFLASH_DEVNAME, edev->resource[0].start, nregs); |
80 | return -ENODEV; | 80 | return -ENODEV; |
81 | } | 81 | } |
@@ -84,7 +84,7 @@ int uflash_devinit(struct linux_ebus_device* edev) | |||
84 | printk("%s: unable to kmalloc new device\n", UFLASH_DEVNAME); | 84 | printk("%s: unable to kmalloc new device\n", UFLASH_DEVNAME); |
85 | return(-ENOMEM); | 85 | return(-ENOMEM); |
86 | } | 86 | } |
87 | 87 | ||
88 | /* copy defaults and tweak parameters */ | 88 | /* copy defaults and tweak parameters */ |
89 | memcpy(&pdev->map, &uflash_map_templ, sizeof(uflash_map_templ)); | 89 | memcpy(&pdev->map, &uflash_map_templ, sizeof(uflash_map_templ)); |
90 | pdev->map.size = regs[0].reg_size; | 90 | pdev->map.size = regs[0].reg_size; |
@@ -155,7 +155,7 @@ static void __exit uflash_cleanup(void) | |||
155 | 155 | ||
156 | list_for_each(udevlist, &device_list) { | 156 | list_for_each(udevlist, &device_list) { |
157 | udev = list_entry(udevlist, struct uflash_dev, list); | 157 | udev = list_entry(udevlist, struct uflash_dev, list); |
158 | DEBUG(2, "%s: removing device %s\n", | 158 | DEBUG(2, "%s: removing device %s\n", |
159 | UFLASH_DEVNAME, udev->name); | 159 | UFLASH_DEVNAME, udev->name); |
160 | 160 | ||
161 | if(0 != udev->mtd) { | 161 | if(0 != udev->mtd) { |
@@ -170,7 +170,7 @@ static void __exit uflash_cleanup(void) | |||
170 | kfree(udev->name); | 170 | kfree(udev->name); |
171 | } | 171 | } |
172 | kfree(udev); | 172 | kfree(udev); |
173 | } | 173 | } |
174 | } | 174 | } |
175 | 175 | ||
176 | module_init(uflash_init); | 176 | module_init(uflash_init); |
diff --git a/drivers/mtd/maps/tqm834x.c b/drivers/mtd/maps/tqm834x.c index d0bc9593cb4d..c7ae9a515c1a 100644 --- a/drivers/mtd/maps/tqm834x.c +++ b/drivers/mtd/maps/tqm834x.c | |||
@@ -133,7 +133,7 @@ static int __init init_tqm834x_mtd(void) | |||
133 | 133 | ||
134 | pr_debug("%s: chip probing count %d\n", __FUNCTION__, idx); | 134 | pr_debug("%s: chip probing count %d\n", __FUNCTION__, idx); |
135 | 135 | ||
136 | map_banks[idx] = | 136 | map_banks[idx] = |
137 | (struct map_info *)kmalloc(sizeof(struct map_info), | 137 | (struct map_info *)kmalloc(sizeof(struct map_info), |
138 | GFP_KERNEL); | 138 | GFP_KERNEL); |
139 | if (map_banks[idx] == NULL) { | 139 | if (map_banks[idx] == NULL) { |
@@ -193,7 +193,7 @@ static int __init init_tqm834x_mtd(void) | |||
193 | tqm834x_partitions_bank1[n - 1].size = | 193 | tqm834x_partitions_bank1[n - 1].size = |
194 | mtd_banks[0]->size - | 194 | mtd_banks[0]->size - |
195 | tqm834x_partitions_bank1[n - 1].offset; | 195 | tqm834x_partitions_bank1[n - 1].offset; |
196 | 196 | ||
197 | /* check if we have second bank? */ | 197 | /* check if we have second bank? */ |
198 | if (num_banks == 2) { | 198 | if (num_banks == 2) { |
199 | n = ARRAY_SIZE(tqm834x_partitions_bank2); | 199 | n = ARRAY_SIZE(tqm834x_partitions_bank2); |
@@ -227,11 +227,11 @@ static int __init init_tqm834x_mtd(void) | |||
227 | "available, registering whole device\n", idx); | 227 | "available, registering whole device\n", idx); |
228 | add_mtd_device(mtd_banks[idx]); | 228 | add_mtd_device(mtd_banks[idx]); |
229 | } else { | 229 | } else { |
230 | printk(KERN_NOTICE | 230 | printk(KERN_NOTICE |
231 | "TQM834x flash bank %d: Using %s partition " | 231 | "TQM834x flash bank %d: Using %s partition " |
232 | "definition\n", idx, part_banks[idx].type); | 232 | "definition\n", idx, part_banks[idx].type); |
233 | add_mtd_partitions(mtd_banks[idx], | 233 | add_mtd_partitions(mtd_banks[idx], |
234 | part_banks[idx].mtd_part, | 234 | part_banks[idx].mtd_part, |
235 | part_banks[idx].nums); | 235 | part_banks[idx].nums); |
236 | } | 236 | } |
237 | } | 237 | } |
diff --git a/drivers/mtd/maps/tqm8xxl.c b/drivers/mtd/maps/tqm8xxl.c index 4e28b977f224..9cb5d679fe6d 100644 --- a/drivers/mtd/maps/tqm8xxl.c +++ b/drivers/mtd/maps/tqm8xxl.c | |||
@@ -1,15 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * Handle mapping of the flash memory access routines | 2 | * Handle mapping of the flash memory access routines |
3 | * on TQM8xxL based devices. | 3 | * on TQM8xxL based devices. |
4 | * | 4 | * |
5 | * $Id: tqm8xxl.c,v 1.13 2004/10/20 22:21:53 dwmw2 Exp $ | 5 | * $Id: tqm8xxl.c,v 1.15 2005/11/07 11:14:28 gleixner Exp $ |
6 | * | 6 | * |
7 | * based on rpxlite.c | 7 | * based on rpxlite.c |
8 | * | 8 | * |
9 | * Copyright(C) 2001 Kirk Lee <kirk@hpc.ee.ntu.edu.tw> | 9 | * Copyright(C) 2001 Kirk Lee <kirk@hpc.ee.ntu.edu.tw> |
10 | * | 10 | * |
11 | * This code is GPLed | 11 | * This code is GPLed |
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | /* | 15 | /* |
@@ -19,7 +19,7 @@ | |||
19 | * 2MiB 512Kx16 2MiB 0 | 19 | * 2MiB 512Kx16 2MiB 0 |
20 | * 4MiB 1Mx16 4MiB 0 | 20 | * 4MiB 1Mx16 4MiB 0 |
21 | * 8MiB 1Mx16 4MiB 4MiB | 21 | * 8MiB 1Mx16 4MiB 4MiB |
22 | * Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at | 22 | * Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at |
23 | * kernel configuration. | 23 | * kernel configuration. |
24 | */ | 24 | */ |
25 | #include <linux/config.h> | 25 | #include <linux/config.h> |
@@ -58,9 +58,9 @@ static void __iomem *start_scan_addr; | |||
58 | * Here are partition information for all known TQM8xxL series devices. | 58 | * Here are partition information for all known TQM8xxL series devices. |
59 | * See include/linux/mtd/partitions.h for definition of the mtd_partition | 59 | * See include/linux/mtd/partitions.h for definition of the mtd_partition |
60 | * structure. | 60 | * structure. |
61 | * | 61 | * |
62 | * The *_max_flash_size is the maximum possible mapped flash size which | 62 | * The *_max_flash_size is the maximum possible mapped flash size which |
63 | * is not necessarily the actual flash size. It must correspond to the | 63 | * is not necessarily the actual flash size. It must correspond to the |
64 | * value specified in the mapping definition defined by the | 64 | * value specified in the mapping definition defined by the |
65 | * "struct map_desc *_io_desc" for the corresponding machine. | 65 | * "struct map_desc *_io_desc" for the corresponding machine. |
66 | */ | 66 | */ |
@@ -132,9 +132,9 @@ int __init init_tqm_mtd(void) | |||
132 | for (idx = 0 ; idx < FLASH_BANK_MAX ; idx++) { | 132 | for (idx = 0 ; idx < FLASH_BANK_MAX ; idx++) { |
133 | if(mtd_size >= flash_size) | 133 | if(mtd_size >= flash_size) |
134 | break; | 134 | break; |
135 | 135 | ||
136 | printk(KERN_INFO "%s: chip probing count %d\n", __FUNCTION__, idx); | 136 | printk(KERN_INFO "%s: chip probing count %d\n", __FUNCTION__, idx); |
137 | 137 | ||
138 | map_banks[idx] = (struct map_info *)kmalloc(sizeof(struct map_info), GFP_KERNEL); | 138 | map_banks[idx] = (struct map_info *)kmalloc(sizeof(struct map_info), GFP_KERNEL); |
139 | if(map_banks[idx] == NULL) { | 139 | if(map_banks[idx] == NULL) { |
140 | ret = -ENOMEM; | 140 | ret = -ENOMEM; |
@@ -180,7 +180,7 @@ int __init init_tqm_mtd(void) | |||
180 | mtd_size += mtd_banks[idx]->size; | 180 | mtd_size += mtd_banks[idx]->size; |
181 | num_banks++; | 181 | num_banks++; |
182 | 182 | ||
183 | printk(KERN_INFO "%s: bank%d, name:%s, size:%dbytes \n", __FUNCTION__, num_banks, | 183 | printk(KERN_INFO "%s: bank%d, name:%s, size:%dbytes \n", __FUNCTION__, num_banks, |
184 | mtd_banks[idx]->name, mtd_banks[idx]->size); | 184 | mtd_banks[idx]->name, mtd_banks[idx]->size); |
185 | } | 185 | } |
186 | } | 186 | } |
@@ -211,7 +211,7 @@ int __init init_tqm_mtd(void) | |||
211 | } else { | 211 | } else { |
212 | printk(KERN_NOTICE "TQM flash%d: Using %s partition definition\n", | 212 | printk(KERN_NOTICE "TQM flash%d: Using %s partition definition\n", |
213 | idx, part_banks[idx].type); | 213 | idx, part_banks[idx].type); |
214 | add_mtd_partitions(mtd_banks[idx], part_banks[idx].mtd_part, | 214 | add_mtd_partitions(mtd_banks[idx], part_banks[idx].mtd_part, |
215 | part_banks[idx].nums); | 215 | part_banks[idx].nums); |
216 | } | 216 | } |
217 | } | 217 | } |
diff --git a/drivers/mtd/maps/ts5500_flash.c b/drivers/mtd/maps/ts5500_flash.c index 2762da954318..4b372bcb17f1 100644 --- a/drivers/mtd/maps/ts5500_flash.c +++ b/drivers/mtd/maps/ts5500_flash.c | |||
@@ -19,11 +19,11 @@ | |||
19 | * | 19 | * |
20 | * Note: | 20 | * Note: |
21 | * - In order for detection to work, jumper 3 must be set. | 21 | * - In order for detection to work, jumper 3 must be set. |
22 | * - Drive A and B use the resident flash disk (RFD) flash translation layer. | 22 | * - Drive A and B use the resident flash disk (RFD) flash translation layer. |
23 | * - If you have created your own jffs file system and the bios overwrites | 23 | * - If you have created your own jffs file system and the bios overwrites |
24 | * it during boot, try disabling Drive A: and B: in the boot order. | 24 | * it during boot, try disabling Drive A: and B: in the boot order. |
25 | * | 25 | * |
26 | * $Id: ts5500_flash.c,v 1.4 2005/06/29 09:29:43 sean Exp $ | 26 | * $Id: ts5500_flash.c,v 1.5 2005/11/07 11:14:28 gleixner Exp $ |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | 29 | #include <linux/config.h> |
diff --git a/drivers/mtd/maps/tsunami_flash.c b/drivers/mtd/maps/tsunami_flash.c index 170d71239e5e..9e21e6c02f80 100644 --- a/drivers/mtd/maps/tsunami_flash.c +++ b/drivers/mtd/maps/tsunami_flash.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * tsunami_flash.c | 2 | * tsunami_flash.c |
3 | * | 3 | * |
4 | * flash chip on alpha ds10... | 4 | * flash chip on alpha ds10... |
5 | * $Id: tsunami_flash.c,v 1.9 2004/07/14 09:52:55 dwmw2 Exp $ | 5 | * $Id: tsunami_flash.c,v 1.10 2005/11/07 11:14:29 gleixner Exp $ |
6 | */ | 6 | */ |
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | #include <asm/core_tsunami.h> | 8 | #include <asm/core_tsunami.h> |
@@ -41,7 +41,7 @@ static void tsunami_flash_copy_from( | |||
41 | } | 41 | } |
42 | 42 | ||
43 | static void tsunami_flash_copy_to( | 43 | static void tsunami_flash_copy_to( |
44 | struct map_info *map, unsigned long offset, | 44 | struct map_info *map, unsigned long offset, |
45 | const void *addr, ssize_t len) | 45 | const void *addr, ssize_t len) |
46 | { | 46 | { |
47 | const unsigned char *src; | 47 | const unsigned char *src; |
@@ -90,7 +90,7 @@ static int __init init_tsunami_flash(void) | |||
90 | char **type; | 90 | char **type; |
91 | 91 | ||
92 | tsunami_tig_writeb(FLASH_ENABLE_BYTE, FLASH_ENABLE_PORT); | 92 | tsunami_tig_writeb(FLASH_ENABLE_BYTE, FLASH_ENABLE_PORT); |
93 | 93 | ||
94 | tsunami_flash_mtd = 0; | 94 | tsunami_flash_mtd = 0; |
95 | type = rom_probe_types; | 95 | type = rom_probe_types; |
96 | for(; !tsunami_flash_mtd && *type; type++) { | 96 | for(; !tsunami_flash_mtd && *type; type++) { |
diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c index cc372136e852..79d92808b766 100644 --- a/drivers/mtd/maps/uclinux.c +++ b/drivers/mtd/maps/uclinux.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) | 6 | * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) |
7 | * | 7 | * |
8 | * $Id: uclinux.c,v 1.10 2005/01/05 18:05:13 dwmw2 Exp $ | 8 | * $Id: uclinux.c,v 1.12 2005/11/07 11:14:29 gleixner Exp $ |
9 | */ | 9 | */ |
10 | 10 | ||
11 | /****************************************************************************/ | 11 | /****************************************************************************/ |
@@ -82,7 +82,7 @@ int __init uclinux_mtd_init(void) | |||
82 | iounmap(mapp->virt); | 82 | iounmap(mapp->virt); |
83 | return(-ENXIO); | 83 | return(-ENXIO); |
84 | } | 84 | } |
85 | 85 | ||
86 | mtd->owner = THIS_MODULE; | 86 | mtd->owner = THIS_MODULE; |
87 | mtd->point = uclinux_point; | 87 | mtd->point = uclinux_point; |
88 | mtd->priv = mapp; | 88 | mtd->priv = mapp; |
diff --git a/drivers/mtd/maps/vmax301.c b/drivers/mtd/maps/vmax301.c index c8c74110ed1b..e0063941c0df 100644 --- a/drivers/mtd/maps/vmax301.c +++ b/drivers/mtd/maps/vmax301.c | |||
@@ -1,19 +1,19 @@ | |||
1 | // $Id: vmax301.c,v 1.30 2004/07/12 22:38:29 dwmw2 Exp $ | 1 | // $Id: vmax301.c,v 1.32 2005/11/07 11:14:29 gleixner Exp $ |
2 | /* ###################################################################### | 2 | /* ###################################################################### |
3 | 3 | ||
4 | Tempustech VMAX SBC301 MTD Driver. | 4 | Tempustech VMAX SBC301 MTD Driver. |
5 | 5 | ||
6 | The VMAx 301 is a SBC based on . It | 6 | The VMAx 301 is a SBC based on . It |
7 | comes with three builtin AMD 29F016B flash chips and a socket for SRAM or | 7 | comes with three builtin AMD 29F016B flash chips and a socket for SRAM or |
8 | more flash. Each unit has it's own 8k mapping into a settable region | 8 | more flash. Each unit has it's own 8k mapping into a settable region |
9 | (0xD8000). There are two 8k mappings for each MTD, the first is always set | 9 | (0xD8000). There are two 8k mappings for each MTD, the first is always set |
10 | to the lower 8k of the device the second is paged. Writing a 16 bit page | 10 | to the lower 8k of the device the second is paged. Writing a 16 bit page |
11 | value to anywhere in the first 8k will cause the second 8k to page around. | 11 | value to anywhere in the first 8k will cause the second 8k to page around. |
12 | 12 | ||
13 | To boot the device a bios extension must be installed into the first 8k | 13 | To boot the device a bios extension must be installed into the first 8k |
14 | of flash that is smart enough to copy itself down, page in the rest of | 14 | of flash that is smart enough to copy itself down, page in the rest of |
15 | itself and begin executing. | 15 | itself and begin executing. |
16 | 16 | ||
17 | ##################################################################### */ | 17 | ##################################################################### */ |
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
@@ -35,7 +35,7 @@ | |||
35 | /* Actually we could use two spinlocks, but we'd have to have | 35 | /* Actually we could use two spinlocks, but we'd have to have |
36 | more private space in the struct map_info. We lose a little | 36 | more private space in the struct map_info. We lose a little |
37 | performance like this, but we'd probably lose more by having | 37 | performance like this, but we'd probably lose more by having |
38 | the extra indirection from having one of the map->map_priv | 38 | the extra indirection from having one of the map->map_priv |
39 | fields pointing to yet another private struct. | 39 | fields pointing to yet another private struct. |
40 | */ | 40 | */ |
41 | static DEFINE_SPINLOCK(vmax301_spin); | 41 | static DEFINE_SPINLOCK(vmax301_spin); |
@@ -98,7 +98,7 @@ static void vmax301_copy_to(struct map_info *map, unsigned long to, const void * | |||
98 | spin_lock(&vmax301_spin); | 98 | spin_lock(&vmax301_spin); |
99 | vmax301_page(map, to); | 99 | vmax301_page(map, to); |
100 | memcpy_toio(map->map_priv_2 + to, from, thislen); | 100 | memcpy_toio(map->map_priv_2 + to, from, thislen); |
101 | spin_unlock(&vmax301_spin); | 101 | spin_unlock(&vmax301_spin); |
102 | to += thislen; | 102 | to += thislen; |
103 | from += thislen; | 103 | from += thislen; |
104 | len -= thislen; | 104 | len -= thislen; |
@@ -137,7 +137,7 @@ static struct mtd_info *vmax_mtd[2] = {NULL, NULL}; | |||
137 | static void __exit cleanup_vmax301(void) | 137 | static void __exit cleanup_vmax301(void) |
138 | { | 138 | { |
139 | int i; | 139 | int i; |
140 | 140 | ||
141 | for (i=0; i<2; i++) { | 141 | for (i=0; i<2; i++) { |
142 | if (vmax_mtd[i]) { | 142 | if (vmax_mtd[i]) { |
143 | del_mtd_device(vmax_mtd[i]); | 143 | del_mtd_device(vmax_mtd[i]); |
@@ -161,13 +161,13 @@ int __init init_vmax301(void) | |||
161 | return -EIO; | 161 | return -EIO; |
162 | } | 162 | } |
163 | /* Put the address in the map's private data area. | 163 | /* Put the address in the map's private data area. |
164 | We store the actual MTD IO address rather than the | 164 | We store the actual MTD IO address rather than the |
165 | address of the first half, because it's used more | 165 | address of the first half, because it's used more |
166 | often. | 166 | often. |
167 | */ | 167 | */ |
168 | vmax_map[0].map_priv_2 = iomapadr + WINDOW_START; | 168 | vmax_map[0].map_priv_2 = iomapadr + WINDOW_START; |
169 | vmax_map[1].map_priv_2 = iomapadr + (3*WINDOW_START); | 169 | vmax_map[1].map_priv_2 = iomapadr + (3*WINDOW_START); |
170 | 170 | ||
171 | for (i=0; i<2; i++) { | 171 | for (i=0; i<2; i++) { |
172 | vmax_mtd[i] = do_map_probe("cfi_probe", &vmax_map[i]); | 172 | vmax_mtd[i] = do_map_probe("cfi_probe", &vmax_map[i]); |
173 | if (!vmax_mtd[i]) | 173 | if (!vmax_mtd[i]) |
diff --git a/drivers/mtd/maps/walnut.c b/drivers/mtd/maps/walnut.c index d6137b1b5670..5c17bca3a37e 100644 --- a/drivers/mtd/maps/walnut.c +++ b/drivers/mtd/maps/walnut.c | |||
@@ -1,12 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: walnut.c,v 1.2 2004/12/10 12:07:42 holindho Exp $ | 2 | * $Id: walnut.c,v 1.3 2005/11/07 11:14:29 gleixner Exp $ |
3 | * | 3 | * |
4 | * Mapping for Walnut flash | 4 | * Mapping for Walnut flash |
5 | * (used ebony.c as a "framework") | 5 | * (used ebony.c as a "framework") |
6 | * | 6 | * |
7 | * Heikki Lindholm <holindho@infradead.org> | 7 | * Heikki Lindholm <holindho@infradead.org> |
8 | * | 8 | * |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
12 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
@@ -48,7 +48,7 @@ static struct mtd_partition walnut_partitions[] = { | |||
48 | .name = "OpenBIOS", | 48 | .name = "OpenBIOS", |
49 | .offset = 0x0, | 49 | .offset = 0x0, |
50 | .size = WALNUT_FLASH_SIZE, | 50 | .size = WALNUT_FLASH_SIZE, |
51 | /*.mask_flags = MTD_WRITEABLE, */ /* force read-only */ | 51 | /*.mask_flags = MTD_WRITEABLE, */ /* force read-only */ |
52 | } | 52 | } |
53 | }; | 53 | }; |
54 | 54 | ||
@@ -72,11 +72,11 @@ int __init init_walnut(void) | |||
72 | printk("The on-board flash is disabled (U79 sw 5)!"); | 72 | printk("The on-board flash is disabled (U79 sw 5)!"); |
73 | return -EIO; | 73 | return -EIO; |
74 | } | 74 | } |
75 | if (WALNUT_FLASH_SRAM_SEL(fpga_brds1)) | 75 | if (WALNUT_FLASH_SRAM_SEL(fpga_brds1)) |
76 | flash_base = WALNUT_FLASH_LOW; | 76 | flash_base = WALNUT_FLASH_LOW; |
77 | else | 77 | else |
78 | flash_base = WALNUT_FLASH_HIGH; | 78 | flash_base = WALNUT_FLASH_HIGH; |
79 | 79 | ||
80 | walnut_map.phys = flash_base; | 80 | walnut_map.phys = flash_base; |
81 | walnut_map.virt = | 81 | walnut_map.virt = |
82 | (void __iomem *)ioremap(flash_base, walnut_map.size); | 82 | (void __iomem *)ioremap(flash_base, walnut_map.size); |
diff --git a/drivers/mtd/maps/wr_sbc82xx_flash.c b/drivers/mtd/maps/wr_sbc82xx_flash.c index 82b887b05707..60c197ec455b 100644 --- a/drivers/mtd/maps/wr_sbc82xx_flash.c +++ b/drivers/mtd/maps/wr_sbc82xx_flash.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: wr_sbc82xx_flash.c,v 1.7 2004/11/04 13:24:15 gleixner Exp $ | 2 | * $Id: wr_sbc82xx_flash.c,v 1.8 2005/11/07 11:14:29 gleixner Exp $ |
3 | * | 3 | * |
4 | * Map for flash chips on Wind River PowerQUICC II SBC82xx board. | 4 | * Map for flash chips on Wind River PowerQUICC II SBC82xx board. |
5 | * | 5 | * |
@@ -163,10 +163,10 @@ static void __exit cleanup_sbc82xx_flash(void) | |||
163 | del_mtd_partitions(sbcmtd[i]); | 163 | del_mtd_partitions(sbcmtd[i]); |
164 | else | 164 | else |
165 | del_mtd_device(sbcmtd[i]); | 165 | del_mtd_device(sbcmtd[i]); |
166 | 166 | ||
167 | kfree(sbcmtd_parts[i]); | 167 | kfree(sbcmtd_parts[i]); |
168 | map_destroy(sbcmtd[i]); | 168 | map_destroy(sbcmtd[i]); |
169 | 169 | ||
170 | iounmap((void *)sbc82xx_flash_map[i].virt); | 170 | iounmap((void *)sbc82xx_flash_map[i].virt); |
171 | sbc82xx_flash_map[i].virt = 0; | 171 | sbc82xx_flash_map[i].virt = 0; |
172 | } | 172 | } |