diff options
Diffstat (limited to 'drivers/mtd/maps')
52 files changed, 251 insertions, 340 deletions
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index d2fbc2964523..df8e00bba07b 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig | |||
@@ -1,5 +1,4 @@ | |||
1 | # drivers/mtd/maps/Kconfig | 1 | # drivers/mtd/maps/Kconfig |
2 | # $Id: Kconfig,v 1.61 2005/11/07 11:14:26 gleixner Exp $ | ||
3 | 2 | ||
4 | menu "Mapping drivers for chip access" | 3 | menu "Mapping drivers for chip access" |
5 | depends on MTD!=n | 4 | depends on MTD!=n |
@@ -510,6 +509,17 @@ config MTD_PCMCIA_ANONYMOUS | |||
510 | 509 | ||
511 | If unsure, say N. | 510 | If unsure, say N. |
512 | 511 | ||
512 | config MTD_BFIN_ASYNC | ||
513 | tristate "Blackfin BF533-STAMP Flash Chip Support" | ||
514 | depends on BFIN533_STAMP && MTD_CFI | ||
515 | select MTD_PARTITIONS | ||
516 | default y | ||
517 | help | ||
518 | Map driver which allows for simultaneous utilization of | ||
519 | ethernet and CFI parallel flash. | ||
520 | |||
521 | If compiled as a module, it will be called bfin-async-flash. | ||
522 | |||
513 | config MTD_UCLINUX | 523 | config MTD_UCLINUX |
514 | tristate "Generic uClinux RAM/ROM filesystem support" | 524 | tristate "Generic uClinux RAM/ROM filesystem support" |
515 | depends on MTD_PARTITIONS && !MMU | 525 | depends on MTD_PARTITIONS && !MMU |
@@ -539,24 +549,6 @@ config MTD_DMV182 | |||
539 | help | 549 | help |
540 | Map driver for Dy-4 SVME/DMV-182 board. | 550 | Map driver for Dy-4 SVME/DMV-182 board. |
541 | 551 | ||
542 | config MTD_BAST | ||
543 | tristate "Map driver for Simtec BAST (EB2410ITX) or Thorcom VR1000" | ||
544 | depends on ARCH_BAST || MACH_VR1000 | ||
545 | select MTD_PARTITIONS | ||
546 | select MTD_MAP_BANK_WIDTH_16 | ||
547 | select MTD_JEDECPROBE | ||
548 | help | ||
549 | Map driver for NOR flash on the Simtec BAST (EB2410ITX), or the | ||
550 | Thorcom VR1000 | ||
551 | |||
552 | Note, this driver *cannot* over-ride the WP link on the | ||
553 | board, or currently detect the state of the link. | ||
554 | |||
555 | config MTD_BAST_MAXSIZE | ||
556 | int "Maximum size for BAST flash area (MiB)" | ||
557 | depends on MTD_BAST | ||
558 | default "4" | ||
559 | |||
560 | config MTD_SHARP_SL | 552 | config MTD_SHARP_SL |
561 | tristate "ROM mapped on Sharp SL Series" | 553 | tristate "ROM mapped on Sharp SL Series" |
562 | depends on ARCH_PXA | 554 | depends on ARCH_PXA |
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile index c6ce8673dab2..6cda6df973e5 100644 --- a/drivers/mtd/maps/Makefile +++ b/drivers/mtd/maps/Makefile | |||
@@ -1,7 +1,6 @@ | |||
1 | # | 1 | # |
2 | # linux/drivers/maps/Makefile | 2 | # linux/drivers/maps/Makefile |
3 | # | 3 | # |
4 | # $Id: Makefile.common,v 1.34 2005/11/07 11:14:26 gleixner Exp $ | ||
5 | 4 | ||
6 | ifeq ($(CONFIG_MTD_COMPLEX_MAPPINGS),y) | 5 | ifeq ($(CONFIG_MTD_COMPLEX_MAPPINGS),y) |
7 | obj-$(CONFIG_MTD) += map_funcs.o | 6 | obj-$(CONFIG_MTD) += map_funcs.o |
@@ -10,7 +9,6 @@ endif | |||
10 | # Chip mappings | 9 | # Chip mappings |
11 | obj-$(CONFIG_MTD_CDB89712) += cdb89712.o | 10 | obj-$(CONFIG_MTD_CDB89712) += cdb89712.o |
12 | obj-$(CONFIG_MTD_ARM_INTEGRATOR)+= integrator-flash.o | 11 | obj-$(CONFIG_MTD_ARM_INTEGRATOR)+= integrator-flash.o |
13 | obj-$(CONFIG_MTD_BAST) += bast-flash.o | ||
14 | obj-$(CONFIG_MTD_CFI_FLAGADM) += cfi_flagadm.o | 12 | obj-$(CONFIG_MTD_CFI_FLAGADM) += cfi_flagadm.o |
15 | obj-$(CONFIG_MTD_DC21285) += dc21285.o | 13 | obj-$(CONFIG_MTD_DC21285) += dc21285.o |
16 | obj-$(CONFIG_MTD_DILNETPC) += dilnetpc.o | 14 | obj-$(CONFIG_MTD_DILNETPC) += dilnetpc.o |
@@ -66,3 +64,4 @@ obj-$(CONFIG_MTD_SHARP_SL) += sharpsl-flash.o | |||
66 | obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o | 64 | obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o |
67 | obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o | 65 | obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o |
68 | obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o | 66 | obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o |
67 | obj-$(CONFIG_MTD_BFIN_ASYNC) += bfin-async-flash.o | ||
diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c index 728aed6ad722..948b86f35ef4 100644 --- a/drivers/mtd/maps/amd76xrom.c +++ b/drivers/mtd/maps/amd76xrom.c | |||
@@ -2,7 +2,6 @@ | |||
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.21 2005/11/07 11:14:26 gleixner Exp $ | ||
6 | */ | 5 | */ |
7 | 6 | ||
8 | #include <linux/module.h> | 7 | #include <linux/module.h> |
diff --git a/drivers/mtd/maps/autcpu12-nvram.c b/drivers/mtd/maps/autcpu12-nvram.c index 7ed3424dd959..cf32267263df 100644 --- a/drivers/mtd/maps/autcpu12-nvram.c +++ b/drivers/mtd/maps/autcpu12-nvram.c | |||
@@ -2,8 +2,6 @@ | |||
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.9 2005/11/07 11:14:26 gleixner Exp $ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | 5 | * 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 | 6 | * it under the terms of the GNU General Public License as published by |
9 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
diff --git a/drivers/mtd/maps/bast-flash.c b/drivers/mtd/maps/bast-flash.c deleted file mode 100644 index 1f492062f8ca..000000000000 --- a/drivers/mtd/maps/bast-flash.c +++ /dev/null | |||
@@ -1,226 +0,0 @@ | |||
1 | /* linux/drivers/mtd/maps/bast-flash.c | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Simtec Bast (EB2410ITX) NOR MTD Mapping driver | ||
7 | * | ||
8 | * Changelog: | ||
9 | * 20-Sep-2004 BJD Initial version | ||
10 | * 17-Jan-2005 BJD Add whole device if no partitions found | ||
11 | * | ||
12 | * $Id: bast-flash.c,v 1.5 2005/11/07 11:14:26 gleixner Exp $ | ||
13 | * | ||
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 | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
27 | */ | ||
28 | |||
29 | #include <linux/module.h> | ||
30 | #include <linux/types.h> | ||
31 | #include <linux/init.h> | ||
32 | #include <linux/kernel.h> | ||
33 | #include <linux/string.h> | ||
34 | #include <linux/ioport.h> | ||
35 | #include <linux/device.h> | ||
36 | #include <linux/slab.h> | ||
37 | #include <linux/platform_device.h> | ||
38 | #include <linux/mtd/mtd.h> | ||
39 | #include <linux/mtd/map.h> | ||
40 | #include <linux/mtd/partitions.h> | ||
41 | |||
42 | #include <asm/io.h> | ||
43 | #include <asm/mach/flash.h> | ||
44 | |||
45 | #include <asm/arch/map.h> | ||
46 | #include <asm/arch/bast-map.h> | ||
47 | #include <asm/arch/bast-cpld.h> | ||
48 | |||
49 | #ifdef CONFIG_MTD_BAST_MAXSIZE | ||
50 | #define AREA_MAXSIZE (CONFIG_MTD_BAST_MAXSIZE * SZ_1M) | ||
51 | #else | ||
52 | #define AREA_MAXSIZE (32 * SZ_1M) | ||
53 | #endif | ||
54 | |||
55 | #define PFX "bast-flash: " | ||
56 | |||
57 | struct bast_flash_info { | ||
58 | struct mtd_info *mtd; | ||
59 | struct map_info map; | ||
60 | struct mtd_partition *partitions; | ||
61 | struct resource *area; | ||
62 | }; | ||
63 | |||
64 | static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; | ||
65 | |||
66 | static void bast_flash_setrw(int to) | ||
67 | { | ||
68 | unsigned int val; | ||
69 | unsigned long flags; | ||
70 | |||
71 | local_irq_save(flags); | ||
72 | val = __raw_readb(BAST_VA_CTRL3); | ||
73 | |||
74 | if (to) | ||
75 | val |= BAST_CPLD_CTRL3_ROMWEN; | ||
76 | else | ||
77 | val &= ~BAST_CPLD_CTRL3_ROMWEN; | ||
78 | |||
79 | pr_debug("new cpld ctrl3=%02x\n", val); | ||
80 | |||
81 | __raw_writeb(val, BAST_VA_CTRL3); | ||
82 | local_irq_restore(flags); | ||
83 | } | ||
84 | |||
85 | static int bast_flash_remove(struct platform_device *pdev) | ||
86 | { | ||
87 | struct bast_flash_info *info = platform_get_drvdata(pdev); | ||
88 | |||
89 | platform_set_drvdata(pdev, NULL); | ||
90 | |||
91 | if (info == NULL) | ||
92 | return 0; | ||
93 | |||
94 | if (info->map.virt != NULL) | ||
95 | iounmap(info->map.virt); | ||
96 | |||
97 | if (info->mtd) { | ||
98 | del_mtd_partitions(info->mtd); | ||
99 | map_destroy(info->mtd); | ||
100 | } | ||
101 | |||
102 | kfree(info->partitions); | ||
103 | |||
104 | if (info->area) { | ||
105 | release_resource(info->area); | ||
106 | kfree(info->area); | ||
107 | } | ||
108 | |||
109 | kfree(info); | ||
110 | |||
111 | return 0; | ||
112 | } | ||
113 | |||
114 | static int bast_flash_probe(struct platform_device *pdev) | ||
115 | { | ||
116 | struct bast_flash_info *info; | ||
117 | struct resource *res; | ||
118 | int err = 0; | ||
119 | |||
120 | info = kmalloc(sizeof(*info), GFP_KERNEL); | ||
121 | if (info == NULL) { | ||
122 | printk(KERN_ERR PFX "no memory for flash info\n"); | ||
123 | err = -ENOMEM; | ||
124 | goto exit_error; | ||
125 | } | ||
126 | |||
127 | memzero(info, sizeof(*info)); | ||
128 | platform_set_drvdata(pdev, info); | ||
129 | |||
130 | res = pdev->resource; /* assume that the flash has one resource */ | ||
131 | |||
132 | info->map.phys = res->start; | ||
133 | info->map.size = res->end - res->start + 1; | ||
134 | info->map.name = pdev->dev.bus_id; | ||
135 | info->map.bankwidth = 2; | ||
136 | |||
137 | if (info->map.size > AREA_MAXSIZE) | ||
138 | info->map.size = AREA_MAXSIZE; | ||
139 | |||
140 | pr_debug("%s: area %08lx, size %ld\n", __func__, | ||
141 | info->map.phys, info->map.size); | ||
142 | |||
143 | info->area = request_mem_region(res->start, info->map.size, | ||
144 | pdev->name); | ||
145 | if (info->area == NULL) { | ||
146 | printk(KERN_ERR PFX "cannot reserve flash memory region\n"); | ||
147 | err = -ENOENT; | ||
148 | goto exit_error; | ||
149 | } | ||
150 | |||
151 | info->map.virt = ioremap(res->start, info->map.size); | ||
152 | pr_debug("%s: virt at %08x\n", __func__, (int)info->map.virt); | ||
153 | |||
154 | if (info->map.virt == 0) { | ||
155 | printk(KERN_ERR PFX "failed to ioremap() region\n"); | ||
156 | err = -EIO; | ||
157 | goto exit_error; | ||
158 | } | ||
159 | |||
160 | simple_map_init(&info->map); | ||
161 | |||
162 | /* enable the write to the flash area */ | ||
163 | |||
164 | bast_flash_setrw(1); | ||
165 | |||
166 | /* probe for the device(s) */ | ||
167 | |||
168 | info->mtd = do_map_probe("jedec_probe", &info->map); | ||
169 | if (info->mtd == NULL) | ||
170 | info->mtd = do_map_probe("cfi_probe", &info->map); | ||
171 | |||
172 | if (info->mtd == NULL) { | ||
173 | printk(KERN_ERR PFX "map_probe() failed\n"); | ||
174 | err = -ENXIO; | ||
175 | goto exit_error; | ||
176 | } | ||
177 | |||
178 | /* mark ourselves as the owner */ | ||
179 | info->mtd->owner = THIS_MODULE; | ||
180 | |||
181 | err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); | ||
182 | if (err > 0) { | ||
183 | err = add_mtd_partitions(info->mtd, info->partitions, err); | ||
184 | if (err) | ||
185 | printk(KERN_ERR PFX "cannot add/parse partitions\n"); | ||
186 | } else { | ||
187 | err = add_mtd_device(info->mtd); | ||
188 | } | ||
189 | |||
190 | if (err == 0) | ||
191 | return 0; | ||
192 | |||
193 | /* fall through to exit error */ | ||
194 | |||
195 | exit_error: | ||
196 | bast_flash_remove(pdev); | ||
197 | return err; | ||
198 | } | ||
199 | |||
200 | static struct platform_driver bast_flash_driver = { | ||
201 | .probe = bast_flash_probe, | ||
202 | .remove = bast_flash_remove, | ||
203 | .driver = { | ||
204 | .name = "bast-nor", | ||
205 | .owner = THIS_MODULE, | ||
206 | }, | ||
207 | }; | ||
208 | |||
209 | static int __init bast_flash_init(void) | ||
210 | { | ||
211 | printk("BAST NOR-Flash Driver, (c) 2004 Simtec Electronics\n"); | ||
212 | return platform_driver_register(&bast_flash_driver); | ||
213 | } | ||
214 | |||
215 | static void __exit bast_flash_exit(void) | ||
216 | { | ||
217 | platform_driver_unregister(&bast_flash_driver); | ||
218 | } | ||
219 | |||
220 | module_init(bast_flash_init); | ||
221 | module_exit(bast_flash_exit); | ||
222 | |||
223 | MODULE_LICENSE("GPL"); | ||
224 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); | ||
225 | MODULE_DESCRIPTION("BAST MTD Map driver"); | ||
226 | MODULE_ALIAS("platform:bast-nor"); | ||
diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c new file mode 100644 index 000000000000..6fec86aaed7e --- /dev/null +++ b/drivers/mtd/maps/bfin-async-flash.c | |||
@@ -0,0 +1,219 @@ | |||
1 | /* | ||
2 | * drivers/mtd/maps/bfin-async-flash.c | ||
3 | * | ||
4 | * Handle the case where flash memory and ethernet mac/phy are | ||
5 | * mapped onto the same async bank. The BF533-STAMP does this | ||
6 | * for example. All board-specific configuration goes in your | ||
7 | * board resources file. | ||
8 | * | ||
9 | * Copyright 2000 Nicolas Pitre <nico@cam.org> | ||
10 | * Copyright 2005-2008 Analog Devices Inc. | ||
11 | * | ||
12 | * Enter bugs at http://blackfin.uclinux.org/ | ||
13 | * | ||
14 | * Licensed under the GPL-2 or later. | ||
15 | */ | ||
16 | |||
17 | #include <linux/init.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/module.h> | ||
20 | #include <linux/mtd/mtd.h> | ||
21 | #include <linux/mtd/map.h> | ||
22 | #include <linux/mtd/partitions.h> | ||
23 | #include <linux/mtd/physmap.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/types.h> | ||
26 | |||
27 | #include <asm/blackfin.h> | ||
28 | #include <linux/gpio.h> | ||
29 | #include <linux/io.h> | ||
30 | #include <asm/unaligned.h> | ||
31 | |||
32 | #define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); }) | ||
33 | |||
34 | #define DRIVER_NAME "bfin-async-flash" | ||
35 | |||
36 | struct async_state { | ||
37 | struct mtd_info *mtd; | ||
38 | struct map_info map; | ||
39 | int enet_flash_pin; | ||
40 | uint32_t flash_ambctl0, flash_ambctl1; | ||
41 | uint32_t save_ambctl0, save_ambctl1; | ||
42 | unsigned long irq_flags; | ||
43 | }; | ||
44 | |||
45 | static void switch_to_flash(struct async_state *state) | ||
46 | { | ||
47 | local_irq_save(state->irq_flags); | ||
48 | |||
49 | gpio_set_value(state->enet_flash_pin, 0); | ||
50 | |||
51 | state->save_ambctl0 = bfin_read_EBIU_AMBCTL0(); | ||
52 | state->save_ambctl1 = bfin_read_EBIU_AMBCTL1(); | ||
53 | bfin_write_EBIU_AMBCTL0(state->flash_ambctl0); | ||
54 | bfin_write_EBIU_AMBCTL1(state->flash_ambctl1); | ||
55 | SSYNC(); | ||
56 | } | ||
57 | |||
58 | static void switch_back(struct async_state *state) | ||
59 | { | ||
60 | bfin_write_EBIU_AMBCTL0(state->save_ambctl0); | ||
61 | bfin_write_EBIU_AMBCTL1(state->save_ambctl1); | ||
62 | SSYNC(); | ||
63 | |||
64 | gpio_set_value(state->enet_flash_pin, 1); | ||
65 | |||
66 | local_irq_restore(state->irq_flags); | ||
67 | } | ||
68 | |||
69 | static map_word bfin_read(struct map_info *map, unsigned long ofs) | ||
70 | { | ||
71 | struct async_state *state = (struct async_state *)map->map_priv_1; | ||
72 | uint16_t word; | ||
73 | map_word test; | ||
74 | |||
75 | switch_to_flash(state); | ||
76 | |||
77 | word = readw(map->virt + ofs); | ||
78 | |||
79 | switch_back(state); | ||
80 | |||
81 | test.x[0] = word; | ||
82 | return test; | ||
83 | } | ||
84 | |||
85 | static void bfin_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len) | ||
86 | { | ||
87 | struct async_state *state = (struct async_state *)map->map_priv_1; | ||
88 | |||
89 | switch_to_flash(state); | ||
90 | |||
91 | memcpy(to, map->virt + from, len); | ||
92 | |||
93 | switch_back(state); | ||
94 | } | ||
95 | |||
96 | static void bfin_write(struct map_info *map, map_word d1, unsigned long ofs) | ||
97 | { | ||
98 | struct async_state *state = (struct async_state *)map->map_priv_1; | ||
99 | uint16_t d; | ||
100 | |||
101 | d = d1.x[0]; | ||
102 | |||
103 | switch_to_flash(state); | ||
104 | |||
105 | writew(d, map->virt + ofs); | ||
106 | SSYNC(); | ||
107 | |||
108 | switch_back(state); | ||
109 | } | ||
110 | |||
111 | static void bfin_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len) | ||
112 | { | ||
113 | struct async_state *state = (struct async_state *)map->map_priv_1; | ||
114 | |||
115 | switch_to_flash(state); | ||
116 | |||
117 | memcpy(map->virt + to, from, len); | ||
118 | SSYNC(); | ||
119 | |||
120 | switch_back(state); | ||
121 | } | ||
122 | |||
123 | #ifdef CONFIG_MTD_PARTITIONS | ||
124 | static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; | ||
125 | #endif | ||
126 | |||
127 | static int __devinit bfin_flash_probe(struct platform_device *pdev) | ||
128 | { | ||
129 | int ret; | ||
130 | struct physmap_flash_data *pdata = pdev->dev.platform_data; | ||
131 | struct resource *memory = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
132 | struct resource *flash_ambctl = platform_get_resource(pdev, IORESOURCE_MEM, 1); | ||
133 | struct async_state *state; | ||
134 | |||
135 | state = kzalloc(sizeof(*state), GFP_KERNEL); | ||
136 | if (!state) | ||
137 | return -ENOMEM; | ||
138 | |||
139 | state->map.name = DRIVER_NAME; | ||
140 | state->map.read = bfin_read; | ||
141 | state->map.copy_from = bfin_copy_from; | ||
142 | state->map.write = bfin_write; | ||
143 | state->map.copy_to = bfin_copy_to; | ||
144 | state->map.bankwidth = pdata->width; | ||
145 | state->map.size = memory->end - memory->start + 1; | ||
146 | state->map.virt = (void __iomem *)memory->start; | ||
147 | state->map.phys = memory->start; | ||
148 | state->map.map_priv_1 = (unsigned long)state; | ||
149 | state->enet_flash_pin = platform_get_irq(pdev, 0); | ||
150 | state->flash_ambctl0 = flash_ambctl->start; | ||
151 | state->flash_ambctl1 = flash_ambctl->end; | ||
152 | |||
153 | if (gpio_request(state->enet_flash_pin, DRIVER_NAME)) { | ||
154 | pr_devinit(KERN_ERR DRIVER_NAME ": Failed to request gpio %d\n", state->enet_flash_pin); | ||
155 | return -EBUSY; | ||
156 | } | ||
157 | gpio_direction_output(state->enet_flash_pin, 1); | ||
158 | |||
159 | pr_devinit(KERN_NOTICE DRIVER_NAME ": probing %d-bit flash bus\n", state->map.bankwidth * 8); | ||
160 | state->mtd = do_map_probe(memory->name, &state->map); | ||
161 | if (!state->mtd) | ||
162 | return -ENXIO; | ||
163 | |||
164 | #ifdef CONFIG_MTD_PARTITIONS | ||
165 | ret = parse_mtd_partitions(state->mtd, part_probe_types, &pdata->parts, 0); | ||
166 | if (ret > 0) { | ||
167 | pr_devinit(KERN_NOTICE DRIVER_NAME ": Using commandline partition definition\n"); | ||
168 | add_mtd_partitions(state->mtd, pdata->parts, ret); | ||
169 | |||
170 | } else if (pdata->nr_parts) { | ||
171 | pr_devinit(KERN_NOTICE DRIVER_NAME ": Using board partition definition\n"); | ||
172 | add_mtd_partitions(state->mtd, pdata->parts, pdata->nr_parts); | ||
173 | |||
174 | } else | ||
175 | #endif | ||
176 | { | ||
177 | pr_devinit(KERN_NOTICE DRIVER_NAME ": no partition info available, registering whole flash at once\n"); | ||
178 | add_mtd_device(state->mtd); | ||
179 | } | ||
180 | |||
181 | platform_set_drvdata(pdev, state); | ||
182 | |||
183 | return 0; | ||
184 | } | ||
185 | |||
186 | static int __devexit bfin_flash_remove(struct platform_device *pdev) | ||
187 | { | ||
188 | struct async_state *state = platform_get_drvdata(pdev); | ||
189 | gpio_free(state->enet_flash_pin); | ||
190 | #ifdef CONFIG_MTD_PARTITIONS | ||
191 | del_mtd_partitions(state->mtd); | ||
192 | #endif | ||
193 | map_destroy(state->mtd); | ||
194 | kfree(state); | ||
195 | return 0; | ||
196 | } | ||
197 | |||
198 | static struct platform_driver bfin_flash_driver = { | ||
199 | .probe = bfin_flash_probe, | ||
200 | .remove = __devexit_p(bfin_flash_remove), | ||
201 | .driver = { | ||
202 | .name = DRIVER_NAME, | ||
203 | }, | ||
204 | }; | ||
205 | |||
206 | static int __init bfin_flash_init(void) | ||
207 | { | ||
208 | return platform_driver_register(&bfin_flash_driver); | ||
209 | } | ||
210 | module_init(bfin_flash_init); | ||
211 | |||
212 | static void __exit bfin_flash_exit(void) | ||
213 | { | ||
214 | platform_driver_unregister(&bfin_flash_driver); | ||
215 | } | ||
216 | module_exit(bfin_flash_exit); | ||
217 | |||
218 | MODULE_LICENSE("GPL"); | ||
219 | MODULE_DESCRIPTION("MTD map driver for Blackfins with flash/ethernet on same async bank"); | ||
diff --git a/drivers/mtd/maps/cdb89712.c b/drivers/mtd/maps/cdb89712.c index 9f17bb6c5a9d..cb507da0a87d 100644 --- a/drivers/mtd/maps/cdb89712.c +++ b/drivers/mtd/maps/cdb89712.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Flash on Cirrus CDB89712 | 2 | * Flash on Cirrus CDB89712 |
3 | * | 3 | * |
4 | * $Id: cdb89712.c,v 1.11 2005/11/07 11:14:26 gleixner Exp $ | ||
5 | */ | 4 | */ |
6 | 5 | ||
7 | #include <linux/module.h> | 6 | #include <linux/module.h> |
diff --git a/drivers/mtd/maps/ceiva.c b/drivers/mtd/maps/ceiva.c index 629e6e2641a8..6464d487eb1a 100644 --- a/drivers/mtd/maps/ceiva.c +++ b/drivers/mtd/maps/ceiva.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | * (C) 2000 Nicolas Pitre <nico@cam.org> | 12 | * (C) 2000 Nicolas Pitre <nico@cam.org> |
13 | * | 13 | * |
14 | * $Id: ceiva.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $ | ||
15 | */ | 14 | */ |
16 | 15 | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
diff --git a/drivers/mtd/maps/cfi_flagadm.c b/drivers/mtd/maps/cfi_flagadm.c index 65e5ee552010..0ecc3f6d735b 100644 --- a/drivers/mtd/maps/cfi_flagadm.c +++ b/drivers/mtd/maps/cfi_flagadm.c | |||
@@ -1,8 +1,6 @@ | |||
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.15 2005/11/07 11:14:26 gleixner Exp $ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | 4 | * 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 | 5 | * 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 | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
diff --git a/drivers/mtd/maps/dbox2-flash.c b/drivers/mtd/maps/dbox2-flash.c index 92a9c7fac993..e115667bf1d0 100644 --- a/drivers/mtd/maps/dbox2-flash.c +++ b/drivers/mtd/maps/dbox2-flash.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: dbox2-flash.c,v 1.14 2005/11/07 11:14:26 gleixner Exp $ | ||
3 | * | ||
4 | * D-Box 2 flash driver | 2 | * D-Box 2 flash driver |
5 | */ | 3 | */ |
6 | 4 | ||
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c index b32bb9347d71..3aa018c092f8 100644 --- a/drivers/mtd/maps/dc21285.c +++ b/drivers/mtd/maps/dc21285.c | |||
@@ -4,8 +4,6 @@ | |||
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 | * | ||
8 | * $Id: dc21285.c,v 1.24 2005/11/07 11:14:26 gleixner Exp $ | ||
9 | */ | 7 | */ |
10 | #include <linux/module.h> | 8 | #include <linux/module.h> |
11 | #include <linux/types.h> | 9 | #include <linux/types.h> |
diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c index 1c3b34ad7325..0713e3a5a22c 100644 --- a/drivers/mtd/maps/dilnetpc.c +++ b/drivers/mtd/maps/dilnetpc.c | |||
@@ -14,8 +14,6 @@ | |||
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.20 2005/11/07 11:14:26 gleixner Exp $ | ||
18 | * | ||
19 | * The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems | 17 | * 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 | 18 | * featuring the AMD Elan SC410 processor. There are two variants of this |
21 | * board: DNP/1486 and ADNP/1486. The DNP version has 2 megs of flash | 19 | * board: DNP/1486 and ADNP/1486. The DNP version has 2 megs of flash |
diff --git a/drivers/mtd/maps/dmv182.c b/drivers/mtd/maps/dmv182.c index e0558b0b2fe6..d171674eb2ed 100644 --- a/drivers/mtd/maps/dmv182.c +++ b/drivers/mtd/maps/dmv182.c | |||
@@ -4,8 +4,6 @@ | |||
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.6 2005/11/07 11:14:26 gleixner Exp $ | ||
8 | * | ||
9 | * Copyright 2003-2004, TimeSys Corporation | 7 | * Copyright 2003-2004, TimeSys Corporation |
10 | * | 8 | * |
11 | * Based on the SVME181 flash map, by Tom Nelson, Dot4, Inc. for TimeSys Corp. | 9 | * Based on the SVME181 flash map, by Tom Nelson, Dot4, Inc. for TimeSys Corp. |
diff --git a/drivers/mtd/maps/ebony.c b/drivers/mtd/maps/ebony.c index 1488bb92f26f..d92b7c70d3ed 100644 --- a/drivers/mtd/maps/ebony.c +++ b/drivers/mtd/maps/ebony.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: ebony.c,v 1.16 2005/11/07 11:14:26 gleixner Exp $ | ||
3 | * | ||
4 | * Mapping for Ebony user flash | 2 | * Mapping for Ebony user flash |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/drivers/mtd/maps/edb7312.c b/drivers/mtd/maps/edb7312.c index 1c5b97c89685..9433738c1664 100644 --- a/drivers/mtd/maps/edb7312.c +++ b/drivers/mtd/maps/edb7312.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: edb7312.c,v 1.14 2005/11/07 11:14:27 gleixner Exp $ | ||
3 | * | ||
4 | * Handle mapping of the NOR flash on Cogent EDB7312 boards | 2 | * Handle mapping of the NOR flash on Cogent EDB7312 boards |
5 | * | 3 | * |
6 | * Copyright 2002 SYSGO Real-Time Solutions GmbH | 4 | * Copyright 2002 SYSGO Real-Time Solutions GmbH |
diff --git a/drivers/mtd/maps/fortunet.c b/drivers/mtd/maps/fortunet.c index 7c50c271651c..a8e3fde4cbd5 100644 --- a/drivers/mtd/maps/fortunet.c +++ b/drivers/mtd/maps/fortunet.c | |||
@@ -1,6 +1,5 @@ | |||
1 | /* fortunet.c memory map | 1 | /* fortunet.c memory map |
2 | * | 2 | * |
3 | * $Id: fortunet.c,v 1.11 2005/11/07 11:14:27 gleixner Exp $ | ||
4 | */ | 3 | */ |
5 | 4 | ||
6 | #include <linux/module.h> | 5 | #include <linux/module.h> |
diff --git a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c index 6dde3182d64a..ef8915474462 100644 --- a/drivers/mtd/maps/h720x-flash.c +++ b/drivers/mtd/maps/h720x-flash.c | |||
@@ -2,8 +2,6 @@ | |||
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.12 2005/11/07 11:14:27 gleixner Exp $ | ||
6 | * | ||
7 | * (C) 2002 Jungjun Kim <jungjun.kim@hynix.com> | 5 | * (C) 2002 Jungjun Kim <jungjun.kim@hynix.com> |
8 | * 2003 Thomas Gleixner <tglx@linutronix.de> | 6 | * 2003 Thomas Gleixner <tglx@linutronix.de> |
9 | */ | 7 | */ |
diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c index 2c884c49e84a..aeb6c916e23f 100644 --- a/drivers/mtd/maps/ichxrom.c +++ b/drivers/mtd/maps/ichxrom.c | |||
@@ -2,7 +2,6 @@ | |||
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.19 2005/11/07 11:14:27 gleixner Exp $ | ||
6 | */ | 5 | */ |
7 | 6 | ||
8 | #include <linux/module.h> | 7 | #include <linux/module.h> |
diff --git a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c index a0b4dc7155dc..2682ab51a367 100644 --- a/drivers/mtd/maps/impa7.c +++ b/drivers/mtd/maps/impa7.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: impa7.c,v 1.14 2005/11/07 11:14:27 gleixner Exp $ | ||
3 | * | ||
4 | * Handle mapping of the NOR flash on implementa A7 boards | 2 | * Handle mapping of the NOR flash on implementa A7 boards |
5 | * | 3 | * |
6 | * Copyright 2002 SYSGO Real-Time Solutions GmbH | 4 | * Copyright 2002 SYSGO Real-Time Solutions GmbH |
diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c index 325c8880c437..ee361aaadb1e 100644 --- a/drivers/mtd/maps/integrator-flash.c +++ b/drivers/mtd/maps/integrator-flash.c | |||
@@ -22,8 +22,6 @@ | |||
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.20 2005/11/07 11:14:27 gleixner Exp $ | ||
26 | |||
27 | ======================================================================*/ | 25 | ======================================================================*/ |
28 | 26 | ||
29 | #include <linux/module.h> | 27 | #include <linux/module.h> |
diff --git a/drivers/mtd/maps/ipaq-flash.c b/drivers/mtd/maps/ipaq-flash.c index f27c132794c3..a806119797e0 100644 --- a/drivers/mtd/maps/ipaq-flash.c +++ b/drivers/mtd/maps/ipaq-flash.c | |||
@@ -4,8 +4,6 @@ | |||
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 | * | ||
8 | * $Id: ipaq-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ | ||
9 | */ | 7 | */ |
10 | 8 | ||
11 | #include <linux/module.h> | 9 | #include <linux/module.h> |
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c index c8396b8574c4..c2264792a20b 100644 --- a/drivers/mtd/maps/ixp2000.c +++ b/drivers/mtd/maps/ixp2000.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: ixp2000.c,v 1.9 2005/11/07 11:14:27 gleixner Exp $ | ||
3 | * | ||
4 | * drivers/mtd/maps/ixp2000.c | 2 | * drivers/mtd/maps/ixp2000.c |
5 | * | 3 | * |
6 | * Mapping for the Intel XScale IXP2000 based systems | 4 | * Mapping for the Intel XScale IXP2000 based systems |
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index 01f19a4714b5..9c7a5fbd4e51 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: ixp4xx.c,v 1.13 2005/11/16 16:23:21 dvrabel Exp $ | ||
3 | * | ||
4 | * drivers/mtd/maps/ixp4xx.c | 2 | * drivers/mtd/maps/ixp4xx.c |
5 | * | 3 | * |
6 | * MTD Map file for IXP4XX based systems. Please do not make per-board | 4 | * MTD Map file for IXP4XX based systems. Please do not make per-board |
diff --git a/drivers/mtd/maps/l440gx.c b/drivers/mtd/maps/l440gx.c index 67620adf4811..9e054503c4cf 100644 --- a/drivers/mtd/maps/l440gx.c +++ b/drivers/mtd/maps/l440gx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: l440gx.c,v 1.18 2005/11/07 11:14:27 gleixner Exp $ | ||
3 | * | ||
4 | * BIOS Flash chip on Intel 440GX board. | 2 | * BIOS Flash chip on Intel 440GX board. |
5 | * | 3 | * |
6 | * Bugs this currently does not work under linuxBIOS. | 4 | * Bugs this currently does not work under linuxBIOS. |
diff --git a/drivers/mtd/maps/map_funcs.c b/drivers/mtd/maps/map_funcs.c index 9105e6ca0aa6..3f268370eeca 100644 --- a/drivers/mtd/maps/map_funcs.c +++ b/drivers/mtd/maps/map_funcs.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: map_funcs.c,v 1.10 2005/06/06 23:04:36 tpoynor Exp $ | ||
3 | * | ||
4 | * Out-of-line map I/O functions for simple maps when CONFIG_COMPLEX_MAPPINGS | 2 | * Out-of-line map I/O functions for simple maps when CONFIG_COMPLEX_MAPPINGS |
5 | * is enabled. | 3 | * is enabled. |
6 | */ | 4 | */ |
diff --git a/drivers/mtd/maps/mbx860.c b/drivers/mtd/maps/mbx860.c index 06b118727846..706f67394b07 100644 --- a/drivers/mtd/maps/mbx860.c +++ b/drivers/mtd/maps/mbx860.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: mbx860.c,v 1.9 2005/11/07 11:14:27 gleixner Exp $ | ||
3 | * | ||
4 | * Handle mapping of the flash on MBX860 boards | 2 | * Handle mapping of the flash on MBX860 boards |
5 | * | 3 | * |
6 | * Author: Anton Todorov | 4 | * Author: Anton Todorov |
diff --git a/drivers/mtd/maps/netsc520.c b/drivers/mtd/maps/netsc520.c index 95dcab2146ad..c0cb319b2b70 100644 --- a/drivers/mtd/maps/netsc520.c +++ b/drivers/mtd/maps/netsc520.c | |||
@@ -3,8 +3,6 @@ | |||
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.14 2005/11/07 11:14:27 gleixner Exp $ | ||
7 | * | ||
8 | * 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 |
9 | * 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 |
10 | * the Free Software Foundation; either version 2 of the License, or | 8 | * the Free Software Foundation; either version 2 of the License, or |
diff --git a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c index 0c9b305a72e0..965e6c6d6ab0 100644 --- a/drivers/mtd/maps/nettel.c +++ b/drivers/mtd/maps/nettel.c | |||
@@ -5,8 +5,6 @@ | |||
5 | * | 5 | * |
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 | * | ||
9 | * $Id: nettel.c,v 1.12 2005/11/29 14:30:00 gleixner Exp $ | ||
10 | */ | 8 | */ |
11 | 9 | ||
12 | /****************************************************************************/ | 10 | /****************************************************************************/ |
diff --git a/drivers/mtd/maps/octagon-5066.c b/drivers/mtd/maps/octagon-5066.c index a6642db3d325..43e04c1d22a9 100644 --- a/drivers/mtd/maps/octagon-5066.c +++ b/drivers/mtd/maps/octagon-5066.c | |||
@@ -1,4 +1,3 @@ | |||
1 | // $Id: octagon-5066.c,v 1.28 2005/11/07 11:14:27 gleixner Exp $ | ||
2 | /* ###################################################################### | 1 | /* ###################################################################### |
3 | 2 | ||
4 | Octagon 5066 MTD Driver. | 3 | Octagon 5066 MTD Driver. |
diff --git a/drivers/mtd/maps/omap-toto-flash.c b/drivers/mtd/maps/omap-toto-flash.c index e6e391efbeb6..0a60ebbc2175 100644 --- a/drivers/mtd/maps/omap-toto-flash.c +++ b/drivers/mtd/maps/omap-toto-flash.c | |||
@@ -4,8 +4,6 @@ | |||
4 | * jzhang@ti.com (C) 2003 Texas Instruments. | 4 | * jzhang@ti.com (C) 2003 Texas Instruments. |
5 | * | 5 | * |
6 | * (C) 2002 MontVista Software, Inc. | 6 | * (C) 2002 MontVista Software, Inc. |
7 | * | ||
8 | * $Id: omap-toto-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ | ||
9 | */ | 7 | */ |
10 | 8 | ||
11 | #include <linux/module.h> | 9 | #include <linux/module.h> |
diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c index d2ab1bae9c34..5c6a25c90380 100644 --- a/drivers/mtd/maps/pci.c +++ b/drivers/mtd/maps/pci.c | |||
@@ -7,8 +7,6 @@ | |||
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.14 2005/11/17 08:20:27 dwmw2 Exp $ | ||
11 | * | ||
12 | * Generic PCI memory map driver. We support the following boards: | 10 | * Generic PCI memory map driver. We support the following boards: |
13 | * - Intel IQ80310 ATU. | 11 | * - Intel IQ80310 ATU. |
14 | * - Intel EBSA285 (blank rom programming mode). Tested working 27/09/2001 | 12 | * - Intel EBSA285 (blank rom programming mode). Tested working 27/09/2001 |
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index 0cc31675aeb9..90924fb00481 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: pcmciamtd.c,v 1.55 2005/11/07 11:14:28 gleixner Exp $ | ||
3 | * | ||
4 | * pcmciamtd.c - MTD driver for PCMCIA flash memory cards | 2 | * pcmciamtd.c - MTD driver for PCMCIA flash memory cards |
5 | * | 3 | * |
6 | * Author: Simon Evans <spse@secret.org.uk> | 4 | * Author: Simon Evans <spse@secret.org.uk> |
@@ -48,7 +46,6 @@ static const int debug = 0; | |||
48 | 46 | ||
49 | 47 | ||
50 | #define DRIVER_DESC "PCMCIA Flash memory card driver" | 48 | #define DRIVER_DESC "PCMCIA Flash memory card driver" |
51 | #define DRIVER_VERSION "$Revision: 1.55 $" | ||
52 | 49 | ||
53 | /* Size of the PCMCIA address space: 26 bits = 64 MB */ | 50 | /* Size of the PCMCIA address space: 26 bits = 64 MB */ |
54 | #define MAX_PCMCIA_ADDR 0x4000000 | 51 | #define MAX_PCMCIA_ADDR 0x4000000 |
@@ -785,7 +782,7 @@ static struct pcmcia_driver pcmciamtd_driver = { | |||
785 | 782 | ||
786 | static int __init init_pcmciamtd(void) | 783 | static int __init init_pcmciamtd(void) |
787 | { | 784 | { |
788 | info(DRIVER_DESC " " DRIVER_VERSION); | 785 | info(DRIVER_DESC); |
789 | 786 | ||
790 | if(bankwidth && bankwidth != 1 && bankwidth != 2) { | 787 | if(bankwidth && bankwidth != 1 && bankwidth != 2) { |
791 | info("bad bankwidth (%d), using default", bankwidth); | 788 | info("bad bankwidth (%d), using default", bankwidth); |
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index 183255fcfdcb..42d844f8f6bf 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: physmap.c,v 1.39 2005/11/29 14:49:36 gleixner Exp $ | ||
3 | * | ||
4 | * Normal mappings of chips in physical memory | 2 | * Normal mappings of chips in physical memory |
5 | * | 3 | * |
6 | * Copyright (C) 2003 MontaVista Software Inc. | 4 | * Copyright (C) 2003 MontaVista Software Inc. |
@@ -203,7 +201,19 @@ static int physmap_flash_suspend(struct platform_device *dev, pm_message_t state | |||
203 | int i; | 201 | int i; |
204 | 202 | ||
205 | for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) | 203 | for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) |
206 | ret |= info->mtd[i]->suspend(info->mtd[i]); | 204 | if (info->mtd[i]->suspend) { |
205 | ret = info->mtd[i]->suspend(info->mtd[i]); | ||
206 | if (ret) | ||
207 | goto fail; | ||
208 | } | ||
209 | |||
210 | return 0; | ||
211 | fail: | ||
212 | for (--i; i >= 0; --i) | ||
213 | if (info->mtd[i]->suspend) { | ||
214 | BUG_ON(!info->mtd[i]->resume); | ||
215 | info->mtd[i]->resume(info->mtd[i]); | ||
216 | } | ||
207 | 217 | ||
208 | return ret; | 218 | return ret; |
209 | } | 219 | } |
@@ -214,7 +224,8 @@ static int physmap_flash_resume(struct platform_device *dev) | |||
214 | int i; | 224 | int i; |
215 | 225 | ||
216 | for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) | 226 | for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) |
217 | info->mtd[i]->resume(info->mtd[i]); | 227 | if (info->mtd[i]->resume) |
228 | info->mtd[i]->resume(info->mtd[i]); | ||
218 | 229 | ||
219 | return 0; | 230 | return 0; |
220 | } | 231 | } |
@@ -225,8 +236,9 @@ static void physmap_flash_shutdown(struct platform_device *dev) | |||
225 | int i; | 236 | int i; |
226 | 237 | ||
227 | for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) | 238 | for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) |
228 | if (info->mtd[i]->suspend(info->mtd[i]) == 0) | 239 | if (info->mtd[i]->suspend && info->mtd[i]->resume) |
229 | info->mtd[i]->resume(info->mtd[i]); | 240 | if (info->mtd[i]->suspend(info->mtd[i]) == 0) |
241 | info->mtd[i]->resume(info->mtd[i]); | ||
230 | } | 242 | } |
231 | #else | 243 | #else |
232 | #define physmap_flash_suspend NULL | 244 | #define physmap_flash_suspend NULL |
diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c index 3eb2643b2328..e7dd9c8a965e 100644 --- a/drivers/mtd/maps/plat-ram.c +++ b/drivers/mtd/maps/plat-ram.c | |||
@@ -6,8 +6,6 @@ | |||
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.7 2005/11/07 11:14:28 gleixner Exp $ | ||
10 | * | ||
11 | * 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 |
12 | * it under the terms of the GNU General Public License as published by | 10 | * it under the terms of the GNU General Public License as published by |
13 | * the Free Software Foundation; either version 2 of the License, or | 11 | * the Free Software Foundation; either version 2 of the License, or |
diff --git a/drivers/mtd/maps/redwood.c b/drivers/mtd/maps/redwood.c index 4d858b3d5f82..de002eb1a7fe 100644 --- a/drivers/mtd/maps/redwood.c +++ b/drivers/mtd/maps/redwood.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: redwood.c,v 1.11 2005/11/07 11:14:28 gleixner Exp $ | ||
3 | * | ||
4 | * drivers/mtd/maps/redwood.c | 2 | * drivers/mtd/maps/redwood.c |
5 | * | 3 | * |
6 | * FLASH map for the IBM Redwood 4/5/6 boards. | 4 | * FLASH map for the IBM Redwood 4/5/6 boards. |
diff --git a/drivers/mtd/maps/rpxlite.c b/drivers/mtd/maps/rpxlite.c index 809a0c8e7aaf..14d90edb4430 100644 --- a/drivers/mtd/maps/rpxlite.c +++ b/drivers/mtd/maps/rpxlite.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: rpxlite.c,v 1.22 2004/11/04 13:24:15 gleixner Exp $ | ||
3 | * | ||
4 | * Handle mapping of the flash on the RPX Lite and CLLF boards | 2 | * Handle mapping of the flash on the RPX Lite and CLLF boards |
5 | */ | 3 | */ |
6 | 4 | ||
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c index c7d5a52a2d55..e177a43dfff0 100644 --- a/drivers/mtd/maps/sa1100-flash.c +++ b/drivers/mtd/maps/sa1100-flash.c | |||
@@ -2,8 +2,6 @@ | |||
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 | * | ||
6 | * $Id: sa1100-flash.c,v 1.51 2005/11/07 11:14:28 gleixner Exp $ | ||
7 | */ | 5 | */ |
8 | #include <linux/module.h> | 6 | #include <linux/module.h> |
9 | #include <linux/types.h> | 7 | #include <linux/types.h> |
diff --git a/drivers/mtd/maps/sbc8240.c b/drivers/mtd/maps/sbc8240.c index b8c1331b7a04..6e1e99cd2b59 100644 --- a/drivers/mtd/maps/sbc8240.c +++ b/drivers/mtd/maps/sbc8240.c | |||
@@ -4,9 +4,6 @@ | |||
4 | * Carolyn Smith, Tektronix, Inc. | 4 | * Carolyn Smith, Tektronix, Inc. |
5 | * | 5 | * |
6 | * This code is GPLed | 6 | * This code is GPLed |
7 | * | ||
8 | * $Id: sbc8240.c,v 1.5 2005/11/07 11:14:28 gleixner Exp $ | ||
9 | * | ||
10 | */ | 7 | */ |
11 | 8 | ||
12 | /* | 9 | /* |
diff --git a/drivers/mtd/maps/sbc_gxx.c b/drivers/mtd/maps/sbc_gxx.c index 7cc4041d096d..1b1c0b7e11ef 100644 --- a/drivers/mtd/maps/sbc_gxx.c +++ b/drivers/mtd/maps/sbc_gxx.c | |||
@@ -17,8 +17,6 @@ | |||
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.35 2005/11/07 11:14:28 gleixner Exp $ | ||
21 | |||
22 | The SBC-MediaGX / SBC-GXx has up to 16 MiB of | 20 | The SBC-MediaGX / SBC-GXx has up to 16 MiB of |
23 | Intel StrataFlash (28F320/28F640) in x8 mode. | 21 | Intel StrataFlash (28F320/28F640) in x8 mode. |
24 | 22 | ||
diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c index 4045e372b90d..85c1e56309ec 100644 --- a/drivers/mtd/maps/sc520cdp.c +++ b/drivers/mtd/maps/sc520cdp.c | |||
@@ -16,8 +16,6 @@ | |||
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.23 2005/11/17 08:20:27 dwmw2 Exp $ | ||
20 | * | ||
21 | * | 19 | * |
22 | * The SC520CDP is an evaluation board for the Elan SC520 processor available | 20 | * The SC520CDP is an evaluation board for the Elan SC520 processor available |
23 | * from AMD. It has two banks of 32-bit Flash ROM, each 8 Megabytes in size, | 21 | * from AMD. It has two banks of 32-bit Flash ROM, each 8 Megabytes in size, |
diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c index 0fc5584324e3..21169e6d646c 100644 --- a/drivers/mtd/maps/scb2_flash.c +++ b/drivers/mtd/maps/scb2_flash.c | |||
@@ -1,6 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * MTD map driver for BIOS Flash on Intel SCB2 boards | 2 | * MTD map driver for BIOS Flash on Intel SCB2 boards |
3 | * $Id: scb2_flash.c,v 1.12 2005/03/18 14:04:35 gleixner Exp $ | ||
4 | * Copyright (C) 2002 Sun Microsystems, Inc. | 3 | * Copyright (C) 2002 Sun Microsystems, Inc. |
5 | * Tim Hockin <thockin@sun.com> | 4 | * Tim Hockin <thockin@sun.com> |
6 | * | 5 | * |
diff --git a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c index 5e2bce22f37c..b5391ebb736e 100644 --- a/drivers/mtd/maps/scx200_docflash.c +++ b/drivers/mtd/maps/scx200_docflash.c | |||
@@ -2,8 +2,6 @@ | |||
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.12 2005/11/07 11:14:28 gleixner Exp $ | ||
6 | |||
7 | National Semiconductor SCx200 flash mapped with DOCCS | 5 | National Semiconductor SCx200 flash mapped with DOCCS |
8 | */ | 6 | */ |
9 | 7 | ||
diff --git a/drivers/mtd/maps/sharpsl-flash.c b/drivers/mtd/maps/sharpsl-flash.c index 917dc778f24e..026eab028189 100644 --- a/drivers/mtd/maps/sharpsl-flash.c +++ b/drivers/mtd/maps/sharpsl-flash.c | |||
@@ -4,8 +4,6 @@ | |||
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.7 2005/11/07 11:14:28 gleixner Exp $ | ||
8 | * | ||
9 | * based on rpxlite.c,v 1.15 2001/10/02 15:05:14 dwmw2 Exp | 7 | * 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 | 8 | * Handle mapping of the flash on the RPX Lite and CLLF boards |
11 | * | 9 | * |
diff --git a/drivers/mtd/maps/solutionengine.c b/drivers/mtd/maps/solutionengine.c index d76ceef453ce..0eb41d9c6786 100644 --- a/drivers/mtd/maps/solutionengine.c +++ b/drivers/mtd/maps/solutionengine.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: solutionengine.c,v 1.15 2005/11/07 11:14:28 gleixner Exp $ | ||
3 | * | ||
4 | * Flash and EPROM on Hitachi Solution Engine and similar boards. | 2 | * Flash and EPROM on Hitachi Solution Engine and similar boards. |
5 | * | 3 | * |
6 | * (C) 2001 Red Hat, Inc. | 4 | * (C) 2001 Red Hat, Inc. |
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index 001af7f7ddda..0d7c88396c88 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.13 2005/11/07 11:14:28 gleixner Exp $ | 1 | /* |
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. |
diff --git a/drivers/mtd/maps/tqm8xxl.c b/drivers/mtd/maps/tqm8xxl.c index 521734057314..a5d3d8531faa 100644 --- a/drivers/mtd/maps/tqm8xxl.c +++ b/drivers/mtd/maps/tqm8xxl.c | |||
@@ -2,8 +2,6 @@ | |||
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.15 2005/11/07 11:14:28 gleixner Exp $ | ||
6 | * | ||
7 | * based on rpxlite.c | 5 | * based on rpxlite.c |
8 | * | 6 | * |
9 | * Copyright(C) 2001 Kirk Lee <kirk@hpc.ee.ntu.edu.tw> | 7 | * Copyright(C) 2001 Kirk Lee <kirk@hpc.ee.ntu.edu.tw> |
diff --git a/drivers/mtd/maps/ts5500_flash.c b/drivers/mtd/maps/ts5500_flash.c index b47270e850bc..e2147bf11c88 100644 --- a/drivers/mtd/maps/ts5500_flash.c +++ b/drivers/mtd/maps/ts5500_flash.c | |||
@@ -22,8 +22,6 @@ | |||
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 | * | ||
26 | * $Id: ts5500_flash.c,v 1.5 2005/11/07 11:14:28 gleixner Exp $ | ||
27 | */ | 25 | */ |
28 | 26 | ||
29 | #include <linux/init.h> | 27 | #include <linux/init.h> |
diff --git a/drivers/mtd/maps/tsunami_flash.c b/drivers/mtd/maps/tsunami_flash.c index 0f915ac3102e..77a8bfc02577 100644 --- a/drivers/mtd/maps/tsunami_flash.c +++ b/drivers/mtd/maps/tsunami_flash.c | |||
@@ -2,7 +2,6 @@ | |||
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.10 2005/11/07 11:14:29 gleixner Exp $ | ||
6 | */ | 5 | */ |
7 | #include <asm/io.h> | 6 | #include <asm/io.h> |
8 | #include <asm/core_tsunami.h> | 7 | #include <asm/core_tsunami.h> |
diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c index 3fcf92130aa4..0dc645f8152f 100644 --- a/drivers/mtd/maps/uclinux.c +++ b/drivers/mtd/maps/uclinux.c | |||
@@ -4,8 +4,6 @@ | |||
4 | * uclinux.c -- generic memory mapped MTD driver for uclinux | 4 | * uclinux.c -- generic memory mapped MTD driver for uclinux |
5 | * | 5 | * |
6 | * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) | 6 | * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) |
7 | * | ||
8 | * $Id: uclinux.c,v 1.12 2005/11/07 11:14:29 gleixner Exp $ | ||
9 | */ | 7 | */ |
10 | 8 | ||
11 | /****************************************************************************/ | 9 | /****************************************************************************/ |
diff --git a/drivers/mtd/maps/vmax301.c b/drivers/mtd/maps/vmax301.c index b3e487395435..5a0c9a353b0f 100644 --- a/drivers/mtd/maps/vmax301.c +++ b/drivers/mtd/maps/vmax301.c | |||
@@ -1,4 +1,3 @@ | |||
1 | // $Id: vmax301.c,v 1.32 2005/11/07 11:14:29 gleixner Exp $ | ||
2 | /* ###################################################################### | 1 | /* ###################################################################### |
3 | 2 | ||
4 | Tempustech VMAX SBC301 MTD Driver. | 3 | Tempustech VMAX SBC301 MTD Driver. |
diff --git a/drivers/mtd/maps/walnut.c b/drivers/mtd/maps/walnut.c index ca932122fb64..e243476c8171 100644 --- a/drivers/mtd/maps/walnut.c +++ b/drivers/mtd/maps/walnut.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: walnut.c,v 1.3 2005/11/07 11:14:29 gleixner Exp $ | ||
3 | * | ||
4 | * Mapping for Walnut flash | 2 | * Mapping for Walnut flash |
5 | * (used ebony.c as a "framework") | 3 | * (used ebony.c as a "framework") |
6 | * | 4 | * |
diff --git a/drivers/mtd/maps/wr_sbc82xx_flash.c b/drivers/mtd/maps/wr_sbc82xx_flash.c index ac5b8105b6ef..413b0cf9bbd2 100644 --- a/drivers/mtd/maps/wr_sbc82xx_flash.c +++ b/drivers/mtd/maps/wr_sbc82xx_flash.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: wr_sbc82xx_flash.c,v 1.8 2005/11/07 11:14:29 gleixner Exp $ | ||
3 | * | ||
4 | * Map for flash chips on Wind River PowerQUICC II SBC82xx board. | 2 | * Map for flash chips on Wind River PowerQUICC II SBC82xx board. |
5 | * | 3 | * |
6 | * Copyright (C) 2004 Red Hat, Inc. | 4 | * Copyright (C) 2004 Red Hat, Inc. |