aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-at91/at91cap9_devices.c8
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c8
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c8
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c12
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c8
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c12
-rw-r--r--arch/arm/mach-at91/board-cam60.c2
-rw-r--r--arch/arm/mach-at91/board-cap9adk.c2
-rw-r--r--arch/arm/mach-at91/board-dk.c2
-rw-r--r--arch/arm/mach-at91/board-kb9202.c2
-rw-r--r--arch/arm/mach-at91/board-sam9-l9260.c2
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9rlek.c2
-rwxr-xr-xarch/arm/mach-at91/board-yl-9200.c2
-rw-r--r--arch/avr32/boards/atstk1000/Kconfig4
-rw-r--r--arch/avr32/boards/atstk1000/Makefile1
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c78
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c52
-rw-r--r--arch/avr32/mach-at32ap/hsmc.c2
-rw-r--r--drivers/mtd/Kconfig2
-rw-r--r--drivers/mtd/afs.c2
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c8
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c3
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0020.c2
-rw-r--r--drivers/mtd/chips/cfi_probe.c1
-rw-r--r--drivers/mtd/chips/cfi_util.c3
-rw-r--r--drivers/mtd/chips/chipreg.c2
-rw-r--r--drivers/mtd/chips/gen_probe.c1
-rw-r--r--drivers/mtd/chips/jedec_probe.c119
-rw-r--r--drivers/mtd/chips/map_absent.c1
-rw-r--r--drivers/mtd/chips/map_ram.c1
-rw-r--r--drivers/mtd/chips/map_rom.c1
-rw-r--r--drivers/mtd/cmdlinepart.c2
-rw-r--r--drivers/mtd/devices/Kconfig1
-rw-r--r--drivers/mtd/devices/Makefile1
-rw-r--r--drivers/mtd/devices/block2mtd.c6
-rw-r--r--drivers/mtd/devices/doc2000.c2
-rw-r--r--drivers/mtd/devices/doc2001.c2
-rw-r--r--drivers/mtd/devices/doc2001plus.c2
-rw-r--r--drivers/mtd/devices/docecc.c2
-rw-r--r--drivers/mtd/devices/docprobe.c3
-rw-r--r--drivers/mtd/devices/lart.c2
-rw-r--r--drivers/mtd/devices/ms02-nv.c2
-rw-r--r--drivers/mtd/devices/ms02-nv.h2
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c135
-rw-r--r--drivers/mtd/devices/mtdram.c1
-rw-r--r--drivers/mtd/devices/phram.c2
-rw-r--r--drivers/mtd/devices/pmc551.c2
-rw-r--r--drivers/mtd/devices/slram.c2
-rw-r--r--drivers/mtd/ftl.c3
-rw-r--r--drivers/mtd/inftlcore.c5
-rw-r--r--drivers/mtd/inftlmount.c4
-rw-r--r--drivers/mtd/maps/Kconfig12
-rw-r--r--drivers/mtd/maps/Makefile2
-rw-r--r--drivers/mtd/maps/amd76xrom.c1
-rw-r--r--drivers/mtd/maps/autcpu12-nvram.c2
-rw-r--r--drivers/mtd/maps/bast-flash.c2
-rw-r--r--drivers/mtd/maps/bfin-async-flash.c219
-rw-r--r--drivers/mtd/maps/cdb89712.c1
-rw-r--r--drivers/mtd/maps/ceiva.c1
-rw-r--r--drivers/mtd/maps/cfi_flagadm.c2
-rw-r--r--drivers/mtd/maps/dbox2-flash.c2
-rw-r--r--drivers/mtd/maps/dc21285.c2
-rw-r--r--drivers/mtd/maps/dilnetpc.c2
-rw-r--r--drivers/mtd/maps/dmv182.c2
-rw-r--r--drivers/mtd/maps/ebony.c2
-rw-r--r--drivers/mtd/maps/edb7312.c2
-rw-r--r--drivers/mtd/maps/fortunet.c1
-rw-r--r--drivers/mtd/maps/h720x-flash.c2
-rw-r--r--drivers/mtd/maps/ichxrom.c1
-rw-r--r--drivers/mtd/maps/impa7.c2
-rw-r--r--drivers/mtd/maps/integrator-flash.c2
-rw-r--r--drivers/mtd/maps/ipaq-flash.c2
-rw-r--r--drivers/mtd/maps/ixp2000.c2
-rw-r--r--drivers/mtd/maps/ixp4xx.c2
-rw-r--r--drivers/mtd/maps/l440gx.c2
-rw-r--r--drivers/mtd/maps/map_funcs.c2
-rw-r--r--drivers/mtd/maps/mbx860.c2
-rw-r--r--drivers/mtd/maps/mtx-1_flash.c2
-rw-r--r--drivers/mtd/maps/netsc520.c2
-rw-r--r--drivers/mtd/maps/nettel.c2
-rw-r--r--drivers/mtd/maps/octagon-5066.c1
-rw-r--r--drivers/mtd/maps/omap-toto-flash.c2
-rw-r--r--drivers/mtd/maps/pci.c2
-rw-r--r--drivers/mtd/maps/pcmciamtd.c5
-rw-r--r--drivers/mtd/maps/physmap.c2
-rw-r--r--drivers/mtd/maps/plat-ram.c2
-rw-r--r--drivers/mtd/maps/redwood.c2
-rw-r--r--drivers/mtd/maps/rpxlite.c2
-rw-r--r--drivers/mtd/maps/sa1100-flash.c2
-rw-r--r--drivers/mtd/maps/sbc8240.c3
-rw-r--r--drivers/mtd/maps/sbc_gxx.c2
-rw-r--r--drivers/mtd/maps/sc520cdp.c2
-rw-r--r--drivers/mtd/maps/scb2_flash.c1
-rw-r--r--drivers/mtd/maps/scx200_docflash.c2
-rw-r--r--drivers/mtd/maps/sharpsl-flash.c2
-rw-r--r--drivers/mtd/maps/solutionengine.c2
-rw-r--r--drivers/mtd/maps/sun_uflash.c2
-rw-r--r--drivers/mtd/maps/tqm8xxl.c2
-rw-r--r--drivers/mtd/maps/ts5500_flash.c2
-rw-r--r--drivers/mtd/maps/tsunami_flash.c1
-rw-r--r--drivers/mtd/maps/uclinux.c2
-rw-r--r--drivers/mtd/maps/vmax301.c1
-rw-r--r--drivers/mtd/maps/walnut.c2
-rw-r--r--drivers/mtd/maps/wr_sbc82xx_flash.c2
-rw-r--r--drivers/mtd/mtd_blkdevs.c34
-rw-r--r--drivers/mtd/mtdblock.c2
-rw-r--r--drivers/mtd/mtdblock_ro.c2
-rw-r--r--drivers/mtd/mtdchar.c2
-rw-r--r--drivers/mtd/mtdconcat.c2
-rw-r--r--drivers/mtd/mtdcore.c14
-rw-r--r--drivers/mtd/mtdpart.c25
-rw-r--r--drivers/mtd/nand/Kconfig28
-rw-r--r--drivers/mtd/nand/Makefile3
-rw-r--r--drivers/mtd/nand/atmel_nand.c (renamed from drivers/mtd/nand/at91_nand.c)217
-rw-r--r--drivers/mtd/nand/atmel_nand_ecc.h36
-rw-r--r--drivers/mtd/nand/au1550nd.c2
-rw-r--r--drivers/mtd/nand/autcpu12.c2
-rw-r--r--drivers/mtd/nand/cafe_nand.c6
-rw-r--r--drivers/mtd/nand/diskonchip.c2
-rw-r--r--drivers/mtd/nand/edb7312.c2
-rw-r--r--drivers/mtd/nand/excite_nandflash.c2
-rw-r--r--drivers/mtd/nand/fsl_elbc_nand.c4
-rw-r--r--drivers/mtd/nand/h1910.c2
-rw-r--r--drivers/mtd/nand/nand_bbt.c2
-rw-r--r--drivers/mtd/nand/nand_ecc.c2
-rw-r--r--drivers/mtd/nand/nand_ids.c2
-rw-r--r--drivers/mtd/nand/nandsim.c41
-rw-r--r--drivers/mtd/nand/ppchameleonevb.c2
-rw-r--r--drivers/mtd/nand/rtc_from4.c2
-rw-r--r--drivers/mtd/nand/s3c2410.c25
-rw-r--r--drivers/mtd/nand/sharpsl.c2
-rw-r--r--drivers/mtd/nand/spia.c2
-rw-r--r--drivers/mtd/nand/toto.c2
-rw-r--r--drivers/mtd/nand/ts7250.c2
-rw-r--r--drivers/mtd/nftlcore.c5
-rw-r--r--drivers/mtd/nftlmount.c4
-rw-r--r--drivers/mtd/onenand/onenand_base.c54
-rw-r--r--drivers/mtd/redboot.c2
-rw-r--r--drivers/mtd/rfd_ftl.c2
-rw-r--r--include/asm-arm/arch-at91/at91_ecc.h38
-rw-r--r--include/asm-arm/arch-at91/board.h4
-rw-r--r--include/asm-avr32/arch-at32ap/board.h13
-rw-r--r--include/linux/jffs2.h3
-rw-r--r--include/linux/mtd/blktrans.h2
-rw-r--r--include/linux/mtd/cfi.h1
-rw-r--r--include/linux/mtd/cfi_endian.h5
-rw-r--r--include/linux/mtd/concat.h2
-rw-r--r--include/linux/mtd/doc2000.h2
-rw-r--r--include/linux/mtd/flashchip.h3
-rw-r--r--include/linux/mtd/ftl.h2
-rw-r--r--include/linux/mtd/gen_probe.h1
-rw-r--r--include/linux/mtd/inftl.h4
-rw-r--r--include/linux/mtd/map.h1
-rw-r--r--include/linux/mtd/mtd.h2
-rw-r--r--include/linux/mtd/nand.h2
-rw-r--r--include/linux/mtd/nand_ecc.h2
-rw-r--r--include/linux/mtd/nftl.h2
-rw-r--r--include/linux/mtd/partitions.h2
-rw-r--r--include/linux/mtd/physmap.h2
-rw-r--r--include/linux/mtd/plat-ram.h2
-rw-r--r--include/linux/mtd/pmc551.h4
-rw-r--r--include/linux/mtd/xip.h2
-rw-r--r--include/mtd/inftl-user.h2
-rw-r--r--include/mtd/jffs2-user.h2
-rw-r--r--include/mtd/mtd-abi.h2
-rw-r--r--include/mtd/mtd-user.h2
-rw-r--r--include/mtd/nftl-user.h2
170 files changed, 903 insertions, 614 deletions
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c
index be526746e01..fe5148e9f0c 100644
--- a/arch/arm/mach-at91/at91cap9_devices.c
+++ b/arch/arm/mach-at91/at91cap9_devices.c
@@ -278,7 +278,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
278 * -------------------------------------------------------------------- */ 278 * -------------------------------------------------------------------- */
279 279
280#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) 280#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
281static struct at91_nand_data nand_data; 281static struct atmel_nand_data nand_data;
282 282
283#define NAND_BASE AT91_CHIPSELECT_3 283#define NAND_BASE AT91_CHIPSELECT_3
284 284
@@ -296,7 +296,7 @@ static struct resource nand_resources[] = {
296}; 296};
297 297
298static struct platform_device at91cap9_nand_device = { 298static struct platform_device at91cap9_nand_device = {
299 .name = "at91_nand", 299 .name = "atmel_nand",
300 .id = -1, 300 .id = -1,
301 .dev = { 301 .dev = {
302 .platform_data = &nand_data, 302 .platform_data = &nand_data,
@@ -305,7 +305,7 @@ static struct platform_device at91cap9_nand_device = {
305 .num_resources = ARRAY_SIZE(nand_resources), 305 .num_resources = ARRAY_SIZE(nand_resources),
306}; 306};
307 307
308void __init at91_add_device_nand(struct at91_nand_data *data) 308void __init at91_add_device_nand(struct atmel_nand_data *data)
309{ 309{
310 unsigned long csa, mode; 310 unsigned long csa, mode;
311 311
@@ -346,7 +346,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
346 platform_device_register(&at91cap9_nand_device); 346 platform_device_register(&at91cap9_nand_device);
347} 347}
348#else 348#else
349void __init at91_add_device_nand(struct at91_nand_data *data) {} 349void __init at91_add_device_nand(struct atmel_nand_data *data) {}
350#endif 350#endif
351 351
352 352
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index de19bee83f7..8ced9bc8209 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -369,7 +369,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
369 * -------------------------------------------------------------------- */ 369 * -------------------------------------------------------------------- */
370 370
371#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) 371#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
372static struct at91_nand_data nand_data; 372static struct atmel_nand_data nand_data;
373 373
374#define NAND_BASE AT91_CHIPSELECT_3 374#define NAND_BASE AT91_CHIPSELECT_3
375 375
@@ -382,7 +382,7 @@ static struct resource nand_resources[] = {
382}; 382};
383 383
384static struct platform_device at91rm9200_nand_device = { 384static struct platform_device at91rm9200_nand_device = {
385 .name = "at91_nand", 385 .name = "atmel_nand",
386 .id = -1, 386 .id = -1,
387 .dev = { 387 .dev = {
388 .platform_data = &nand_data, 388 .platform_data = &nand_data,
@@ -391,7 +391,7 @@ static struct platform_device at91rm9200_nand_device = {
391 .num_resources = ARRAY_SIZE(nand_resources), 391 .num_resources = ARRAY_SIZE(nand_resources),
392}; 392};
393 393
394void __init at91_add_device_nand(struct at91_nand_data *data) 394void __init at91_add_device_nand(struct atmel_nand_data *data)
395{ 395{
396 unsigned int csa; 396 unsigned int csa;
397 397
@@ -429,7 +429,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
429 platform_device_register(&at91rm9200_nand_device); 429 platform_device_register(&at91rm9200_nand_device);
430} 430}
431#else 431#else
432void __init at91_add_device_nand(struct at91_nand_data *data) {} 432void __init at91_add_device_nand(struct atmel_nand_data *data) {}
433#endif 433#endif
434 434
435 435
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 393a32aefce..3aa62b1151b 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -283,7 +283,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
283 * -------------------------------------------------------------------- */ 283 * -------------------------------------------------------------------- */
284 284
285#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) 285#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
286static struct at91_nand_data nand_data; 286static struct atmel_nand_data nand_data;
287 287
288#define NAND_BASE AT91_CHIPSELECT_3 288#define NAND_BASE AT91_CHIPSELECT_3
289 289
@@ -301,7 +301,7 @@ static struct resource nand_resources[] = {
301}; 301};
302 302
303static struct platform_device at91sam9260_nand_device = { 303static struct platform_device at91sam9260_nand_device = {
304 .name = "at91_nand", 304 .name = "atmel_nand",
305 .id = -1, 305 .id = -1,
306 .dev = { 306 .dev = {
307 .platform_data = &nand_data, 307 .platform_data = &nand_data,
@@ -310,7 +310,7 @@ static struct platform_device at91sam9260_nand_device = {
310 .num_resources = ARRAY_SIZE(nand_resources), 310 .num_resources = ARRAY_SIZE(nand_resources),
311}; 311};
312 312
313void __init at91_add_device_nand(struct at91_nand_data *data) 313void __init at91_add_device_nand(struct atmel_nand_data *data)
314{ 314{
315 unsigned long csa, mode; 315 unsigned long csa, mode;
316 316
@@ -351,7 +351,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
351 platform_device_register(&at91sam9260_nand_device); 351 platform_device_register(&at91sam9260_nand_device);
352} 352}
353#else 353#else
354void __init at91_add_device_nand(struct at91_nand_data *data) {} 354void __init at91_add_device_nand(struct atmel_nand_data *data) {}
355#endif 355#endif
356 356
357 357
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 0babb645b83..247e8e7cebe 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -199,7 +199,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
199 * -------------------------------------------------------------------- */ 199 * -------------------------------------------------------------------- */
200 200
201#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) 201#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
202static struct at91_nand_data nand_data; 202static struct atmel_nand_data nand_data;
203 203
204#define NAND_BASE AT91_CHIPSELECT_3 204#define NAND_BASE AT91_CHIPSELECT_3
205 205
@@ -211,8 +211,8 @@ static struct resource nand_resources[] = {
211 } 211 }
212}; 212};
213 213
214static struct platform_device at91_nand_device = { 214static struct platform_device atmel_nand_device = {
215 .name = "at91_nand", 215 .name = "atmel_nand",
216 .id = -1, 216 .id = -1,
217 .dev = { 217 .dev = {
218 .platform_data = &nand_data, 218 .platform_data = &nand_data,
@@ -221,7 +221,7 @@ static struct platform_device at91_nand_device = {
221 .num_resources = ARRAY_SIZE(nand_resources), 221 .num_resources = ARRAY_SIZE(nand_resources),
222}; 222};
223 223
224void __init at91_add_device_nand(struct at91_nand_data *data) 224void __init at91_add_device_nand(struct atmel_nand_data *data)
225{ 225{
226 unsigned long csa, mode; 226 unsigned long csa, mode;
227 227
@@ -262,11 +262,11 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
262 at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */ 262 at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */
263 263
264 nand_data = *data; 264 nand_data = *data;
265 platform_device_register(&at91_nand_device); 265 platform_device_register(&atmel_nand_device);
266} 266}
267 267
268#else 268#else
269void __init at91_add_device_nand(struct at91_nand_data *data) {} 269void __init at91_add_device_nand(struct atmel_nand_data *data) {}
270#endif 270#endif
271 271
272 272
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 719667e25c9..f1dfbfe094a 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -353,7 +353,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
353 * -------------------------------------------------------------------- */ 353 * -------------------------------------------------------------------- */
354 354
355#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) 355#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
356static struct at91_nand_data nand_data; 356static struct atmel_nand_data nand_data;
357 357
358#define NAND_BASE AT91_CHIPSELECT_3 358#define NAND_BASE AT91_CHIPSELECT_3
359 359
@@ -371,7 +371,7 @@ static struct resource nand_resources[] = {
371}; 371};
372 372
373static struct platform_device at91sam9263_nand_device = { 373static struct platform_device at91sam9263_nand_device = {
374 .name = "at91_nand", 374 .name = "atmel_nand",
375 .id = -1, 375 .id = -1,
376 .dev = { 376 .dev = {
377 .platform_data = &nand_data, 377 .platform_data = &nand_data,
@@ -380,7 +380,7 @@ static struct platform_device at91sam9263_nand_device = {
380 .num_resources = ARRAY_SIZE(nand_resources), 380 .num_resources = ARRAY_SIZE(nand_resources),
381}; 381};
382 382
383void __init at91_add_device_nand(struct at91_nand_data *data) 383void __init at91_add_device_nand(struct atmel_nand_data *data)
384{ 384{
385 unsigned long csa, mode; 385 unsigned long csa, mode;
386 386
@@ -421,7 +421,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
421 platform_device_register(&at91sam9263_nand_device); 421 platform_device_register(&at91sam9263_nand_device);
422} 422}
423#else 423#else
424void __init at91_add_device_nand(struct at91_nand_data *data) {} 424void __init at91_add_device_nand(struct atmel_nand_data *data) {}
425#endif 425#endif
426 426
427 427
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index 450db304936..9945cd25d0a 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -100,7 +100,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
100 * -------------------------------------------------------------------- */ 100 * -------------------------------------------------------------------- */
101 101
102#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) 102#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
103static struct at91_nand_data nand_data; 103static struct atmel_nand_data nand_data;
104 104
105#define NAND_BASE AT91_CHIPSELECT_3 105#define NAND_BASE AT91_CHIPSELECT_3
106 106
@@ -117,8 +117,8 @@ static struct resource nand_resources[] = {
117 } 117 }
118}; 118};
119 119
120static struct platform_device at91_nand_device = { 120static struct platform_device atmel_nand_device = {
121 .name = "at91_nand", 121 .name = "atmel_nand",
122 .id = -1, 122 .id = -1,
123 .dev = { 123 .dev = {
124 .platform_data = &nand_data, 124 .platform_data = &nand_data,
@@ -127,7 +127,7 @@ static struct platform_device at91_nand_device = {
127 .num_resources = ARRAY_SIZE(nand_resources), 127 .num_resources = ARRAY_SIZE(nand_resources),
128}; 128};
129 129
130void __init at91_add_device_nand(struct at91_nand_data *data) 130void __init at91_add_device_nand(struct atmel_nand_data *data)
131{ 131{
132 unsigned long csa; 132 unsigned long csa;
133 133
@@ -164,11 +164,11 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
164 at91_set_A_periph(AT91_PIN_PB5, 0); /* NANDWE */ 164 at91_set_A_periph(AT91_PIN_PB5, 0); /* NANDWE */
165 165
166 nand_data = *data; 166 nand_data = *data;
167 platform_device_register(&at91_nand_device); 167 platform_device_register(&atmel_nand_device);
168} 168}
169 169
170#else 170#else
171void __init at91_add_device_nand(struct at91_nand_data *data) {} 171void __init at91_add_device_nand(struct atmel_nand_data *data) {}
172#endif 172#endif
173 173
174 174
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index b22a1a00405..af2c33aff1a 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -142,7 +142,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
142 return cam60_nand_partition; 142 return cam60_nand_partition;
143} 143}
144 144
145static struct at91_nand_data __initdata cam60_nand_data = { 145static struct atmel_nand_data __initdata cam60_nand_data = {
146 .ale = 21, 146 .ale = 21,
147 .cle = 22, 147 .cle = 22,
148 // .det_pin = ... not there 148 // .det_pin = ... not there
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c
index e5512d1ff21..7144e1a89a2 100644
--- a/arch/arm/mach-at91/board-cap9adk.c
+++ b/arch/arm/mach-at91/board-cap9adk.c
@@ -175,7 +175,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
175 return cap9adk_nand_partitions; 175 return cap9adk_nand_partitions;
176} 176}
177 177
178static struct at91_nand_data __initdata cap9adk_nand_data = { 178static struct atmel_nand_data __initdata cap9adk_nand_data = {
179 .ale = 21, 179 .ale = 21,
180 .cle = 22, 180 .cle = 22,
181// .det_pin = ... not connected 181// .det_pin = ... not connected
diff --git a/arch/arm/mach-at91/board-dk.c b/arch/arm/mach-at91/board-dk.c
index c1a813c7169..ffecacb71f8 100644
--- a/arch/arm/mach-at91/board-dk.c
+++ b/arch/arm/mach-at91/board-dk.c
@@ -150,7 +150,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
150 return dk_nand_partition; 150 return dk_nand_partition;
151} 151}
152 152
153static struct at91_nand_data __initdata dk_nand_data = { 153static struct atmel_nand_data __initdata dk_nand_data = {
154 .ale = 22, 154 .ale = 22,
155 .cle = 21, 155 .cle = 21,
156 .det_pin = AT91_PIN_PB1, 156 .det_pin = AT91_PIN_PB1,
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c
index 4b39b9cda75..153450f168f 100644
--- a/arch/arm/mach-at91/board-kb9202.c
+++ b/arch/arm/mach-at91/board-kb9202.c
@@ -102,7 +102,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
102 return kb9202_nand_partition; 102 return kb9202_nand_partition;
103} 103}
104 104
105static struct at91_nand_data __initdata kb9202_nand_data = { 105static struct atmel_nand_data __initdata kb9202_nand_data = {
106 .ale = 22, 106 .ale = 22,
107 .cle = 21, 107 .cle = 21,
108 // .det_pin = ... not there 108 // .det_pin = ... not there
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
index 8f76af5e219..57a6221943e 100644
--- a/arch/arm/mach-at91/board-sam9-l9260.c
+++ b/arch/arm/mach-at91/board-sam9-l9260.c
@@ -141,7 +141,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
141 return ek_nand_partition; 141 return ek_nand_partition;
142} 142}
143 143
144static struct at91_nand_data __initdata ek_nand_data = { 144static struct atmel_nand_data __initdata ek_nand_data = {
145 .ale = 21, 145 .ale = 21,
146 .cle = 22, 146 .cle = 22,
147// .det_pin = ... not connected 147// .det_pin = ... not connected
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index 4d1d9c77708..6a680795c3c 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -178,7 +178,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
178 return ek_nand_partition; 178 return ek_nand_partition;
179} 179}
180 180
181static struct at91_nand_data __initdata ek_nand_data = { 181static struct atmel_nand_data __initdata ek_nand_data = {
182 .ale = 21, 182 .ale = 21,
183 .cle = 22, 183 .cle = 22,
184// .det_pin = ... not connected 184// .det_pin = ... not connected
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 08382c0df22..43dfbd0d543 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -183,7 +183,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
183 return ek_nand_partition; 183 return ek_nand_partition;
184} 184}
185 185
186static struct at91_nand_data __initdata ek_nand_data = { 186static struct atmel_nand_data __initdata ek_nand_data = {
187 .ale = 22, 187 .ale = 22,
188 .cle = 21, 188 .cle = 21,
189// .det_pin = ... not connected 189// .det_pin = ... not connected
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index b4cd5d0ed59..6605a098011 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -187,7 +187,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
187 return ek_nand_partition; 187 return ek_nand_partition;
188} 188}
189 189
190static struct at91_nand_data __initdata ek_nand_data = { 190static struct atmel_nand_data __initdata ek_nand_data = {
191 .ale = 21, 191 .ale = 21,
192 .cle = 22, 192 .cle = 22,
193// .det_pin = ... not connected 193// .det_pin = ... not connected
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index ffc0597aee8..35e69e51f37 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -88,7 +88,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
88 return ek_nand_partition; 88 return ek_nand_partition;
89} 89}
90 90
91static struct at91_nand_data __initdata ek_nand_data = { 91static struct atmel_nand_data __initdata ek_nand_data = {
92 .ale = 21, 92 .ale = 21,
93 .cle = 22, 93 .cle = 22,
94// .det_pin = ... not connected 94// .det_pin = ... not connected
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c
index b5717108991..e642b3a8bd1 100755
--- a/arch/arm/mach-at91/board-yl-9200.c
+++ b/arch/arm/mach-at91/board-yl-9200.c
@@ -251,7 +251,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
251 return yl_9200_nand_partition; 251 return yl_9200_nand_partition;
252} 252}
253 253
254static struct at91_nand_data __initdata yl_9200_nand_data = { 254static struct atmel_nand_data __initdata yl_9200_nand_data = {
255 .ale= 6, 255 .ale= 6,
256 .cle= 7, 256 .cle= 7,
257 /*.det_pin = AT91_PIN_PCxx,*/ /*we don't have a det pin because NandFlash is fixed to board*/ 257 /*.det_pin = AT91_PIN_PCxx,*/ /*we don't have a det pin because NandFlash is fixed to board*/
diff --git a/arch/avr32/boards/atstk1000/Kconfig b/arch/avr32/boards/atstk1000/Kconfig
index af90b00100f..8dc48214f0b 100644
--- a/arch/avr32/boards/atstk1000/Kconfig
+++ b/arch/avr32/boards/atstk1000/Kconfig
@@ -18,6 +18,10 @@ config BOARD_ATSTK1004
18 bool "ATSTK1004" 18 bool "ATSTK1004"
19 select CPU_AT32AP7002 19 select CPU_AT32AP7002
20 20
21config BOARD_ATSTK1006
22 bool "ATSTK1006"
23 select CPU_AT32AP7000
24
21endchoice 25endchoice
22 26
23 27
diff --git a/arch/avr32/boards/atstk1000/Makefile b/arch/avr32/boards/atstk1000/Makefile
index beead86462e..edecee03742 100644
--- a/arch/avr32/boards/atstk1000/Makefile
+++ b/arch/avr32/boards/atstk1000/Makefile
@@ -2,3 +2,4 @@ obj-y += setup.o flash.o
2obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o 2obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o
3obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o 3obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o
4obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o 4obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o
5obj-$(CONFIG_BOARD_ATSTK1006) += atstk1002.o
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index 000eb4220a1..5bfaf4d87b3 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * ATSTK1002 daughterboard-specific init code 2 * ATSTK1002/ATSTK1006 daughterboard-specific init code
3 * 3 *
4 * Copyright (C) 2005-2006 Atmel Corporation 4 * Copyright (C) 2005-2007 Atmel Corporation
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 version 2 as 7 * it under the terms of the GNU General Public License version 2 as
@@ -29,6 +29,74 @@
29#include "atstk1000.h" 29#include "atstk1000.h"
30 30
31 31
32/*
33 * The ATSTK1006 daughterboard is very similar to the ATSTK1002. Both
34 * have the AT32AP7000 chip on board; the difference is that the
35 * STK1006 has 128 MB SDRAM (the STK1002 uses the 8 MB SDRAM chip on
36 * the STK1000 motherboard) and 256 MB NAND flash (the STK1002 has
37 * none.)
38 *
39 * The RAM difference is handled by the boot loader, so the only
40 * difference we end up handling here is the NAND flash.
41 */
42#ifdef CONFIG_BOARD_ATSTK1006
43#include <linux/mtd/partitions.h>
44#include <asm/arch/smc.h>
45
46static struct smc_timing nand_timing __initdata = {
47 .ncs_read_setup = 0,
48 .nrd_setup = 10,
49 .ncs_write_setup = 0,
50 .nwe_setup = 10,
51
52 .ncs_read_pulse = 30,
53 .nrd_pulse = 15,
54 .ncs_write_pulse = 30,
55 .nwe_pulse = 15,
56
57 .read_cycle = 30,
58 .write_cycle = 30,
59
60 .ncs_read_recover = 0,
61 .nrd_recover = 15,
62 .ncs_write_recover = 0,
63 /* WE# high -> RE# low min 60 ns */
64 .nwe_recover = 50,
65};
66
67static struct smc_config nand_config __initdata = {
68 .bus_width = 1,
69 .nrd_controlled = 1,
70 .nwe_controlled = 1,
71 .nwait_mode = 0,
72 .byte_write = 0,
73 .tdf_cycles = 2,
74 .tdf_mode = 0,
75};
76
77static struct mtd_partition nand_partitions[] = {
78 {
79 .name = "main",
80 .offset = 0x00000000,
81 .size = MTDPART_SIZ_FULL,
82 },
83};
84
85static struct mtd_partition *nand_part_info(int size, int *num_partitions)
86{
87 *num_partitions = ARRAY_SIZE(nand_partitions);
88 return nand_partitions;
89}
90
91struct atmel_nand_data atstk1006_nand_data __initdata = {
92 .cle = 21,
93 .ale = 22,
94 .rdy_pin = GPIO_PIN_PB(30),
95 .enable_pin = GPIO_PIN_PB(29),
96 .partition_info = nand_part_info,
97};
98#endif
99
32struct eth_addr { 100struct eth_addr {
33 u8 addr[6]; 101 u8 addr[6];
34}; 102};
@@ -212,6 +280,12 @@ static int __init atstk1002_init(void)
212 280
213 at32_add_system_devices(); 281 at32_add_system_devices();
214 282
283#ifdef CONFIG_BOARD_ATSTK1006
284 smc_set_timing(&nand_config, &nand_timing);
285 smc_set_configuration(3, &nand_config);
286 at32_add_device_nand(0, &atstk1006_nand_data);
287#endif
288
215#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM 289#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
216 at32_add_device_usart(1); 290 at32_add_device_usart(1);
217#else 291#else
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 0f24b4f85c1..b65d3e0667a 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -1730,6 +1730,58 @@ fail:
1730#endif 1730#endif
1731 1731
1732/* -------------------------------------------------------------------- 1732/* --------------------------------------------------------------------
1733 * NAND Flash / SmartMedia
1734 * -------------------------------------------------------------------- */
1735static struct resource smc_cs3_resource[] __initdata = {
1736 {
1737 .start = 0x0c000000,
1738 .end = 0x0fffffff,
1739 .flags = IORESOURCE_MEM,
1740 }, {
1741 .start = 0xfff03c00,
1742 .end = 0xfff03fff,
1743 .flags = IORESOURCE_MEM,
1744 },
1745};
1746
1747struct platform_device *__init
1748at32_add_device_nand(unsigned int id, struct atmel_nand_data *data)
1749{
1750 struct platform_device *pdev;
1751
1752 if (id != 0 || !data)
1753 return NULL;
1754
1755 pdev = platform_device_alloc("atmel_nand", id);
1756 if (!pdev)
1757 goto fail;
1758
1759 if (platform_device_add_resources(pdev, smc_cs3_resource,
1760 ARRAY_SIZE(smc_cs3_resource)))
1761 goto fail;
1762
1763 if (platform_device_add_data(pdev, data,
1764 sizeof(struct atmel_nand_data)))
1765 goto fail;
1766
1767 set_ebi_sfr_bits(HMATRIX_BIT(CS3A));
1768 if (data->enable_pin)
1769 at32_select_gpio(data->enable_pin,
1770 AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH);
1771 if (data->rdy_pin)
1772 at32_select_gpio(data->rdy_pin, 0);
1773 if (data->det_pin)
1774 at32_select_gpio(data->det_pin, 0);
1775
1776 platform_device_add(pdev);
1777 return pdev;
1778
1779fail:
1780 platform_device_put(pdev);
1781 return NULL;
1782}
1783
1784/* --------------------------------------------------------------------
1733 * AC97C 1785 * AC97C
1734 * -------------------------------------------------------------------- */ 1786 * -------------------------------------------------------------------- */
1735static struct resource atmel_ac97c0_resource[] __initdata = { 1787static struct resource atmel_ac97c0_resource[] __initdata = {
diff --git a/arch/avr32/mach-at32ap/hsmc.c b/arch/avr32/mach-at32ap/hsmc.c
index fa427ed4278..b2d9bc61a35 100644
--- a/arch/avr32/mach-at32ap/hsmc.c
+++ b/arch/avr32/mach-at32ap/hsmc.c
@@ -278,4 +278,4 @@ static int __init hsmc_init(void)
278{ 278{
279 return platform_driver_register(&hsmc_driver); 279 return platform_driver_register(&hsmc_driver);
280} 280}
281arch_initcall(hsmc_init); 281core_initcall(hsmc_init);
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index eed06d068fd..14f11f8b9e5 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -1,5 +1,3 @@
1# $Id: Kconfig,v 1.11 2005/11/07 11:14:19 gleixner Exp $
2
3menuconfig MTD 1menuconfig MTD
4 tristate "Memory Technology Device (MTD) support" 2 tristate "Memory Technology Device (MTD) support"
5 depends on HAS_IOMEM 3 depends on HAS_IOMEM
diff --git a/drivers/mtd/afs.c b/drivers/mtd/afs.c
index 52d51eb91c1..d072ca5be68 100644
--- a/drivers/mtd/afs.c
+++ b/drivers/mtd/afs.c
@@ -21,8 +21,6 @@
21 This is access code for flashes using ARM's flash partitioning 21 This is access code for flashes using ARM's flash partitioning
22 standards. 22 standards.
23 23
24 $Id: afs.c,v 1.15 2005/11/07 11:14:19 gleixner Exp $
25
26======================================================================*/ 24======================================================================*/
27 25
28#include <linux/module.h> 26#include <linux/module.h>
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index fcd1aeccdf9..324ff82a3cd 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -4,8 +4,6 @@
4 * 4 *
5 * (C) 2000 Red Hat. GPL'd 5 * (C) 2000 Red Hat. GPL'd
6 * 6 *
7 * $Id: cfi_cmdset_0001.c,v 1.186 2005/11/23 22:07:52 nico Exp $
8 *
9 * 7 *
10 * 10/10/2000 Nicolas Pitre <nico@cam.org> 8 * 10/10/2000 Nicolas Pitre <nico@cam.org>
11 * - completely revamped method functions so they are aware and 9 * - completely revamped method functions so they are aware and
@@ -50,6 +48,8 @@
50#define I82802AC 0x00ac 48#define I82802AC 0x00ac
51#define MANUFACTURER_ST 0x0020 49#define MANUFACTURER_ST 0x0020
52#define M50LPW080 0x002F 50#define M50LPW080 0x002F
51#define M50FLW080A 0x0080
52#define M50FLW080B 0x0081
53#define AT49BV640D 0x02de 53#define AT49BV640D 0x02de
54 54
55static int cfi_intelext_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); 55static int cfi_intelext_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
@@ -204,7 +204,7 @@ static void fixup_intel_strataflash(struct mtd_info *mtd, void* param)
204{ 204{
205 struct map_info *map = mtd->priv; 205 struct map_info *map = mtd->priv;
206 struct cfi_private *cfi = map->fldrv_priv; 206 struct cfi_private *cfi = map->fldrv_priv;
207 struct cfi_pri_amdstd *extp = cfi->cmdset_priv; 207 struct cfi_pri_intelext *extp = cfi->cmdset_priv;
208 208
209 printk(KERN_WARNING "cfi_cmdset_0001: Suspend " 209 printk(KERN_WARNING "cfi_cmdset_0001: Suspend "
210 "erase on write disabled.\n"); 210 "erase on write disabled.\n");
@@ -301,6 +301,8 @@ static struct cfi_fixup jedec_fixup_table[] = {
301 { MANUFACTURER_INTEL, I82802AB, fixup_use_fwh_lock, NULL, }, 301 { MANUFACTURER_INTEL, I82802AB, fixup_use_fwh_lock, NULL, },
302 { MANUFACTURER_INTEL, I82802AC, fixup_use_fwh_lock, NULL, }, 302 { MANUFACTURER_INTEL, I82802AC, fixup_use_fwh_lock, NULL, },
303 { MANUFACTURER_ST, M50LPW080, fixup_use_fwh_lock, NULL, }, 303 { MANUFACTURER_ST, M50LPW080, fixup_use_fwh_lock, NULL, },
304 { MANUFACTURER_ST, M50FLW080A, fixup_use_fwh_lock, NULL, },
305 { MANUFACTURER_ST, M50FLW080B, fixup_use_fwh_lock, NULL, },
304 { 0, 0, NULL, NULL } 306 { 0, 0, NULL, NULL }
305}; 307};
306static struct cfi_fixup fixup_table[] = { 308static struct cfi_fixup fixup_table[] = {
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index f7fcc638953..a972cc6be43 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -16,9 +16,6 @@
16 * Occasionally maintained by Thayne Harbaugh tharbaugh at lnxi dot com 16 * Occasionally maintained by Thayne Harbaugh tharbaugh at lnxi dot com
17 * 17 *
18 * This code is GPL 18 * This code is GPL
19 *
20 * $Id: cfi_cmdset_0002.c,v 1.122 2005/11/07 11:14:22 gleixner Exp $
21 *
22 */ 19 */
23 20
24#include <linux/module.h> 21#include <linux/module.h>
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
index 1b720cc571f..d4714dd9f7a 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -4,8 +4,6 @@
4 * 4 *
5 * (C) 2000 Red Hat. GPL'd 5 * (C) 2000 Red Hat. GPL'd
6 * 6 *
7 * $Id: cfi_cmdset_0020.c,v 1.22 2005/11/07 11:14:22 gleixner Exp $
8 *
9 * 10/10/2000 Nicolas Pitre <nico@cam.org> 7 * 10/10/2000 Nicolas Pitre <nico@cam.org>
10 * - completely revamped method functions so they are aware and 8 * - completely revamped method functions so they are aware and
11 * independent of the flash geometry (buswidth, interleave, etc.) 9 * independent of the flash geometry (buswidth, interleave, etc.)
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index a4463a91ce3..c418e92e1d9 100644
--- a/drivers/mtd/chips/cfi_probe.c
+++ b/drivers/mtd/chips/cfi_probe.c
@@ -1,7 +1,6 @@
1/* 1/*
2 Common Flash Interface probe code. 2 Common Flash Interface probe code.
3 (C) 2000 Red Hat. GPL'd. 3 (C) 2000 Red Hat. GPL'd.
4 $Id: cfi_probe.c,v 1.86 2005/11/29 14:48:31 gleixner Exp $
5*/ 4*/
6 5
7#include <linux/module.h> 6#include <linux/module.h>
diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c
index 72e0022a47b..0ee45701801 100644
--- a/drivers/mtd/chips/cfi_util.c
+++ b/drivers/mtd/chips/cfi_util.c
@@ -6,9 +6,6 @@
6 * Copyright (C) 2003 STMicroelectronics Limited 6 * Copyright (C) 2003 STMicroelectronics Limited
7 * 7 *
8 * This code is covered by the GPL. 8 * This code is covered by the GPL.
9 *
10 * $Id: cfi_util.c,v 1.10 2005/11/07 11:14:23 gleixner Exp $
11 *
12 */ 9 */
13 10
14#include <linux/module.h> 11#include <linux/module.h>
diff --git a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c
index 2174c97549f..c8576096822 100644
--- a/drivers/mtd/chips/chipreg.c
+++ b/drivers/mtd/chips/chipreg.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: chipreg.c,v 1.17 2004/11/16 18:29:00 dwmw2 Exp $
3 *
4 * Registration for chip drivers 2 * Registration for chip drivers
5 * 3 *
6 */ 4 */
diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c
index d338b8c9278..e53a58ae384 100644
--- a/drivers/mtd/chips/gen_probe.c
+++ b/drivers/mtd/chips/gen_probe.c
@@ -2,7 +2,6 @@
2 * Routines common to all CFI-type probes. 2 * Routines common to all CFI-type probes.
3 * (C) 2001-2003 Red Hat, Inc. 3 * (C) 2001-2003 Red Hat, Inc.
4 * GPL'd 4 * GPL'd
5 * $Id: gen_probe.c,v 1.24 2005/11/07 11:14:23 gleixner Exp $
6 */ 5 */
7 6
8#include <linux/kernel.h> 7#include <linux/kernel.h>
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c
index aa07575eb28..afb35e3a3ce 100644
--- a/drivers/mtd/chips/jedec_probe.c
+++ b/drivers/mtd/chips/jedec_probe.c
@@ -1,7 +1,6 @@
1/* 1/*
2 Common Flash Interface probe code. 2 Common Flash Interface probe code.
3 (C) 2000 Red Hat. GPL'd. 3 (C) 2000 Red Hat. GPL'd.
4 $Id: jedec_probe.c,v 1.66 2005/11/07 11:14:23 gleixner Exp $
5 See JEDEC (http://www.jedec.org/) standard JESD21C (section 3.5) 4 See JEDEC (http://www.jedec.org/) standard JESD21C (section 3.5)
6 for the standard this probe goes back to. 5 for the standard this probe goes back to.
7 6
@@ -26,6 +25,7 @@
26/* Manufacturers */ 25/* Manufacturers */
27#define MANUFACTURER_AMD 0x0001 26#define MANUFACTURER_AMD 0x0001
28#define MANUFACTURER_ATMEL 0x001f 27#define MANUFACTURER_ATMEL 0x001f
28#define MANUFACTURER_EON 0x001c
29#define MANUFACTURER_FUJITSU 0x0004 29#define MANUFACTURER_FUJITSU 0x0004
30#define MANUFACTURER_HYUNDAI 0x00AD 30#define MANUFACTURER_HYUNDAI 0x00AD
31#define MANUFACTURER_INTEL 0x0089 31#define MANUFACTURER_INTEL 0x0089
@@ -37,6 +37,7 @@
37#define MANUFACTURER_ST 0x0020 37#define MANUFACTURER_ST 0x0020
38#define MANUFACTURER_TOSHIBA 0x0098 38#define MANUFACTURER_TOSHIBA 0x0098
39#define MANUFACTURER_WINBOND 0x00da 39#define MANUFACTURER_WINBOND 0x00da
40#define CONTINUATION_CODE 0x007f
40 41
41 42
42/* AMD */ 43/* AMD */
@@ -58,6 +59,8 @@
58#define AM29LV040B 0x004F 59#define AM29LV040B 0x004F
59#define AM29F032B 0x0041 60#define AM29F032B 0x0041
60#define AM29F002T 0x00B0 61#define AM29F002T 0x00B0
62#define AM29SL800DB 0x226B
63#define AM29SL800DT 0x22EA
61 64
62/* Atmel */ 65/* Atmel */
63#define AT49BV512 0x0003 66#define AT49BV512 0x0003
@@ -67,6 +70,10 @@
67#define AT49BV32X 0x00C8 70#define AT49BV32X 0x00C8
68#define AT49BV32XT 0x00C9 71#define AT49BV32XT 0x00C9
69 72
73/* Eon */
74#define EN29SL800BB 0x226B
75#define EN29SL800BT 0x22EA
76
70/* Fujitsu */ 77/* Fujitsu */
71#define MBM29F040C 0x00A4 78#define MBM29F040C 0x00A4
72#define MBM29F800BA 0x2258 79#define MBM29F800BA 0x2258
@@ -141,6 +148,8 @@
141#define M50FW080 0x002D 148#define M50FW080 0x002D
142#define M50FW016 0x002E 149#define M50FW016 0x002E
143#define M50LPW080 0x002F 150#define M50LPW080 0x002F
151#define M50FLW080A 0x0080
152#define M50FLW080B 0x0081
144 153
145/* SST */ 154/* SST */
146#define SST29EE020 0x0010 155#define SST29EE020 0x0010
@@ -522,6 +531,36 @@ static const struct amd_flash_info jedec_table[] = {
522 ERASEINFO(0x04000,1), 531 ERASEINFO(0x04000,1),
523 } 532 }
524 }, { 533 }, {
534 .mfr_id = MANUFACTURER_AMD,
535 .dev_id = AM29SL800DT,
536 .name = "AMD AM29SL800DT",
537 .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
538 .uaddr = MTD_UADDR_0x0AAA_0x0555,
539 .dev_size = SIZE_1MiB,
540 .cmd_set = P_ID_AMD_STD,
541 .nr_regions = 4,
542 .regions = {
543 ERASEINFO(0x10000,15),
544 ERASEINFO(0x08000,1),
545 ERASEINFO(0x02000,2),
546 ERASEINFO(0x04000,1),
547 }
548 }, {
549 .mfr_id = MANUFACTURER_AMD,
550 .dev_id = AM29SL800DB,
551 .name = "AMD AM29SL800DB",
552 .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
553 .uaddr = MTD_UADDR_0x0AAA_0x0555,
554 .dev_size = SIZE_1MiB,
555 .cmd_set = P_ID_AMD_STD,
556 .nr_regions = 4,
557 .regions = {
558 ERASEINFO(0x04000,1),
559 ERASEINFO(0x02000,2),
560 ERASEINFO(0x08000,1),
561 ERASEINFO(0x10000,15),
562 }
563 }, {
525 .mfr_id = MANUFACTURER_ATMEL, 564 .mfr_id = MANUFACTURER_ATMEL,
526 .dev_id = AT49BV512, 565 .dev_id = AT49BV512,
527 .name = "Atmel AT49BV512", 566 .name = "Atmel AT49BV512",
@@ -599,6 +638,36 @@ static const struct amd_flash_info jedec_table[] = {
599 ERASEINFO(0x02000,8) 638 ERASEINFO(0x02000,8)
600 } 639 }
601 }, { 640 }, {
641 .mfr_id = MANUFACTURER_EON,
642 .dev_id = EN29SL800BT,
643 .name = "Eon EN29SL800BT",
644 .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
645 .uaddr = MTD_UADDR_0x0AAA_0x0555,
646 .dev_size = SIZE_1MiB,
647 .cmd_set = P_ID_AMD_STD,
648 .nr_regions = 4,
649 .regions = {
650 ERASEINFO(0x10000,15),
651 ERASEINFO(0x08000,1),
652 ERASEINFO(0x02000,2),
653 ERASEINFO(0x04000,1),
654 }
655 }, {
656 .mfr_id = MANUFACTURER_EON,
657 .dev_id = EN29SL800BB,
658 .name = "Eon EN29SL800BB",
659 .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8,
660 .uaddr = MTD_UADDR_0x0AAA_0x0555,
661 .dev_size = SIZE_1MiB,
662 .cmd_set = P_ID_AMD_STD,
663 .nr_regions = 4,
664 .regions = {
665 ERASEINFO(0x04000,1),
666 ERASEINFO(0x02000,2),
667 ERASEINFO(0x08000,1),
668 ERASEINFO(0x10000,15),
669 }
670 }, {
602 .mfr_id = MANUFACTURER_FUJITSU, 671 .mfr_id = MANUFACTURER_FUJITSU,
603 .dev_id = MBM29F040C, 672 .dev_id = MBM29F040C,
604 .name = "Fujitsu MBM29F040C", 673 .name = "Fujitsu MBM29F040C",
@@ -1590,6 +1659,36 @@ static const struct amd_flash_info jedec_table[] = {
1590 .nr_regions = 1, 1659 .nr_regions = 1,
1591 .regions = { 1660 .regions = {
1592 ERASEINFO(0x10000,16), 1661 ERASEINFO(0x10000,16),
1662 },
1663 }, {
1664 .mfr_id = MANUFACTURER_ST,
1665 .dev_id = M50FLW080A,
1666 .name = "ST M50FLW080A",
1667 .devtypes = CFI_DEVICETYPE_X8,
1668 .uaddr = MTD_UADDR_UNNECESSARY,
1669 .dev_size = SIZE_1MiB,
1670 .cmd_set = P_ID_INTEL_EXT,
1671 .nr_regions = 4,
1672 .regions = {
1673 ERASEINFO(0x1000,16),
1674 ERASEINFO(0x10000,13),
1675 ERASEINFO(0x1000,16),
1676 ERASEINFO(0x1000,16),
1677 }
1678 }, {
1679 .mfr_id = MANUFACTURER_ST,
1680 .dev_id = M50FLW080B,
1681 .name = "ST M50FLW080B",
1682 .devtypes = CFI_DEVICETYPE_X8,
1683 .uaddr = MTD_UADDR_UNNECESSARY,
1684 .dev_size = SIZE_1MiB,
1685 .cmd_set = P_ID_INTEL_EXT,
1686 .nr_regions = 4,
1687 .regions = {
1688 ERASEINFO(0x1000,16),
1689 ERASEINFO(0x1000,16),
1690 ERASEINFO(0x10000,13),
1691 ERASEINFO(0x1000,16),
1593 } 1692 }
1594 }, { 1693 }, {
1595 .mfr_id = MANUFACTURER_TOSHIBA, 1694 .mfr_id = MANUFACTURER_TOSHIBA,
@@ -1696,9 +1795,21 @@ static inline u32 jedec_read_mfr(struct map_info *map, uint32_t base,
1696{ 1795{
1697 map_word result; 1796 map_word result;
1698 unsigned long mask; 1797 unsigned long mask;
1699 u32 ofs = cfi_build_cmd_addr(0, cfi_interleave(cfi), cfi->device_type); 1798 int bank = 0;
1700 mask = (1 << (cfi->device_type * 8)) -1; 1799
1701 result = map_read(map, base + ofs); 1800 /* According to JEDEC "Standard Manufacturer's Identification Code"
1801 * (http://www.jedec.org/download/search/jep106W.pdf)
1802 * several first banks can contain 0x7f instead of actual ID
1803 */
1804 do {
1805 uint32_t ofs = cfi_build_cmd_addr(0 + (bank << 8),
1806 cfi_interleave(cfi),
1807 cfi->device_type);
1808 mask = (1 << (cfi->device_type * 8)) - 1;
1809 result = map_read(map, base + ofs);
1810 bank++;
1811 } while ((result.x[0] & mask) == CONTINUATION_CODE);
1812
1702 return result.x[0] & mask; 1813 return result.x[0] & mask;
1703} 1814}
1704 1815
diff --git a/drivers/mtd/chips/map_absent.c b/drivers/mtd/chips/map_absent.c
index fc478c0f93f..494d30d0631 100644
--- a/drivers/mtd/chips/map_absent.c
+++ b/drivers/mtd/chips/map_absent.c
@@ -1,7 +1,6 @@
1/* 1/*
2 * Common code to handle absent "placeholder" devices 2 * Common code to handle absent "placeholder" devices
3 * Copyright 2001 Resilience Corporation <ebrower@resilience.com> 3 * Copyright 2001 Resilience Corporation <ebrower@resilience.com>
4 * $Id: map_absent.c,v 1.6 2005/11/07 11:14:23 gleixner Exp $
5 * 4 *
6 * This map driver is used to allocate "placeholder" MTD 5 * This map driver is used to allocate "placeholder" MTD
7 * devices on systems that have socketed/removable media. 6 * devices on systems that have socketed/removable media.
diff --git a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c
index 5cb6d526366..072dd8abf33 100644
--- a/drivers/mtd/chips/map_ram.c
+++ b/drivers/mtd/chips/map_ram.c
@@ -1,7 +1,6 @@
1/* 1/*
2 * Common code to handle map devices which are simple RAM 2 * Common code to handle map devices which are simple RAM
3 * (C) 2000 Red Hat. GPL'd. 3 * (C) 2000 Red Hat. GPL'd.
4 * $Id: map_ram.c,v 1.22 2005/01/05 18:05:12 dwmw2 Exp $
5 */ 4 */
6 5
7#include <linux/module.h> 6#include <linux/module.h>
diff --git a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c
index cb27f855074..821d0ed6bae 100644
--- a/drivers/mtd/chips/map_rom.c
+++ b/drivers/mtd/chips/map_rom.c
@@ -1,7 +1,6 @@
1/* 1/*
2 * Common code to handle map devices which are simple ROM 2 * Common code to handle map devices which are simple ROM
3 * (C) 2000 Red Hat. GPL'd. 3 * (C) 2000 Red Hat. GPL'd.
4 * $Id: map_rom.c,v 1.23 2005/01/05 18:05:12 dwmw2 Exp $
5 */ 4 */
6 5
7#include <linux/module.h> 6#include <linux/module.h>
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index e472a0e9de9..68782ab2f0d 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: cmdlinepart.c,v 1.19 2005/11/07 11:14:19 gleixner Exp $
3 *
4 * Read flash partition table from command line 2 * Read flash partition table from command line
5 * 3 *
6 * Copyright 2002 SYSGO Real-Time Solutions GmbH 4 * Copyright 2002 SYSGO Real-Time Solutions GmbH
diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
index 35ed1103dbb..9c613f06623 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -1,5 +1,4 @@
1# drivers/mtd/maps/Kconfig 1# drivers/mtd/maps/Kconfig
2# $Id: Kconfig,v 1.18 2005/11/07 11:14:24 gleixner Exp $
3 2
4menu "Self-contained MTD device drivers" 3menu "Self-contained MTD device drivers"
5 depends on MTD!=n 4 depends on MTD!=n
diff --git a/drivers/mtd/devices/Makefile b/drivers/mtd/devices/Makefile
index 0f788d5c4bf..0993d5cf392 100644
--- a/drivers/mtd/devices/Makefile
+++ b/drivers/mtd/devices/Makefile
@@ -1,7 +1,6 @@
1# 1#
2# linux/drivers/devices/Makefile 2# linux/drivers/devices/Makefile
3# 3#
4# $Id: Makefile.common,v 1.7 2004/12/22 17:51:15 joern Exp $
5 4
6obj-$(CONFIG_MTD_DOC2000) += doc2000.o 5obj-$(CONFIG_MTD_DOC2000) += doc2000.o
7obj-$(CONFIG_MTD_DOC2001) += doc2001.o 6obj-$(CONFIG_MTD_DOC2001) += doc2001.o
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 519d942e794..303ea9b8cfe 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: block2mtd.c,v 1.30 2005/11/29 14:48:32 gleixner Exp $
3 *
4 * block2mtd.c - create an mtd from a block device 2 * block2mtd.c - create an mtd from a block device
5 * 3 *
6 * Copyright (C) 2001,2002 Simon Evans <spse@secret.org.uk> 4 * Copyright (C) 2001,2002 Simon Evans <spse@secret.org.uk>
@@ -20,9 +18,6 @@
20#include <linux/mutex.h> 18#include <linux/mutex.h>
21#include <linux/mount.h> 19#include <linux/mount.h>
22 20
23#define VERSION "$Revision: 1.30 $"
24
25
26#define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) 21#define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args)
27#define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args) 22#define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args)
28 23
@@ -451,7 +446,6 @@ MODULE_PARM_DESC(block2mtd, "Device to use. \"block2mtd=<dev>[,<erasesize>]\"");
451static int __init block2mtd_init(void) 446static int __init block2mtd_init(void)
452{ 447{
453 int ret = 0; 448 int ret = 0;
454 INFO("version " VERSION);
455 449
456#ifndef MODULE 450#ifndef MODULE
457 if (strlen(block2mtd_paramline)) 451 if (strlen(block2mtd_paramline))
diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c
index 846989f292e..50de839c77a 100644
--- a/drivers/mtd/devices/doc2000.c
+++ b/drivers/mtd/devices/doc2000.c
@@ -3,8 +3,6 @@
3 * Linux driver for Disk-On-Chip 2000 and Millennium 3 * Linux driver for Disk-On-Chip 2000 and Millennium
4 * (c) 1999 Machine Vision Holdings, Inc. 4 * (c) 1999 Machine Vision Holdings, Inc.
5 * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org> 5 * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
6 *
7 * $Id: doc2000.c,v 1.67 2005/11/07 11:14:24 gleixner Exp $
8 */ 6 */
9 7
10#include <linux/kernel.h> 8#include <linux/kernel.h>
diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c
index 6413efc045e..e32c568c114 100644
--- a/drivers/mtd/devices/doc2001.c
+++ b/drivers/mtd/devices/doc2001.c
@@ -3,8 +3,6 @@
3 * Linux driver for Disk-On-Chip Millennium 3 * Linux driver for Disk-On-Chip Millennium
4 * (c) 1999 Machine Vision Holdings, Inc. 4 * (c) 1999 Machine Vision Holdings, Inc.
5 * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org> 5 * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
6 *
7 * $Id: doc2001.c,v 1.49 2005/11/07 11:14:24 gleixner Exp $
8 */ 6 */
9 7
10#include <linux/kernel.h> 8#include <linux/kernel.h>
diff --git a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c
index 83be3461658..d853f891b58 100644
--- a/drivers/mtd/devices/doc2001plus.c
+++ b/drivers/mtd/devices/doc2001plus.c
@@ -6,8 +6,6 @@
6 * (c) 1999 Machine Vision Holdings, Inc. 6 * (c) 1999 Machine Vision Holdings, Inc.
7 * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org> 7 * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
8 * 8 *
9 * $Id: doc2001plus.c,v 1.14 2005/11/07 11:14:24 gleixner Exp $
10 *
11 * Released under GPL 9 * Released under GPL
12 */ 10 */
13 11
diff --git a/drivers/mtd/devices/docecc.c b/drivers/mtd/devices/docecc.c
index fd8a8daba3a..874e51b110a 100644
--- a/drivers/mtd/devices/docecc.c
+++ b/drivers/mtd/devices/docecc.c
@@ -7,8 +7,6 @@
7 * Author: Fabrice Bellard (fabrice.bellard@netgem.com) 7 * Author: Fabrice Bellard (fabrice.bellard@netgem.com)
8 * Copyright (C) 2000 Netgem S.A. 8 * Copyright (C) 2000 Netgem S.A.
9 * 9 *
10 * $Id: docecc.c,v 1.7 2005/11/07 11:14:25 gleixner Exp $
11 *
12 * 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
13 * 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
14 * the Free Software Foundation; either version 2 of the License, or 12 * the Free Software Foundation; either version 2 of the License, or
diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c
index d8cc94ec4e5..6e5d811ae83 100644
--- a/drivers/mtd/devices/docprobe.c
+++ b/drivers/mtd/devices/docprobe.c
@@ -4,9 +4,6 @@
4/* (C) 1999 Machine Vision Holdings, Inc. */ 4/* (C) 1999 Machine Vision Holdings, Inc. */
5/* (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> */ 5/* (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> */
6 6
7/* $Id: docprobe.c,v 1.46 2005/11/07 11:14:25 gleixner Exp $ */
8
9
10 7
11/* DOC_PASSIVE_PROBE: 8/* DOC_PASSIVE_PROBE:
12 In order to ensure that the BIOS checksum is correct at boot time, and 9 In order to ensure that the BIOS checksum is correct at boot time, and
diff --git a/drivers/mtd/devices/lart.c b/drivers/mtd/devices/lart.c
index 1d324e5c412..f4bda4cee49 100644
--- a/drivers/mtd/devices/lart.c
+++ b/drivers/mtd/devices/lart.c
@@ -2,8 +2,6 @@
2/* 2/*
3 * MTD driver for the 28F160F3 Flash Memory (non-CFI) on LART. 3 * MTD driver for the 28F160F3 Flash Memory (non-CFI) on LART.
4 * 4 *
5 * $Id: lart.c,v 1.9 2005/11/07 11:14:25 gleixner Exp $
6 *
7 * Author: Abraham vd Merwe <abraham@2d3d.co.za> 5 * Author: Abraham vd Merwe <abraham@2d3d.co.za>
8 * 6 *
9 * Copyright (c) 2001, 2d3D, Inc. 7 * Copyright (c) 2001, 2d3D, Inc.
diff --git a/drivers/mtd/devices/ms02-nv.c b/drivers/mtd/devices/ms02-nv.c
index 9cff119a202..6a9a24a80a6 100644
--- a/drivers/mtd/devices/ms02-nv.c
+++ b/drivers/mtd/devices/ms02-nv.c
@@ -5,8 +5,6 @@
5 * modify it under the terms of the GNU General Public License 5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
8 *
9 * $Id: ms02-nv.c,v 1.11 2005/11/14 13:41:47 macro Exp $
10 */ 8 */
11 9
12#include <linux/init.h> 10#include <linux/init.h>
diff --git a/drivers/mtd/devices/ms02-nv.h b/drivers/mtd/devices/ms02-nv.h
index 8a6eef7cfee..04deafd3a77 100644
--- a/drivers/mtd/devices/ms02-nv.h
+++ b/drivers/mtd/devices/ms02-nv.h
@@ -9,8 +9,6 @@
9 * modify it under the terms of the GNU General Public License 9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
12 *
13 * $Id: ms02-nv.h,v 1.3 2003/08/19 09:25:36 dwmw2 Exp $
14 */ 12 */
15 13
16#include <linux/ioport.h> 14#include <linux/ioport.h>
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index b35e4813a3a..54e36bfc2c3 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -82,7 +82,7 @@
82 82
83 83
84struct dataflash { 84struct dataflash {
85 u8 command[4]; 85 uint8_t command[4];
86 char name[24]; 86 char name[24];
87 87
88 unsigned partitioned:1; 88 unsigned partitioned:1;
@@ -150,7 +150,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
150 struct spi_transfer x = { .tx_dma = 0, }; 150 struct spi_transfer x = { .tx_dma = 0, };
151 struct spi_message msg; 151 struct spi_message msg;
152 unsigned blocksize = priv->page_size << 3; 152 unsigned blocksize = priv->page_size << 3;
153 u8 *command; 153 uint8_t *command;
154 154
155 DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%x len 0x%x\n", 155 DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%x len 0x%x\n",
156 spi->dev.bus_id, 156 spi->dev.bus_id,
@@ -182,8 +182,8 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
182 pageaddr = pageaddr << priv->page_offset; 182 pageaddr = pageaddr << priv->page_offset;
183 183
184 command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE; 184 command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE;
185 command[1] = (u8)(pageaddr >> 16); 185 command[1] = (uint8_t)(pageaddr >> 16);
186 command[2] = (u8)(pageaddr >> 8); 186 command[2] = (uint8_t)(pageaddr >> 8);
187 command[3] = 0; 187 command[3] = 0;
188 188
189 DEBUG(MTD_DEBUG_LEVEL3, "ERASE %s: (%x) %x %x %x [%i]\n", 189 DEBUG(MTD_DEBUG_LEVEL3, "ERASE %s: (%x) %x %x %x [%i]\n",
@@ -234,7 +234,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
234 struct spi_transfer x[2] = { { .tx_dma = 0, }, }; 234 struct spi_transfer x[2] = { { .tx_dma = 0, }, };
235 struct spi_message msg; 235 struct spi_message msg;
236 unsigned int addr; 236 unsigned int addr;
237 u8 *command; 237 uint8_t *command;
238 int status; 238 int status;
239 239
240 DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n", 240 DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n",
@@ -274,9 +274,9 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
274 * fewer "don't care" bytes. Both buffers stay unchanged. 274 * fewer "don't care" bytes. Both buffers stay unchanged.
275 */ 275 */
276 command[0] = OP_READ_CONTINUOUS; 276 command[0] = OP_READ_CONTINUOUS;
277 command[1] = (u8)(addr >> 16); 277 command[1] = (uint8_t)(addr >> 16);
278 command[2] = (u8)(addr >> 8); 278 command[2] = (uint8_t)(addr >> 8);
279 command[3] = (u8)(addr >> 0); 279 command[3] = (uint8_t)(addr >> 0);
280 /* plus 4 "don't care" bytes */ 280 /* plus 4 "don't care" bytes */
281 281
282 status = spi_sync(priv->spi, &msg); 282 status = spi_sync(priv->spi, &msg);
@@ -311,7 +311,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
311 size_t remaining = len; 311 size_t remaining = len;
312 u_char *writebuf = (u_char *) buf; 312 u_char *writebuf = (u_char *) buf;
313 int status = -EINVAL; 313 int status = -EINVAL;
314 u8 *command; 314 uint8_t *command;
315 315
316 DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n", 316 DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n",
317 spi->dev.bus_id, (unsigned)to, (unsigned)(to + len)); 317 spi->dev.bus_id, (unsigned)to, (unsigned)(to + len));
@@ -487,7 +487,9 @@ add_dataflash(struct spi_device *spi, char *name,
487 device->write = dataflash_write; 487 device->write = dataflash_write;
488 device->priv = priv; 488 device->priv = priv;
489 489
490 dev_info(&spi->dev, "%s (%d KBytes)\n", name, device->size/1024); 490 dev_info(&spi->dev, "%s (%d KBytes) pagesize %d bytes, "
491 "erasesize %d bytes\n", name, device->size/1024,
492 pagesize, pagesize * 8); /* 8 pages = 1 block */
491 dev_set_drvdata(&spi->dev, priv); 493 dev_set_drvdata(&spi->dev, priv);
492 494
493 if (mtd_has_partitions()) { 495 if (mtd_has_partitions()) {
@@ -521,7 +523,7 @@ add_dataflash(struct spi_device *spi, char *name,
521 * 523 *
522 * Device Density ID code #Pages PageSize Offset 524 * Device Density ID code #Pages PageSize Offset
523 * AT45DB011B 1Mbit (128K) xx0011xx (0x0c) 512 264 9 525 * AT45DB011B 1Mbit (128K) xx0011xx (0x0c) 512 264 9
524 * AT45DB021B 2Mbit (256K) xx0101xx (0x14) 1025 264 9 526 * AT45DB021B 2Mbit (256K) xx0101xx (0x14) 1024 264 9
525 * AT45DB041B 4Mbit (512K) xx0111xx (0x1c) 2048 264 9 527 * AT45DB041B 4Mbit (512K) xx0111xx (0x1c) 2048 264 9
526 * AT45DB081B 8Mbit (1M) xx1001xx (0x24) 4096 264 9 528 * AT45DB081B 8Mbit (1M) xx1001xx (0x24) 4096 264 9
527 * AT45DB0161B 16Mbit (2M) xx1011xx (0x2c) 4096 528 10 529 * AT45DB0161B 16Mbit (2M) xx1011xx (0x2c) 4096 528 10
@@ -529,9 +531,114 @@ add_dataflash(struct spi_device *spi, char *name,
529 * AT45DB0642 64Mbit (8M) xx111xxx (0x3c) 8192 1056 11 531 * AT45DB0642 64Mbit (8M) xx111xxx (0x3c) 8192 1056 11
530 * AT45DB1282 128Mbit (16M) xx0100xx (0x10) 16384 1056 11 532 * AT45DB1282 128Mbit (16M) xx0100xx (0x10) 16384 1056 11
531 */ 533 */
534
535struct flash_info {
536 char *name;
537
538 /* JEDEC id zero means "no ID" (most older chips); otherwise it has
539 * a high byte of zero plus three data bytes: the manufacturer id,
540 * then a two byte device id.
541 */
542 uint32_t jedec_id;
543
544 /* The size listed here is what works with OPCODE_SE, which isn't
545 * necessarily called a "sector" by the vendor.
546 */
547 unsigned nr_pages;
548 uint16_t pagesize;
549 uint16_t pageoffset;
550
551 uint16_t flags;
552#define SUP_POW2PS 0x02
553#define IS_POW2PS 0x01
554};
555
556static struct flash_info __devinitdata dataflash_data [] = {
557
558 { "at45db011d", 0x1f2200, 512, 264, 9, SUP_POW2PS},
559 { "at45db011d", 0x1f2200, 512, 256, 8, SUP_POW2PS | IS_POW2PS},
560
561 { "at45db021d", 0x1f2300, 1024, 264, 9, SUP_POW2PS},
562 { "at45db021d", 0x1f2300, 1024, 256, 8, SUP_POW2PS | IS_POW2PS},
563
564 { "at45db041d", 0x1f2400, 2048, 264, 9, SUP_POW2PS},
565 { "at45db041d", 0x1f2400, 2048, 256, 8, SUP_POW2PS | IS_POW2PS},
566
567 { "at45db081d", 0x1f2500, 4096, 264, 9, SUP_POW2PS},
568 { "at45db081d", 0x1f2500, 4096, 256, 8, SUP_POW2PS | IS_POW2PS},
569
570 { "at45db161d", 0x1f2600, 4096, 528, 10, SUP_POW2PS},
571 { "at45db161d", 0x1f2600, 4096, 512, 9, SUP_POW2PS | IS_POW2PS},
572
573 { "at45db321c", 0x1f2700, 8192, 528, 10, },
574
575 { "at45db321d", 0x1f2701, 8192, 528, 10, SUP_POW2PS},
576 { "at45db321d", 0x1f2701, 8192, 512, 9, SUP_POW2PS | IS_POW2PS},
577
578 { "at45db641d", 0x1f2800, 8192, 1056, 11, SUP_POW2PS},
579 { "at45db641d", 0x1f2800, 8192, 1024, 10, SUP_POW2PS | IS_POW2PS},
580};
581
582static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
583{
584 int tmp;
585 uint8_t code = OP_READ_ID;
586 uint8_t id[3];
587 uint32_t jedec;
588 struct flash_info *info;
589 int status;
590
591
592 /* JEDEC also defines an optional "extended device information"
593 * string for after vendor-specific data, after the three bytes
594 * we use here. Supporting some chips might require using it.
595 */
596 tmp = spi_write_then_read(spi, &code, 1, id, 3);
597 if (tmp < 0) {
598 DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n",
599 spi->dev.bus_id, tmp);
600 return NULL;
601 }
602 jedec = id[0];
603 jedec = jedec << 8;
604 jedec |= id[1];
605 jedec = jedec << 8;
606 jedec |= id[2];
607
608 for (tmp = 0, info = dataflash_data;
609 tmp < ARRAY_SIZE(dataflash_data);
610 tmp++, info++) {
611 if (info->jedec_id == jedec) {
612 if (info->flags & SUP_POW2PS) {
613 status = dataflash_status(spi);
614 if (status & 0x1)
615 /* return power of 2 pagesize */
616 return ++info;
617 else
618 return info;
619 }
620 }
621 }
622 return NULL;
623}
624
532static int __devinit dataflash_probe(struct spi_device *spi) 625static int __devinit dataflash_probe(struct spi_device *spi)
533{ 626{
534 int status; 627 int status;
628 struct flash_info *info;
629
630 /*
631 * Try to detect dataflash by JEDEC ID.
632 * If it succeeds we know we have either a C or D part.
633 * D will support power of 2 pagesize option.
634 */
635
636 info = jedec_probe(spi);
637
638 if (info != NULL)
639 return add_dataflash(spi, info->name, info->nr_pages,
640 info->pagesize, info->pageoffset);
641
535 642
536 status = dataflash_status(spi); 643 status = dataflash_status(spi);
537 if (status <= 0 || status == 0xff) { 644 if (status <= 0 || status == 0xff) {
@@ -551,16 +658,16 @@ static int __devinit dataflash_probe(struct spi_device *spi)
551 status = add_dataflash(spi, "AT45DB011B", 512, 264, 9); 658 status = add_dataflash(spi, "AT45DB011B", 512, 264, 9);
552 break; 659 break;
553 case 0x14: /* 0 1 0 1 x x */ 660 case 0x14: /* 0 1 0 1 x x */
554 status = add_dataflash(spi, "AT45DB021B", 1025, 264, 9); 661 status = add_dataflash(spi, "AT45DB021B", 1024, 264, 9);
555 break; 662 break;
556 case 0x1c: /* 0 1 1 1 x x */ 663 case 0x1c: /* 0 1 1 1 x x */
557 status = add_dataflash(spi, "AT45DB041x", 2048, 264, 9); 664 status = add_dataflash(spi, "AT45DB041B", 2048, 264, 9);
558 break; 665 break;
559 case 0x24: /* 1 0 0 1 x x */ 666 case 0x24: /* 1 0 0 1 x x */
560 status = add_dataflash(spi, "AT45DB081B", 4096, 264, 9); 667 status = add_dataflash(spi, "AT45DB081B", 4096, 264, 9);
561 break; 668 break;
562 case 0x2c: /* 1 0 1 1 x x */ 669 case 0x2c: /* 1 0 1 1 x x */
563 status = add_dataflash(spi, "AT45DB161x", 4096, 528, 10); 670 status = add_dataflash(spi, "AT45DB161B", 4096, 528, 10);
564 break; 671 break;
565 case 0x34: /* 1 1 0 1 x x */ 672 case 0x34: /* 1 1 0 1 x x */
566 status = add_dataflash(spi, "AT45DB321x", 8192, 528, 10); 673 status = add_dataflash(spi, "AT45DB321x", 8192, 528, 10);
diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c
index 0399be17862..3aaca88847d 100644
--- a/drivers/mtd/devices/mtdram.c
+++ b/drivers/mtd/devices/mtdram.c
@@ -1,6 +1,5 @@
1/* 1/*
2 * mtdram - a test mtd device 2 * mtdram - a test mtd device
3 * $Id: mtdram.c,v 1.37 2005/04/21 03:42:11 joern Exp $
4 * Author: Alexander Larsson <alex@cendio.se> 3 * Author: Alexander Larsson <alex@cendio.se>
5 * 4 *
6 * Copyright (c) 1999 Alexander Larsson <alex@cendio.se> 5 * Copyright (c) 1999 Alexander Larsson <alex@cendio.se>
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index c7987b1c5e0..088fbb7595b 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -1,6 +1,4 @@
1/** 1/**
2 * $Id: phram.c,v 1.16 2005/11/07 11:14:25 gleixner Exp $
3 *
4 * Copyright (c) ???? Jochen Schäuble <psionic@psionic.de> 2 * Copyright (c) ???? Jochen Schäuble <psionic@psionic.de>
5 * Copyright (c) 2003-2004 Joern Engel <joern@wh.fh-wedel.de> 3 * Copyright (c) 2003-2004 Joern Engel <joern@wh.fh-wedel.de>
6 * 4 *
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index bc998174906..d38bca64bb1 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: pmc551.c,v 1.32 2005/11/07 11:14:25 gleixner Exp $
3 *
4 * PMC551 PCI Mezzanine Ram Device 2 * PMC551 PCI Mezzanine Ram Device
5 * 3 *
6 * Author: 4 * Author:
diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c
index cb86db746f2..a425d09f35a 100644
--- a/drivers/mtd/devices/slram.c
+++ b/drivers/mtd/devices/slram.c
@@ -1,7 +1,5 @@
1/*====================================================================== 1/*======================================================================
2 2
3 $Id: slram.c,v 1.36 2005/11/07 11:14:25 gleixner Exp $
4
5 This driver provides a method to access memory not used by the kernel 3 This driver provides a method to access memory not used by the kernel
6 itself (i.e. if the kernel commandline mem=xxx is used). To actually 4 itself (i.e. if the kernel commandline mem=xxx is used). To actually
7 use slram at least mtdblock or mtdchar is required (for block or 5 use slram at least mtdblock or mtdchar is required (for block or
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
index 4a79b187b56..3fed8f94ac6 100644
--- a/drivers/mtd/ftl.c
+++ b/drivers/mtd/ftl.c
@@ -1,5 +1,4 @@
1/* This version ported to the Linux-MTD system by dwmw2@infradead.org 1/* This version ported to the Linux-MTD system by dwmw2@infradead.org
2 * $Id: ftl.c,v 1.59 2005/11/29 14:48:31 gleixner Exp $
3 * 2 *
4 * Fixes: Arnaldo Carvalho de Melo <acme@conectiva.com.br> 3 * Fixes: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
5 * - fixes some leaks on failure in build_maps and ftl_notify_add, cleanups 4 * - fixes some leaks on failure in build_maps and ftl_notify_add, cleanups
@@ -1082,8 +1081,6 @@ static struct mtd_blktrans_ops ftl_tr = {
1082 1081
1083static int init_ftl(void) 1082static int init_ftl(void)
1084{ 1083{
1085 DEBUG(0, "$Id: ftl.c,v 1.59 2005/11/29 14:48:31 gleixner Exp $\n");
1086
1087 return register_mtd_blktrans(&ftl_tr); 1084 return register_mtd_blktrans(&ftl_tr);
1088} 1085}
1089 1086
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
index b0e396504e6..c4f9d3378b2 100644
--- a/drivers/mtd/inftlcore.c
+++ b/drivers/mtd/inftlcore.c
@@ -7,8 +7,6 @@
7 * (c) 1999 Machine Vision Holdings, Inc. 7 * (c) 1999 Machine Vision Holdings, Inc.
8 * Author: David Woodhouse <dwmw2@infradead.org> 8 * Author: David Woodhouse <dwmw2@infradead.org>
9 * 9 *
10 * $Id: inftlcore.c,v 1.19 2005/11/07 11:14:20 gleixner Exp $
11 *
12 * 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
13 * 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
14 * the Free Software Foundation; either version 2 of the License, or 12 * the Free Software Foundation; either version 2 of the License, or
@@ -953,9 +951,6 @@ static struct mtd_blktrans_ops inftl_tr = {
953 951
954static int __init init_inftl(void) 952static int __init init_inftl(void)
955{ 953{
956 printk(KERN_INFO "INFTL: inftlcore.c $Revision: 1.19 $, "
957 "inftlmount.c %s\n", inftlmountrev);
958
959 return register_mtd_blktrans(&inftl_tr); 954 return register_mtd_blktrans(&inftl_tr);
960} 955}
961 956
diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c
index c551d2f0779..9113628ed1e 100644
--- a/drivers/mtd/inftlmount.c
+++ b/drivers/mtd/inftlmount.c
@@ -8,8 +8,6 @@
8 * Author: Fabrice Bellard (fabrice.bellard@netgem.com) 8 * Author: Fabrice Bellard (fabrice.bellard@netgem.com)
9 * Copyright (C) 2000 Netgem S.A. 9 * Copyright (C) 2000 Netgem S.A.
10 * 10 *
11 * $Id: inftlmount.c,v 1.18 2005/11/07 11:14:20 gleixner Exp $
12 *
13 * 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
14 * 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
15 * the Free Software Foundation; either version 2 of the License, or 13 * the Free Software Foundation; either version 2 of the License, or
@@ -39,8 +37,6 @@
39#include <linux/mtd/inftl.h> 37#include <linux/mtd/inftl.h>
40#include <linux/mtd/compatmac.h> 38#include <linux/mtd/compatmac.h>
41 39
42char inftlmountrev[]="$Revision: 1.18 $";
43
44/* 40/*
45 * find_boot_record: Find the INFTL Media Header and its Spare copy which 41 * find_boot_record: Find the INFTL Media Header and its Spare copy which
46 * contains the various device information of the INFTL partition and 42 * contains the various device information of the INFTL partition and
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 17bc87a43ff..d2d339a7598 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
4menu "Mapping drivers for chip access" 3menu "Mapping drivers for chip access"
5 depends on MTD!=n 4 depends on MTD!=n
@@ -517,6 +516,17 @@ config MTD_PCMCIA_ANONYMOUS
517 516
518 If unsure, say N. 517 If unsure, say N.
519 518
519config MTD_BFIN_ASYNC
520 tristate "Blackfin BF533-STAMP Flash Chip Support"
521 depends on BFIN533_STAMP && MTD_CFI
522 select MTD_PARTITIONS
523 default y
524 help
525 Map driver which allows for simultaneous utilization of
526 ethernet and CFI parallel flash.
527
528 If compiled as a module, it will be called bfin-async-flash.
529
520config MTD_UCLINUX 530config MTD_UCLINUX
521 tristate "Generic uClinux RAM/ROM filesystem support" 531 tristate "Generic uClinux RAM/ROM filesystem support"
522 depends on MTD_PARTITIONS && !MMU 532 depends on MTD_PARTITIONS && !MMU
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index 957fb5f70f5..f3b0c595166 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
6ifeq ($(CONFIG_MTD_COMPLEX_MAPPINGS),y) 5ifeq ($(CONFIG_MTD_COMPLEX_MAPPINGS),y)
7obj-$(CONFIG_MTD) += map_funcs.o 6obj-$(CONFIG_MTD) += map_funcs.o
@@ -67,3 +66,4 @@ obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o
67obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o 66obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o
68obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o 67obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o
69obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o 68obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o
69obj-$(CONFIG_MTD_BFIN_ASYNC) += bfin-async-flash.o
diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c
index 728aed6ad72..948b86f35ef 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 7ed3424dd95..cf32267263d 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
index 1f492062f8c..ca541488034 100644
--- a/drivers/mtd/maps/bast-flash.c
+++ b/drivers/mtd/maps/bast-flash.c
@@ -9,8 +9,6 @@
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.5 2005/11/07 11:14:26 gleixner Exp $
13 *
14 * This program is free software; you can redistribute it and/or modify 12 * 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 13 * 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 14 * the Free Software Foundation; either version 2 of the License, or
diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c
new file mode 100644
index 00000000000..6fec86aaed7
--- /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
36struct 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
45static 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
58static 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
69static 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
85static 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
96static 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
111static 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
124static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
125#endif
126
127static 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
186static 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
198static 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
206static int __init bfin_flash_init(void)
207{
208 return platform_driver_register(&bfin_flash_driver);
209}
210module_init(bfin_flash_init);
211
212static void __exit bfin_flash_exit(void)
213{
214 platform_driver_unregister(&bfin_flash_driver);
215}
216module_exit(bfin_flash_exit);
217
218MODULE_LICENSE("GPL");
219MODULE_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 9f17bb6c5a9..cb507da0a87 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 629e6e2641a..6464d487eb1 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 65e5ee55201..0ecc3f6d735 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 92a9c7fac99..e115667bf1d 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 b32bb9347d7..3aa018c092f 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 1c3b34ad732..0713e3a5a22 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 e0558b0b2fe..d171674eb2e 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 1488bb92f26..d92b7c70d3e 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 1c5b97c8968..9433738c166 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 7c50c271651..a8e3fde4cbd 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 6dde3182d64..ef891547446 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 2c884c49e84..aeb6c916e23 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 a0b4dc7155d..2682ab51a36 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 325c8880c43..ee361aaadb1 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 f27c132794c..a806119797e 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 c8396b8574c..c2264792a20 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 01f19a4714b..9c7a5fbd4e5 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 67620adf481..9e054503c4c 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 9105e6ca0aa..3f268370eec 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 06b11872784..706f67394b0 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/mtx-1_flash.c b/drivers/mtd/maps/mtx-1_flash.c
index 2a8fde9b92f..a3b65190412 100644
--- a/drivers/mtd/maps/mtx-1_flash.c
+++ b/drivers/mtd/maps/mtx-1_flash.c
@@ -1,8 +1,6 @@
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.2 2005/11/07 11:14:27 gleixner Exp $
5 *
6 * (C) 2005 Bruno Randolf <bruno.randolf@4g-systems.biz> 4 * (C) 2005 Bruno Randolf <bruno.randolf@4g-systems.biz>
7 * (C) 2005 Joern Engel <joern@wohnheim.fh-wedel.de> 5 * (C) 2005 Joern Engel <joern@wohnheim.fh-wedel.de>
8 * 6 *
diff --git a/drivers/mtd/maps/netsc520.c b/drivers/mtd/maps/netsc520.c
index 95dcab2146a..c0cb319b2b7 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 0c9b305a72e..965e6c6d6ab 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 a6642db3d32..43e04c1d22a 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 e6e391efbeb..0a60ebbc217 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 d2ab1bae9c3..5c6a25c9038 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 1912d968718..8f7ca863f89 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
@@ -790,7 +787,7 @@ static struct pcmcia_driver pcmciamtd_driver = {
790 787
791static int __init init_pcmciamtd(void) 788static int __init init_pcmciamtd(void)
792{ 789{
793 info(DRIVER_DESC " " DRIVER_VERSION); 790 info(DRIVER_DESC);
794 791
795 if(bankwidth && bankwidth != 1 && bankwidth != 2) { 792 if(bankwidth && bankwidth != 1 && bankwidth != 2) {
796 info("bad bankwidth (%d), using default", bankwidth); 793 info("bad bankwidth (%d), using default", bankwidth);
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 183255fcfdc..1f6b9066b63 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.
diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c
index 3eb2643b232..e7dd9c8a965 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 4d858b3d5f8..de002eb1a7f 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 809a0c8e7aa..14d90edb443 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 c7d5a52a2d5..e177a43dfff 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 b8c1331b7a0..6e1e99cd2b5 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 7cc4041d096..1b1c0b7e11e 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
22The SBC-MediaGX / SBC-GXx has up to 16 MiB of 20The SBC-MediaGX / SBC-GXx has up to 16 MiB of
23Intel StrataFlash (28F320/28F640) in x8 mode. 21Intel StrataFlash (28F320/28F640) in x8 mode.
24 22
diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c
index 4045e372b90..85c1e56309e 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 0fc5584324e..21169e6d646 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 5e2bce22f37..b5391ebb736 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 917dc778f24..026eab02818 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 d76ceef453c..0eb41d9c678 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 001af7f7ddd..0d7c88396c8 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 52173405731..a5d3d8531fa 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 b47270e850b..e2147bf11c8 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 0f915ac3102..77a8bfc0257 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 c42f4b83f68..bac000a8831 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 b3e48739543..5a0c9a353b0 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 ca932122fb6..e243476c817 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 ac5b8105b6e..413b0cf9bbd 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.
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 839eed8430a..9ff007c4962 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: mtd_blkdevs.c,v 1.27 2005/11/07 11:14:20 gleixner Exp $
3 *
4 * (C) 2003 David Woodhouse <dwmw2@infradead.org> 2 * (C) 2003 David Woodhouse <dwmw2@infradead.org>
5 * 3 *
6 * Interface to Linux 2.5 block layer for MTD 'translation layers'. 4 * Interface to Linux 2.5 block layer for MTD 'translation layers'.
@@ -212,7 +210,7 @@ static struct block_device_operations mtd_blktrans_ops = {
212int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) 210int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
213{ 211{
214 struct mtd_blktrans_ops *tr = new->tr; 212 struct mtd_blktrans_ops *tr = new->tr;
215 struct list_head *this; 213 struct mtd_blktrans_dev *d;
216 int last_devnum = -1; 214 int last_devnum = -1;
217 struct gendisk *gd; 215 struct gendisk *gd;
218 216
@@ -221,8 +219,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
221 BUG(); 219 BUG();
222 } 220 }
223 221
224 list_for_each(this, &tr->devs) { 222 list_for_each_entry(d, &tr->devs, list) {
225 struct mtd_blktrans_dev *d = list_entry(this, struct mtd_blktrans_dev, list);
226 if (new->devnum == -1) { 223 if (new->devnum == -1) {
227 /* Use first free number */ 224 /* Use first free number */
228 if (d->devnum != last_devnum+1) { 225 if (d->devnum != last_devnum+1) {
@@ -309,33 +306,24 @@ int del_mtd_blktrans_dev(struct mtd_blktrans_dev *old)
309 306
310static void blktrans_notify_remove(struct mtd_info *mtd) 307static void blktrans_notify_remove(struct mtd_info *mtd)
311{ 308{
312 struct list_head *this, *this2, *next; 309 struct mtd_blktrans_ops *tr;
313 310 struct mtd_blktrans_dev *dev, *next;
314 list_for_each(this, &blktrans_majors) {
315 struct mtd_blktrans_ops *tr = list_entry(this, struct mtd_blktrans_ops, list);
316
317 list_for_each_safe(this2, next, &tr->devs) {
318 struct mtd_blktrans_dev *dev = list_entry(this2, struct mtd_blktrans_dev, list);
319 311
312 list_for_each_entry(tr, &blktrans_majors, list)
313 list_for_each_entry_safe(dev, next, &tr->devs, list)
320 if (dev->mtd == mtd) 314 if (dev->mtd == mtd)
321 tr->remove_dev(dev); 315 tr->remove_dev(dev);
322 }
323 }
324} 316}
325 317
326static void blktrans_notify_add(struct mtd_info *mtd) 318static void blktrans_notify_add(struct mtd_info *mtd)
327{ 319{
328 struct list_head *this; 320 struct mtd_blktrans_ops *tr;
329 321
330 if (mtd->type == MTD_ABSENT) 322 if (mtd->type == MTD_ABSENT)
331 return; 323 return;
332 324
333 list_for_each(this, &blktrans_majors) { 325 list_for_each_entry(tr, &blktrans_majors, list)
334 struct mtd_blktrans_ops *tr = list_entry(this, struct mtd_blktrans_ops, list);
335
336 tr->add_mtd(tr, mtd); 326 tr->add_mtd(tr, mtd);
337 }
338
339} 327}
340 328
341static struct mtd_notifier blktrans_notifier = { 329static struct mtd_notifier blktrans_notifier = {
@@ -406,7 +394,7 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
406 394
407int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr) 395int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr)
408{ 396{
409 struct list_head *this, *next; 397 struct mtd_blktrans_dev *dev, *next;
410 398
411 mutex_lock(&mtd_table_mutex); 399 mutex_lock(&mtd_table_mutex);
412 400
@@ -416,10 +404,8 @@ int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr)
416 /* Remove it from the list of active majors */ 404 /* Remove it from the list of active majors */
417 list_del(&tr->list); 405 list_del(&tr->list);
418 406
419 list_for_each_safe(this, next, &tr->devs) { 407 list_for_each_entry_safe(dev, next, &tr->devs, list)
420 struct mtd_blktrans_dev *dev = list_entry(this, struct mtd_blktrans_dev, list);
421 tr->remove_dev(dev); 408 tr->remove_dev(dev);
422 }
423 409
424 blk_cleanup_queue(tr->blkcore_priv->rq); 410 blk_cleanup_queue(tr->blkcore_priv->rq);
425 unregister_blkdev(tr->major, tr->name); 411 unregister_blkdev(tr->major, tr->name);
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
index 952da30b174..208c6faa035 100644
--- a/drivers/mtd/mtdblock.c
+++ b/drivers/mtd/mtdblock.c
@@ -1,8 +1,6 @@
1/* 1/*
2 * Direct MTD block device access 2 * Direct MTD block device access
3 * 3 *
4 * $Id: mtdblock.c,v 1.68 2005/11/07 11:14:20 gleixner Exp $
5 *
6 * (C) 2000-2003 Nicolas Pitre <nico@cam.org> 4 * (C) 2000-2003 Nicolas Pitre <nico@cam.org>
7 * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> 5 * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>
8 */ 6 */
diff --git a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c
index f79dbb49b1a..852165f8b1c 100644
--- a/drivers/mtd/mtdblock_ro.c
+++ b/drivers/mtd/mtdblock_ro.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: mtdblock_ro.c,v 1.19 2004/11/16 18:28:59 dwmw2 Exp $
3 *
4 * (C) 2003 David Woodhouse <dwmw2@infradead.org> 2 * (C) 2003 David Woodhouse <dwmw2@infradead.org>
5 * 3 *
6 * Simple read-only (writable only for RAM) mtdblock driver 4 * Simple read-only (writable only for RAM) mtdblock driver
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 5d3ac512ce1..4b3156f9b36 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: mtdchar.c,v 1.76 2005/11/07 11:14:20 gleixner Exp $
3 *
4 * Character-device access to raw MTD devices. 2 * Character-device access to raw MTD devices.
5 * 3 *
6 */ 4 */
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index d563dcd4b26..2972a5edb73 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -6,8 +6,6 @@
6 * NAND support by Christian Gan <cgan@iders.ca> 6 * NAND support by Christian Gan <cgan@iders.ca>
7 * 7 *
8 * This code is GPL 8 * This code is GPL
9 *
10 * $Id: mtdconcat.c,v 1.11 2005/11/07 11:14:20 gleixner Exp $
11 */ 9 */
12 10
13#include <linux/kernel.h> 11#include <linux/kernel.h>
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index f7e7890e5bc..a9d24694982 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: mtdcore.c,v 1.47 2005/11/07 11:14:20 gleixner Exp $
3 *
4 * Core registration and callback routines for MTD 2 * Core registration and callback routines for MTD
5 * drivers and users. 3 * drivers and users.
6 * 4 *
@@ -53,7 +51,7 @@ int add_mtd_device(struct mtd_info *mtd)
53 51
54 for (i=0; i < MAX_MTD_DEVICES; i++) 52 for (i=0; i < MAX_MTD_DEVICES; i++)
55 if (!mtd_table[i]) { 53 if (!mtd_table[i]) {
56 struct list_head *this; 54 struct mtd_notifier *not;
57 55
58 mtd_table[i] = mtd; 56 mtd_table[i] = mtd;
59 mtd->index = i; 57 mtd->index = i;
@@ -72,10 +70,8 @@ int add_mtd_device(struct mtd_info *mtd)
72 DEBUG(0, "mtd: Giving out device %d to %s\n",i, mtd->name); 70 DEBUG(0, "mtd: Giving out device %d to %s\n",i, mtd->name);
73 /* No need to get a refcount on the module containing 71 /* No need to get a refcount on the module containing
74 the notifier, since we hold the mtd_table_mutex */ 72 the notifier, since we hold the mtd_table_mutex */
75 list_for_each(this, &mtd_notifiers) { 73 list_for_each_entry(not, &mtd_notifiers, list)
76 struct mtd_notifier *not = list_entry(this, struct mtd_notifier, list);
77 not->add(mtd); 74 not->add(mtd);
78 }
79 75
80 mutex_unlock(&mtd_table_mutex); 76 mutex_unlock(&mtd_table_mutex);
81 /* We _know_ we aren't being removed, because 77 /* We _know_ we aren't being removed, because
@@ -113,14 +109,12 @@ int del_mtd_device (struct mtd_info *mtd)
113 mtd->index, mtd->name, mtd->usecount); 109 mtd->index, mtd->name, mtd->usecount);
114 ret = -EBUSY; 110 ret = -EBUSY;
115 } else { 111 } else {
116 struct list_head *this; 112 struct mtd_notifier *not;
117 113
118 /* No need to get a refcount on the module containing 114 /* No need to get a refcount on the module containing
119 the notifier, since we hold the mtd_table_mutex */ 115 the notifier, since we hold the mtd_table_mutex */
120 list_for_each(this, &mtd_notifiers) { 116 list_for_each_entry(not, &mtd_notifiers, list)
121 struct mtd_notifier *not = list_entry(this, struct mtd_notifier, list);
122 not->remove(mtd); 117 not->remove(mtd);
123 }
124 118
125 mtd_table[mtd->index] = NULL; 119 mtd_table[mtd->index] = NULL;
126 120
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 07c70116934..56a760a736a 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -5,8 +5,6 @@
5 * 5 *
6 * This code is GPL 6 * This code is GPL
7 * 7 *
8 * $Id: mtdpart.c,v 1.55 2005/11/07 11:14:20 gleixner Exp $
9 *
10 * 02-21-2002 Thomas Gleixner <gleixner@autronix.de> 8 * 02-21-2002 Thomas Gleixner <gleixner@autronix.de>
11 * added support for read_oob, write_oob 9 * added support for read_oob, write_oob
12 */ 10 */
@@ -302,22 +300,15 @@ static int part_block_markbad (struct mtd_info *mtd, loff_t ofs)
302 300
303int del_mtd_partitions(struct mtd_info *master) 301int del_mtd_partitions(struct mtd_info *master)
304{ 302{
305 struct list_head *node; 303 struct mtd_part *slave, *next;
306 struct mtd_part *slave;
307 304
308 for (node = mtd_partitions.next; 305 list_for_each_entry_safe(slave, next, &mtd_partitions, list)
309 node != &mtd_partitions;
310 node = node->next) {
311 slave = list_entry(node, struct mtd_part, list);
312 if (slave->master == master) { 306 if (slave->master == master) {
313 struct list_head *prev = node->prev; 307 list_del(&slave->list);
314 __list_del(prev, node->next);
315 if(slave->registered) 308 if(slave->registered)
316 del_mtd_device(&slave->mtd); 309 del_mtd_device(&slave->mtd);
317 kfree(slave); 310 kfree(slave);
318 node = prev;
319 } 311 }
320 }
321 312
322 return 0; 313 return 0;
323} 314}
@@ -513,18 +504,16 @@ static LIST_HEAD(part_parsers);
513 504
514static struct mtd_part_parser *get_partition_parser(const char *name) 505static struct mtd_part_parser *get_partition_parser(const char *name)
515{ 506{
516 struct list_head *this; 507 struct mtd_part_parser *p, *ret = NULL;
517 void *ret = NULL;
518 spin_lock(&part_parser_lock);
519 508
520 list_for_each(this, &part_parsers) { 509 spin_lock(&part_parser_lock);
521 struct mtd_part_parser *p = list_entry(this, struct mtd_part_parser, list);
522 510
511 list_for_each_entry(p, &part_parsers, list)
523 if (!strcmp(p->name, name) && try_module_get(p->owner)) { 512 if (!strcmp(p->name, name) && try_module_get(p->owner)) {
524 ret = p; 513 ret = p;
525 break; 514 break;
526 } 515 }
527 } 516
528 spin_unlock(&part_parser_lock); 517 spin_unlock(&part_parser_lock);
529 518
530 return ret; 519 return ret;
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 5076faf9ca6..d8c0d8698b4 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -1,5 +1,4 @@
1# drivers/mtd/nand/Kconfig 1# drivers/mtd/nand/Kconfig
2# $Id: Kconfig,v 1.35 2005/11/07 11:14:30 gleixner Exp $
3 2
4menuconfig MTD_NAND 3menuconfig MTD_NAND
5 tristate "NAND Device Support" 4 tristate "NAND Device Support"
@@ -272,22 +271,23 @@ config MTD_NAND_CS553X
272 271
273 If you say "m", the module will be called "cs553x_nand.ko". 272 If you say "m", the module will be called "cs553x_nand.ko".
274 273
275config MTD_NAND_AT91 274config MTD_NAND_ATMEL
276 bool "Support for NAND Flash / SmartMedia on AT91" 275 bool "Support for NAND Flash / SmartMedia on AT91 and AVR32"
277 depends on ARCH_AT91 276 depends on ARCH_AT91 || AVR32
278 help 277 help
279 Enables support for NAND Flash / Smart Media Card interface 278 Enables support for NAND Flash / Smart Media Card interface
280 on Atmel AT91 processors. 279 on Atmel AT91 and AVR32 processors.
281choice 280choice
282 prompt "ECC management for NAND Flash / SmartMedia on AT91" 281 prompt "ECC management for NAND Flash / SmartMedia on AT91 / AVR32"
283 depends on MTD_NAND_AT91 282 depends on MTD_NAND_ATMEL
284 283
285config MTD_NAND_AT91_ECC_HW 284config MTD_NAND_ATMEL_ECC_HW
286 bool "Hardware ECC" 285 bool "Hardware ECC"
287 depends on ARCH_AT91SAM9263 || ARCH_AT91SAM9260 286 depends on ARCH_AT91SAM9263 || ARCH_AT91SAM9260 || AVR32
288 help 287 help
289 Uses hardware ECC provided by the at91sam9260/at91sam9263 chip 288 Use hardware ECC instead of software ECC when the chip
290 instead of software ECC. 289 supports it.
290
291 The hardware ECC controller is capable of single bit error 291 The hardware ECC controller is capable of single bit error
292 correction and 2-bit random detection per page. 292 correction and 2-bit random detection per page.
293 293
@@ -297,16 +297,16 @@ config MTD_NAND_AT91_ECC_HW
297 297
298 If unsure, say Y 298 If unsure, say Y
299 299
300config MTD_NAND_AT91_ECC_SOFT 300config MTD_NAND_ATMEL_ECC_SOFT
301 bool "Software ECC" 301 bool "Software ECC"
302 help 302 help
303 Uses software ECC. 303 Use software ECC.
304 304
305 NB : hardware and software ECC schemes are incompatible. 305 NB : hardware and software ECC schemes are incompatible.
306 If you switch from one to another, you'll have to erase your 306 If you switch from one to another, you'll have to erase your
307 mtd partition. 307 mtd partition.
308 308
309config MTD_NAND_AT91_ECC_NONE 309config MTD_NAND_ATMEL_ECC_NONE
310 bool "No ECC (testing only, DANGEROUS)" 310 bool "No ECC (testing only, DANGEROUS)"
311 depends on DEBUG_KERNEL 311 depends on DEBUG_KERNEL
312 help 312 help
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index a6e74a46992..d772581de57 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -1,7 +1,6 @@
1# 1#
2# linux/drivers/nand/Makefile 2# linux/drivers/nand/Makefile
3# 3#
4# $Id: Makefile.common,v 1.15 2004/11/26 12:28:22 dedekind Exp $
5 4
6obj-$(CONFIG_MTD_NAND) += nand.o nand_ecc.o 5obj-$(CONFIG_MTD_NAND) += nand.o nand_ecc.o
7obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o 6obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o
@@ -24,7 +23,7 @@ obj-$(CONFIG_MTD_NAND_TS7250) += ts7250.o
24obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o 23obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o
25obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o 24obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o
26obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o 25obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
27obj-$(CONFIG_MTD_NAND_AT91) += at91_nand.o 26obj-$(CONFIG_MTD_NAND_ATMEL) += atmel_nand.o
28obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o 27obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o
29obj-$(CONFIG_MTD_NAND_BASLER_EXCITE) += excite_nandflash.o 28obj-$(CONFIG_MTD_NAND_BASLER_EXCITE) += excite_nandflash.o
30obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o 29obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o
diff --git a/drivers/mtd/nand/at91_nand.c b/drivers/mtd/nand/atmel_nand.c
index 0adb287027a..50700ab5a57 100644
--- a/drivers/mtd/nand/at91_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * drivers/mtd/nand/at91_nand.c
3 *
4 * Copyright (C) 2003 Rick Bronson 2 * Copyright (C) 2003 Rick Bronson
5 * 3 *
6 * Derived from drivers/mtd/nand/autcpu12.c 4 * Derived from drivers/mtd/nand/autcpu12.c
@@ -31,20 +29,18 @@
31#include <linux/mtd/nand.h> 29#include <linux/mtd/nand.h>
32#include <linux/mtd/partitions.h> 30#include <linux/mtd/partitions.h>
33 31
34#include <asm/io.h> 32#include <linux/gpio.h>
35#include <asm/sizes.h> 33#include <linux/io.h>
36 34
37#include <asm/hardware.h>
38#include <asm/arch/board.h> 35#include <asm/arch/board.h>
39#include <asm/arch/gpio.h>
40 36
41#ifdef CONFIG_MTD_NAND_AT91_ECC_HW 37#ifdef CONFIG_MTD_NAND_ATMEL_ECC_HW
42#define hard_ecc 1 38#define hard_ecc 1
43#else 39#else
44#define hard_ecc 0 40#define hard_ecc 0
45#endif 41#endif
46 42
47#ifdef CONFIG_MTD_NAND_AT91_ECC_NONE 43#ifdef CONFIG_MTD_NAND_ATMEL_ECC_NONE
48#define no_ecc 1 44#define no_ecc 1
49#else 45#else
50#define no_ecc 0 46#define no_ecc 0
@@ -52,18 +48,18 @@
52 48
53/* Register access macros */ 49/* Register access macros */
54#define ecc_readl(add, reg) \ 50#define ecc_readl(add, reg) \
55 __raw_readl(add + AT91_ECC_##reg) 51 __raw_readl(add + ATMEL_ECC_##reg)
56#define ecc_writel(add, reg, value) \ 52#define ecc_writel(add, reg, value) \
57 __raw_writel((value), add + AT91_ECC_##reg) 53 __raw_writel((value), add + ATMEL_ECC_##reg)
58 54
59#include <asm/arch/at91_ecc.h> /* AT91SAM9260/3 ECC registers */ 55#include "atmel_nand_ecc.h" /* Hardware ECC registers */
60 56
61/* oob layout for large page size 57/* oob layout for large page size
62 * bad block info is on bytes 0 and 1 58 * bad block info is on bytes 0 and 1
63 * the bytes have to be consecutives to avoid 59 * the bytes have to be consecutives to avoid
64 * several NAND_CMD_RNDOUT during read 60 * several NAND_CMD_RNDOUT during read
65 */ 61 */
66static struct nand_ecclayout at91_oobinfo_large = { 62static struct nand_ecclayout atmel_oobinfo_large = {
67 .eccbytes = 4, 63 .eccbytes = 4,
68 .eccpos = {60, 61, 62, 63}, 64 .eccpos = {60, 61, 62, 63},
69 .oobfree = { 65 .oobfree = {
@@ -76,7 +72,7 @@ static struct nand_ecclayout at91_oobinfo_large = {
76 * the bytes have to be consecutives to avoid 72 * the bytes have to be consecutives to avoid
77 * several NAND_CMD_RNDOUT during read 73 * several NAND_CMD_RNDOUT during read
78 */ 74 */
79static struct nand_ecclayout at91_oobinfo_small = { 75static struct nand_ecclayout atmel_oobinfo_small = {
80 .eccbytes = 4, 76 .eccbytes = 4,
81 .eccpos = {0, 1, 2, 3}, 77 .eccpos = {0, 1, 2, 3},
82 .oobfree = { 78 .oobfree = {
@@ -84,11 +80,11 @@ static struct nand_ecclayout at91_oobinfo_small = {
84 }, 80 },
85}; 81};
86 82
87struct at91_nand_host { 83struct atmel_nand_host {
88 struct nand_chip nand_chip; 84 struct nand_chip nand_chip;
89 struct mtd_info mtd; 85 struct mtd_info mtd;
90 void __iomem *io_base; 86 void __iomem *io_base;
91 struct at91_nand_data *board; 87 struct atmel_nand_data *board;
92 struct device *dev; 88 struct device *dev;
93 void __iomem *ecc; 89 void __iomem *ecc;
94}; 90};
@@ -96,34 +92,34 @@ struct at91_nand_host {
96/* 92/*
97 * Enable NAND. 93 * Enable NAND.
98 */ 94 */
99static void at91_nand_enable(struct at91_nand_host *host) 95static void atmel_nand_enable(struct atmel_nand_host *host)
100{ 96{
101 if (host->board->enable_pin) 97 if (host->board->enable_pin)
102 at91_set_gpio_value(host->board->enable_pin, 0); 98 gpio_set_value(host->board->enable_pin, 0);
103} 99}
104 100
105/* 101/*
106 * Disable NAND. 102 * Disable NAND.
107 */ 103 */
108static void at91_nand_disable(struct at91_nand_host *host) 104static void atmel_nand_disable(struct atmel_nand_host *host)
109{ 105{
110 if (host->board->enable_pin) 106 if (host->board->enable_pin)
111 at91_set_gpio_value(host->board->enable_pin, 1); 107 gpio_set_value(host->board->enable_pin, 1);
112} 108}
113 109
114/* 110/*
115 * Hardware specific access to control-lines 111 * Hardware specific access to control-lines
116 */ 112 */
117static void at91_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) 113static void atmel_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
118{ 114{
119 struct nand_chip *nand_chip = mtd->priv; 115 struct nand_chip *nand_chip = mtd->priv;
120 struct at91_nand_host *host = nand_chip->priv; 116 struct atmel_nand_host *host = nand_chip->priv;
121 117
122 if (ctrl & NAND_CTRL_CHANGE) { 118 if (ctrl & NAND_CTRL_CHANGE) {
123 if (ctrl & NAND_NCE) 119 if (ctrl & NAND_NCE)
124 at91_nand_enable(host); 120 atmel_nand_enable(host);
125 else 121 else
126 at91_nand_disable(host); 122 atmel_nand_disable(host);
127 } 123 }
128 if (cmd == NAND_CMD_NONE) 124 if (cmd == NAND_CMD_NONE)
129 return; 125 return;
@@ -137,18 +133,18 @@ static void at91_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
137/* 133/*
138 * Read the Device Ready pin. 134 * Read the Device Ready pin.
139 */ 135 */
140static int at91_nand_device_ready(struct mtd_info *mtd) 136static int atmel_nand_device_ready(struct mtd_info *mtd)
141{ 137{
142 struct nand_chip *nand_chip = mtd->priv; 138 struct nand_chip *nand_chip = mtd->priv;
143 struct at91_nand_host *host = nand_chip->priv; 139 struct atmel_nand_host *host = nand_chip->priv;
144 140
145 return at91_get_gpio_value(host->board->rdy_pin); 141 return gpio_get_value(host->board->rdy_pin);
146} 142}
147 143
148/* 144/*
149 * write oob for small pages 145 * write oob for small pages
150 */ 146 */
151static int at91_nand_write_oob_512(struct mtd_info *mtd, 147static int atmel_nand_write_oob_512(struct mtd_info *mtd,
152 struct nand_chip *chip, int page) 148 struct nand_chip *chip, int page)
153{ 149{
154 int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; 150 int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad;
@@ -176,7 +172,7 @@ static int at91_nand_write_oob_512(struct mtd_info *mtd,
176/* 172/*
177 * read oob for small pages 173 * read oob for small pages
178 */ 174 */
179static int at91_nand_read_oob_512(struct mtd_info *mtd, 175static int atmel_nand_read_oob_512(struct mtd_info *mtd,
180 struct nand_chip *chip, int page, int sndcmd) 176 struct nand_chip *chip, int page, int sndcmd)
181{ 177{
182 if (sndcmd) { 178 if (sndcmd) {
@@ -196,11 +192,11 @@ static int at91_nand_read_oob_512(struct mtd_info *mtd,
196 * dat: raw data (unused) 192 * dat: raw data (unused)
197 * ecc_code: buffer for ECC 193 * ecc_code: buffer for ECC
198 */ 194 */
199static int at91_nand_calculate(struct mtd_info *mtd, 195static int atmel_nand_calculate(struct mtd_info *mtd,
200 const u_char *dat, unsigned char *ecc_code) 196 const u_char *dat, unsigned char *ecc_code)
201{ 197{
202 struct nand_chip *nand_chip = mtd->priv; 198 struct nand_chip *nand_chip = mtd->priv;
203 struct at91_nand_host *host = nand_chip->priv; 199 struct atmel_nand_host *host = nand_chip->priv;
204 uint32_t *eccpos = nand_chip->ecc.layout->eccpos; 200 uint32_t *eccpos = nand_chip->ecc.layout->eccpos;
205 unsigned int ecc_value; 201 unsigned int ecc_value;
206 202
@@ -211,7 +207,7 @@ static int at91_nand_calculate(struct mtd_info *mtd,
211 ecc_code[eccpos[1]] = (ecc_value >> 8) & 0xFF; 207 ecc_code[eccpos[1]] = (ecc_value >> 8) & 0xFF;
212 208
213 /* get the last 2 ECC bytes */ 209 /* get the last 2 ECC bytes */
214 ecc_value = ecc_readl(host->ecc, NPR) & AT91_ECC_NPARITY; 210 ecc_value = ecc_readl(host->ecc, NPR) & ATMEL_ECC_NPARITY;
215 211
216 ecc_code[eccpos[2]] = ecc_value & 0xFF; 212 ecc_code[eccpos[2]] = ecc_value & 0xFF;
217 ecc_code[eccpos[3]] = (ecc_value >> 8) & 0xFF; 213 ecc_code[eccpos[3]] = (ecc_value >> 8) & 0xFF;
@@ -226,7 +222,7 @@ static int at91_nand_calculate(struct mtd_info *mtd,
226 * chip: nand chip info structure 222 * chip: nand chip info structure
227 * buf: buffer to store read data 223 * buf: buffer to store read data
228 */ 224 */
229static int at91_nand_read_page(struct mtd_info *mtd, 225static int atmel_nand_read_page(struct mtd_info *mtd,
230 struct nand_chip *chip, uint8_t *buf) 226 struct nand_chip *chip, uint8_t *buf)
231{ 227{
232 int eccsize = chip->ecc.size; 228 int eccsize = chip->ecc.size;
@@ -285,11 +281,11 @@ static int at91_nand_read_page(struct mtd_info *mtd,
285 * 281 *
286 * Detect and correct a 1 bit error for a page 282 * Detect and correct a 1 bit error for a page
287 */ 283 */
288static int at91_nand_correct(struct mtd_info *mtd, u_char *dat, 284static int atmel_nand_correct(struct mtd_info *mtd, u_char *dat,
289 u_char *read_ecc, u_char *isnull) 285 u_char *read_ecc, u_char *isnull)
290{ 286{
291 struct nand_chip *nand_chip = mtd->priv; 287 struct nand_chip *nand_chip = mtd->priv;
292 struct at91_nand_host *host = nand_chip->priv; 288 struct atmel_nand_host *host = nand_chip->priv;
293 unsigned int ecc_status; 289 unsigned int ecc_status;
294 unsigned int ecc_word, ecc_bit; 290 unsigned int ecc_word, ecc_bit;
295 291
@@ -297,43 +293,43 @@ static int at91_nand_correct(struct mtd_info *mtd, u_char *dat,
297 ecc_status = ecc_readl(host->ecc, SR); 293 ecc_status = ecc_readl(host->ecc, SR);
298 294
299 /* if there's no error */ 295 /* if there's no error */
300 if (likely(!(ecc_status & AT91_ECC_RECERR))) 296 if (likely(!(ecc_status & ATMEL_ECC_RECERR)))
301 return 0; 297 return 0;
302 298
303 /* get error bit offset (4 bits) */ 299 /* get error bit offset (4 bits) */
304 ecc_bit = ecc_readl(host->ecc, PR) & AT91_ECC_BITADDR; 300 ecc_bit = ecc_readl(host->ecc, PR) & ATMEL_ECC_BITADDR;
305 /* get word address (12 bits) */ 301 /* get word address (12 bits) */
306 ecc_word = ecc_readl(host->ecc, PR) & AT91_ECC_WORDADDR; 302 ecc_word = ecc_readl(host->ecc, PR) & ATMEL_ECC_WORDADDR;
307 ecc_word >>= 4; 303 ecc_word >>= 4;
308 304
309 /* if there are multiple errors */ 305 /* if there are multiple errors */
310 if (ecc_status & AT91_ECC_MULERR) { 306 if (ecc_status & ATMEL_ECC_MULERR) {
311 /* check if it is a freshly erased block 307 /* check if it is a freshly erased block
312 * (filled with 0xff) */ 308 * (filled with 0xff) */
313 if ((ecc_bit == AT91_ECC_BITADDR) 309 if ((ecc_bit == ATMEL_ECC_BITADDR)
314 && (ecc_word == (AT91_ECC_WORDADDR >> 4))) { 310 && (ecc_word == (ATMEL_ECC_WORDADDR >> 4))) {
315 /* the block has just been erased, return OK */ 311 /* the block has just been erased, return OK */
316 return 0; 312 return 0;
317 } 313 }
318 /* it doesn't seems to be a freshly 314 /* it doesn't seems to be a freshly
319 * erased block. 315 * erased block.
320 * We can't correct so many errors */ 316 * We can't correct so many errors */
321 dev_dbg(host->dev, "at91_nand : multiple errors detected." 317 dev_dbg(host->dev, "atmel_nand : multiple errors detected."
322 " Unable to correct.\n"); 318 " Unable to correct.\n");
323 return -EIO; 319 return -EIO;
324 } 320 }
325 321
326 /* if there's a single bit error : we can correct it */ 322 /* if there's a single bit error : we can correct it */
327 if (ecc_status & AT91_ECC_ECCERR) { 323 if (ecc_status & ATMEL_ECC_ECCERR) {
328 /* there's nothing much to do here. 324 /* there's nothing much to do here.
329 * the bit error is on the ECC itself. 325 * the bit error is on the ECC itself.
330 */ 326 */
331 dev_dbg(host->dev, "at91_nand : one bit error on ECC code." 327 dev_dbg(host->dev, "atmel_nand : one bit error on ECC code."
332 " Nothing to correct\n"); 328 " Nothing to correct\n");
333 return 0; 329 return 0;
334 } 330 }
335 331
336 dev_dbg(host->dev, "at91_nand : one bit error on data." 332 dev_dbg(host->dev, "atmel_nand : one bit error on data."
337 " (word offset in the page :" 333 " (word offset in the page :"
338 " 0x%x bit offset : 0x%x)\n", 334 " 0x%x bit offset : 0x%x)\n",
339 ecc_word, ecc_bit); 335 ecc_word, ecc_bit);
@@ -345,14 +341,14 @@ static int at91_nand_correct(struct mtd_info *mtd, u_char *dat,
345 /* 8 bits words */ 341 /* 8 bits words */
346 dat[ecc_word] ^= (1 << ecc_bit); 342 dat[ecc_word] ^= (1 << ecc_bit);
347 } 343 }
348 dev_dbg(host->dev, "at91_nand : error corrected\n"); 344 dev_dbg(host->dev, "atmel_nand : error corrected\n");
349 return 1; 345 return 1;
350} 346}
351 347
352/* 348/*
353 * Enable HW ECC : unsused 349 * Enable HW ECC : unsused
354 */ 350 */
355static void at91_nand_hwctl(struct mtd_info *mtd, int mode) { ; } 351static void atmel_nand_hwctl(struct mtd_info *mtd, int mode) { ; }
356 352
357#ifdef CONFIG_MTD_PARTITIONS 353#ifdef CONFIG_MTD_PARTITIONS
358static const char *part_probes[] = { "cmdlinepart", NULL }; 354static const char *part_probes[] = { "cmdlinepart", NULL };
@@ -361,9 +357,9 @@ static const char *part_probes[] = { "cmdlinepart", NULL };
361/* 357/*
362 * Probe for the NAND device. 358 * Probe for the NAND device.
363 */ 359 */
364static int __init at91_nand_probe(struct platform_device *pdev) 360static int __init atmel_nand_probe(struct platform_device *pdev)
365{ 361{
366 struct at91_nand_host *host; 362 struct atmel_nand_host *host;
367 struct mtd_info *mtd; 363 struct mtd_info *mtd;
368 struct nand_chip *nand_chip; 364 struct nand_chip *nand_chip;
369 struct resource *regs; 365 struct resource *regs;
@@ -375,24 +371,24 @@ static int __init at91_nand_probe(struct platform_device *pdev)
375 int num_partitions = 0; 371 int num_partitions = 0;
376#endif 372#endif
377 373
378 /* Allocate memory for the device structure (and zero it) */
379 host = kzalloc(sizeof(struct at91_nand_host), GFP_KERNEL);
380 if (!host) {
381 printk(KERN_ERR "at91_nand: failed to allocate device structure.\n");
382 return -ENOMEM;
383 }
384
385 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 374 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
386 if (!mem) { 375 if (!mem) {
387 printk(KERN_ERR "at91_nand: can't get I/O resource mem\n"); 376 printk(KERN_ERR "atmel_nand: can't get I/O resource mem\n");
388 return -ENXIO; 377 return -ENXIO;
389 } 378 }
390 379
380 /* Allocate memory for the device structure (and zero it) */
381 host = kzalloc(sizeof(struct atmel_nand_host), GFP_KERNEL);
382 if (!host) {
383 printk(KERN_ERR "atmel_nand: failed to allocate device structure.\n");
384 return -ENOMEM;
385 }
386
391 host->io_base = ioremap(mem->start, mem->end - mem->start + 1); 387 host->io_base = ioremap(mem->start, mem->end - mem->start + 1);
392 if (host->io_base == NULL) { 388 if (host->io_base == NULL) {
393 printk(KERN_ERR "at91_nand: ioremap failed\n"); 389 printk(KERN_ERR "atmel_nand: ioremap failed\n");
394 kfree(host); 390 res = -EIO;
395 return -EIO; 391 goto err_nand_ioremap;
396 } 392 }
397 393
398 mtd = &host->mtd; 394 mtd = &host->mtd;
@@ -407,14 +403,14 @@ static int __init at91_nand_probe(struct platform_device *pdev)
407 /* Set address of NAND IO lines */ 403 /* Set address of NAND IO lines */
408 nand_chip->IO_ADDR_R = host->io_base; 404 nand_chip->IO_ADDR_R = host->io_base;
409 nand_chip->IO_ADDR_W = host->io_base; 405 nand_chip->IO_ADDR_W = host->io_base;
410 nand_chip->cmd_ctrl = at91_nand_cmd_ctrl; 406 nand_chip->cmd_ctrl = atmel_nand_cmd_ctrl;
411 407
412 if (host->board->rdy_pin) 408 if (host->board->rdy_pin)
413 nand_chip->dev_ready = at91_nand_device_ready; 409 nand_chip->dev_ready = atmel_nand_device_ready;
414 410
415 regs = platform_get_resource(pdev, IORESOURCE_MEM, 1); 411 regs = platform_get_resource(pdev, IORESOURCE_MEM, 1);
416 if (!regs && hard_ecc) { 412 if (!regs && hard_ecc) {
417 printk(KERN_ERR "at91_nand: can't get I/O resource " 413 printk(KERN_ERR "atmel_nand: can't get I/O resource "
418 "regs\nFalling back on software ECC\n"); 414 "regs\nFalling back on software ECC\n");
419 } 415 }
420 416
@@ -424,15 +420,15 @@ static int __init at91_nand_probe(struct platform_device *pdev)
424 if (hard_ecc && regs) { 420 if (hard_ecc && regs) {
425 host->ecc = ioremap(regs->start, regs->end - regs->start + 1); 421 host->ecc = ioremap(regs->start, regs->end - regs->start + 1);
426 if (host->ecc == NULL) { 422 if (host->ecc == NULL) {
427 printk(KERN_ERR "at91_nand: ioremap failed\n"); 423 printk(KERN_ERR "atmel_nand: ioremap failed\n");
428 res = -EIO; 424 res = -EIO;
429 goto err_ecc_ioremap; 425 goto err_ecc_ioremap;
430 } 426 }
431 nand_chip->ecc.mode = NAND_ECC_HW_SYNDROME; 427 nand_chip->ecc.mode = NAND_ECC_HW_SYNDROME;
432 nand_chip->ecc.calculate = at91_nand_calculate; 428 nand_chip->ecc.calculate = atmel_nand_calculate;
433 nand_chip->ecc.correct = at91_nand_correct; 429 nand_chip->ecc.correct = atmel_nand_correct;
434 nand_chip->ecc.hwctl = at91_nand_hwctl; 430 nand_chip->ecc.hwctl = atmel_nand_hwctl;
435 nand_chip->ecc.read_page = at91_nand_read_page; 431 nand_chip->ecc.read_page = atmel_nand_read_page;
436 nand_chip->ecc.bytes = 4; 432 nand_chip->ecc.bytes = 4;
437 nand_chip->ecc.prepad = 0; 433 nand_chip->ecc.prepad = 0;
438 nand_chip->ecc.postpad = 0; 434 nand_chip->ecc.postpad = 0;
@@ -444,20 +440,20 @@ static int __init at91_nand_probe(struct platform_device *pdev)
444 nand_chip->options |= NAND_BUSWIDTH_16; 440 nand_chip->options |= NAND_BUSWIDTH_16;
445 441
446 platform_set_drvdata(pdev, host); 442 platform_set_drvdata(pdev, host);
447 at91_nand_enable(host); 443 atmel_nand_enable(host);
448 444
449 if (host->board->det_pin) { 445 if (host->board->det_pin) {
450 if (at91_get_gpio_value(host->board->det_pin)) { 446 if (gpio_get_value(host->board->det_pin)) {
451 printk ("No SmartMedia card inserted.\n"); 447 printk("No SmartMedia card inserted.\n");
452 res = ENXIO; 448 res = ENXIO;
453 goto out; 449 goto err_no_card;
454 } 450 }
455 } 451 }
456 452
457 /* first scan to find the device and get the page size */ 453 /* first scan to find the device and get the page size */
458 if (nand_scan_ident(mtd, 1)) { 454 if (nand_scan_ident(mtd, 1)) {
459 res = -ENXIO; 455 res = -ENXIO;
460 goto out; 456 goto err_scan_ident;
461 } 457 }
462 458
463 if (nand_chip->ecc.mode == NAND_ECC_HW_SYNDROME) { 459 if (nand_chip->ecc.mode == NAND_ECC_HW_SYNDROME) {
@@ -467,22 +463,22 @@ static int __init at91_nand_probe(struct platform_device *pdev)
467 /* set ECC page size and oob layout */ 463 /* set ECC page size and oob layout */
468 switch (mtd->writesize) { 464 switch (mtd->writesize) {
469 case 512: 465 case 512:
470 nand_chip->ecc.layout = &at91_oobinfo_small; 466 nand_chip->ecc.layout = &atmel_oobinfo_small;
471 nand_chip->ecc.read_oob = at91_nand_read_oob_512; 467 nand_chip->ecc.read_oob = atmel_nand_read_oob_512;
472 nand_chip->ecc.write_oob = at91_nand_write_oob_512; 468 nand_chip->ecc.write_oob = atmel_nand_write_oob_512;
473 ecc_writel(host->ecc, MR, AT91_ECC_PAGESIZE_528); 469 ecc_writel(host->ecc, MR, ATMEL_ECC_PAGESIZE_528);
474 break; 470 break;
475 case 1024: 471 case 1024:
476 nand_chip->ecc.layout = &at91_oobinfo_large; 472 nand_chip->ecc.layout = &atmel_oobinfo_large;
477 ecc_writel(host->ecc, MR, AT91_ECC_PAGESIZE_1056); 473 ecc_writel(host->ecc, MR, ATMEL_ECC_PAGESIZE_1056);
478 break; 474 break;
479 case 2048: 475 case 2048:
480 nand_chip->ecc.layout = &at91_oobinfo_large; 476 nand_chip->ecc.layout = &atmel_oobinfo_large;
481 ecc_writel(host->ecc, MR, AT91_ECC_PAGESIZE_2112); 477 ecc_writel(host->ecc, MR, ATMEL_ECC_PAGESIZE_2112);
482 break; 478 break;
483 case 4096: 479 case 4096:
484 nand_chip->ecc.layout = &at91_oobinfo_large; 480 nand_chip->ecc.layout = &atmel_oobinfo_large;
485 ecc_writel(host->ecc, MR, AT91_ECC_PAGESIZE_4224); 481 ecc_writel(host->ecc, MR, ATMEL_ECC_PAGESIZE_4224);
486 break; 482 break;
487 default: 483 default:
488 /* page size not handled by HW ECC */ 484 /* page size not handled by HW ECC */
@@ -502,12 +498,12 @@ static int __init at91_nand_probe(struct platform_device *pdev)
502 /* second phase scan */ 498 /* second phase scan */
503 if (nand_scan_tail(mtd)) { 499 if (nand_scan_tail(mtd)) {
504 res = -ENXIO; 500 res = -ENXIO;
505 goto out; 501 goto err_scan_tail;
506 } 502 }
507 503
508#ifdef CONFIG_MTD_PARTITIONS 504#ifdef CONFIG_MTD_PARTITIONS
509#ifdef CONFIG_MTD_CMDLINE_PARTS 505#ifdef CONFIG_MTD_CMDLINE_PARTS
510 mtd->name = "at91_nand"; 506 mtd->name = "atmel_nand";
511 num_partitions = parse_mtd_partitions(mtd, part_probes, 507 num_partitions = parse_mtd_partitions(mtd, part_probes,
512 &partitions, 0); 508 &partitions, 0);
513#endif 509#endif
@@ -516,9 +512,9 @@ static int __init at91_nand_probe(struct platform_device *pdev)
516 &num_partitions); 512 &num_partitions);
517 513
518 if ((!partitions) || (num_partitions == 0)) { 514 if ((!partitions) || (num_partitions == 0)) {
519 printk(KERN_ERR "at91_nand: No parititions defined, or unsupported device.\n"); 515 printk(KERN_ERR "atmel_nand: No parititions defined, or unsupported device.\n");
520 res = ENXIO; 516 res = ENXIO;
521 goto release; 517 goto err_no_partitions;
522 } 518 }
523 519
524 res = add_mtd_partitions(mtd, partitions, num_partitions); 520 res = add_mtd_partitions(mtd, partitions, num_partitions);
@@ -530,17 +526,19 @@ static int __init at91_nand_probe(struct platform_device *pdev)
530 return res; 526 return res;
531 527
532#ifdef CONFIG_MTD_PARTITIONS 528#ifdef CONFIG_MTD_PARTITIONS
533release: 529err_no_partitions:
534#endif 530#endif
535 nand_release(mtd); 531 nand_release(mtd);
536 532err_scan_tail:
537out: 533err_scan_ident:
538 iounmap(host->ecc); 534err_no_card:
539 535 atmel_nand_disable(host);
540err_ecc_ioremap:
541 at91_nand_disable(host);
542 platform_set_drvdata(pdev, NULL); 536 platform_set_drvdata(pdev, NULL);
537 if (host->ecc)
538 iounmap(host->ecc);
539err_ecc_ioremap:
543 iounmap(host->io_base); 540 iounmap(host->io_base);
541err_nand_ioremap:
544 kfree(host); 542 kfree(host);
545 return res; 543 return res;
546} 544}
@@ -548,47 +546,48 @@ err_ecc_ioremap:
548/* 546/*
549 * Remove a NAND device. 547 * Remove a NAND device.
550 */ 548 */
551static int __devexit at91_nand_remove(struct platform_device *pdev) 549static int __devexit atmel_nand_remove(struct platform_device *pdev)
552{ 550{
553 struct at91_nand_host *host = platform_get_drvdata(pdev); 551 struct atmel_nand_host *host = platform_get_drvdata(pdev);
554 struct mtd_info *mtd = &host->mtd; 552 struct mtd_info *mtd = &host->mtd;
555 553
556 nand_release(mtd); 554 nand_release(mtd);
557 555
558 at91_nand_disable(host); 556 atmel_nand_disable(host);
559 557
558 if (host->ecc)
559 iounmap(host->ecc);
560 iounmap(host->io_base); 560 iounmap(host->io_base);
561 iounmap(host->ecc);
562 kfree(host); 561 kfree(host);
563 562
564 return 0; 563 return 0;
565} 564}
566 565
567static struct platform_driver at91_nand_driver = { 566static struct platform_driver atmel_nand_driver = {
568 .probe = at91_nand_probe, 567 .probe = atmel_nand_probe,
569 .remove = at91_nand_remove, 568 .remove = atmel_nand_remove,
570 .driver = { 569 .driver = {
571 .name = "at91_nand", 570 .name = "atmel_nand",
572 .owner = THIS_MODULE, 571 .owner = THIS_MODULE,
573 }, 572 },
574}; 573};
575 574
576static int __init at91_nand_init(void) 575static int __init atmel_nand_init(void)
577{ 576{
578 return platform_driver_register(&at91_nand_driver); 577 return platform_driver_register(&atmel_nand_driver);
579} 578}
580 579
581 580
582static void __exit at91_nand_exit(void) 581static void __exit atmel_nand_exit(void)
583{ 582{
584 platform_driver_unregister(&at91_nand_driver); 583 platform_driver_unregister(&atmel_nand_driver);
585} 584}
586 585
587 586
588module_init(at91_nand_init); 587module_init(atmel_nand_init);
589module_exit(at91_nand_exit); 588module_exit(atmel_nand_exit);
590 589
591MODULE_LICENSE("GPL"); 590MODULE_LICENSE("GPL");
592MODULE_AUTHOR("Rick Bronson"); 591MODULE_AUTHOR("Rick Bronson");
593MODULE_DESCRIPTION("NAND/SmartMedia driver for AT91RM9200 / AT91SAM9"); 592MODULE_DESCRIPTION("NAND/SmartMedia driver for AT91 / AVR32");
594MODULE_ALIAS("platform:at91_nand"); 593MODULE_ALIAS("platform:atmel_nand");
diff --git a/drivers/mtd/nand/atmel_nand_ecc.h b/drivers/mtd/nand/atmel_nand_ecc.h
new file mode 100644
index 00000000000..1ee7f993db1
--- /dev/null
+++ b/drivers/mtd/nand/atmel_nand_ecc.h
@@ -0,0 +1,36 @@
1/*
2 * Error Corrected Code Controller (ECC) - System peripherals regsters.
3 * Based on AT91SAM9260 datasheet revision B.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#ifndef ATMEL_NAND_ECC_H
12#define ATMEL_NAND_ECC_H
13
14#define ATMEL_ECC_CR 0x00 /* Control register */
15#define ATMEL_ECC_RST (1 << 0) /* Reset parity */
16
17#define ATMEL_ECC_MR 0x04 /* Mode register */
18#define ATMEL_ECC_PAGESIZE (3 << 0) /* Page Size */
19#define ATMEL_ECC_PAGESIZE_528 (0)
20#define ATMEL_ECC_PAGESIZE_1056 (1)
21#define ATMEL_ECC_PAGESIZE_2112 (2)
22#define ATMEL_ECC_PAGESIZE_4224 (3)
23
24#define ATMEL_ECC_SR 0x08 /* Status register */
25#define ATMEL_ECC_RECERR (1 << 0) /* Recoverable Error */
26#define ATMEL_ECC_ECCERR (1 << 1) /* ECC Single Bit Error */
27#define ATMEL_ECC_MULERR (1 << 2) /* Multiple Errors */
28
29#define ATMEL_ECC_PR 0x0c /* Parity register */
30#define ATMEL_ECC_BITADDR (0xf << 0) /* Bit Error Address */
31#define ATMEL_ECC_WORDADDR (0xfff << 4) /* Word Error Address */
32
33#define ATMEL_ECC_NPR 0x10 /* NParity register */
34#define ATMEL_ECC_NPARITY (0xffff << 0) /* NParity */
35
36#endif
diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c
index 09e421a9689..22ad9f36776 100644
--- a/drivers/mtd/nand/au1550nd.c
+++ b/drivers/mtd/nand/au1550nd.c
@@ -3,8 +3,6 @@
3 * 3 *
4 * Copyright (C) 2004 Embedded Edge, LLC 4 * Copyright (C) 2004 Embedded Edge, LLC
5 * 5 *
6 * $Id: au1550nd.c,v 1.13 2005/11/07 11:14:30 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 version 2 as 7 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c
index dd38011ee0b..553dd7e9b41 100644
--- a/drivers/mtd/nand/autcpu12.c
+++ b/drivers/mtd/nand/autcpu12.c
@@ -6,8 +6,6 @@
6 * Derived from drivers/mtd/spia.c 6 * Derived from drivers/mtd/spia.c
7 * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) 7 * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com)
8 * 8 *
9 * $Id: autcpu12.c,v 1.23 2005/11/07 11:14:30 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 version 2 as 10 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
index da6ceaa80ba..95345d05157 100644
--- a/drivers/mtd/nand/cafe_nand.c
+++ b/drivers/mtd/nand/cafe_nand.c
@@ -626,10 +626,12 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
626{ 626{
627 struct mtd_info *mtd; 627 struct mtd_info *mtd;
628 struct cafe_priv *cafe; 628 struct cafe_priv *cafe;
629 struct mtd_partition *parts;
630 uint32_t ctrl; 629 uint32_t ctrl;
631 int nr_parts;
632 int err = 0; 630 int err = 0;
631#ifdef CONFIG_MTD_PARTITIONS
632 struct mtd_partition *parts;
633 int nr_parts;
634#endif
633 635
634 /* Very old versions shared the same PCI ident for all three 636 /* Very old versions shared the same PCI ident for all three
635 functions on the chip. Verify the class too... */ 637 functions on the chip. Verify the class too... */
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
index 0e72153b329..cd4393ce256 100644
--- a/drivers/mtd/nand/diskonchip.c
+++ b/drivers/mtd/nand/diskonchip.c
@@ -15,8 +15,6 @@
15 * converted to the generic Reed-Solomon library by Thomas Gleixner <tglx@linutronix.de> 15 * converted to the generic Reed-Solomon library by Thomas Gleixner <tglx@linutronix.de>
16 * 16 *
17 * Interface to generic NAND code for M-Systems DiskOnChip devices 17 * Interface to generic NAND code for M-Systems DiskOnChip devices
18 *
19 * $Id: diskonchip.c,v 1.55 2005/11/07 11:14:30 gleixner Exp $
20 */ 18 */
21 19
22#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/drivers/mtd/nand/edb7312.c b/drivers/mtd/nand/edb7312.c
index ba67bbec20d..387e4352903 100644
--- a/drivers/mtd/nand/edb7312.c
+++ b/drivers/mtd/nand/edb7312.c
@@ -6,8 +6,6 @@
6 * Derived from drivers/mtd/nand/autcpu12.c 6 * Derived from drivers/mtd/nand/autcpu12.c
7 * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de) 7 * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de)
8 * 8 *
9 * $Id: edb7312.c,v 1.12 2005/11/07 11:14:30 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 version 2 as 10 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
diff --git a/drivers/mtd/nand/excite_nandflash.c b/drivers/mtd/nand/excite_nandflash.c
index bed87290dec..ced14b5294d 100644
--- a/drivers/mtd/nand/excite_nandflash.c
+++ b/drivers/mtd/nand/excite_nandflash.c
@@ -209,7 +209,7 @@ static int __init excite_nand_probe(struct device *dev)
209 if (likely(!scan_res)) { 209 if (likely(!scan_res)) {
210 DEBUG(MTD_DEBUG_LEVEL2, "%s: register partitions\n", module_id); 210 DEBUG(MTD_DEBUG_LEVEL2, "%s: register partitions\n", module_id);
211 add_mtd_partitions(&drvdata->board_mtd, partition_info, 211 add_mtd_partitions(&drvdata->board_mtd, partition_info,
212 sizeof partition_info / sizeof partition_info[0]); 212 ARRAY_SIZE(partition_info));
213 } else { 213 } else {
214 iounmap(drvdata->regs); 214 iounmap(drvdata->regs);
215 kfree(drvdata); 215 kfree(drvdata);
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 4b69aacdf5c..1b06d29dd06 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -917,7 +917,7 @@ static int __devinit fsl_elbc_ctrl_init(struct fsl_elbc_ctrl *ctrl)
917 return 0; 917 return 0;
918} 918}
919 919
920static int __devexit fsl_elbc_ctrl_remove(struct of_device *ofdev) 920static int fsl_elbc_ctrl_remove(struct of_device *ofdev)
921{ 921{
922 struct fsl_elbc_ctrl *ctrl = dev_get_drvdata(&ofdev->dev); 922 struct fsl_elbc_ctrl *ctrl = dev_get_drvdata(&ofdev->dev);
923 int i; 923 int i;
@@ -1041,7 +1041,7 @@ static struct of_platform_driver fsl_elbc_ctrl_driver = {
1041 }, 1041 },
1042 .match_table = fsl_elbc_match, 1042 .match_table = fsl_elbc_match,
1043 .probe = fsl_elbc_ctrl_probe, 1043 .probe = fsl_elbc_ctrl_probe,
1044 .remove = __devexit_p(fsl_elbc_ctrl_remove), 1044 .remove = fsl_elbc_ctrl_remove,
1045}; 1045};
1046 1046
1047static int __init fsl_elbc_init(void) 1047static int __init fsl_elbc_init(void)
diff --git a/drivers/mtd/nand/h1910.c b/drivers/mtd/nand/h1910.c
index 2d585d2d090..9e59de501c2 100644
--- a/drivers/mtd/nand/h1910.c
+++ b/drivers/mtd/nand/h1910.c
@@ -7,8 +7,6 @@
7 * Copyright (C) 2002 Marius Gröger (mag@sysgo.de) 7 * Copyright (C) 2002 Marius Gröger (mag@sysgo.de)
8 * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de) 8 * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de)
9 * 9 *
10 * $Id: h1910.c,v 1.6 2005/11/07 11:14:30 gleixner Exp $
11 *
12 * 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
13 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 5e121ceaa59..0b1c48595f1 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -6,8 +6,6 @@
6 * 6 *
7 * Copyright (C) 2004 Thomas Gleixner (tglx@linutronix.de) 7 * Copyright (C) 2004 Thomas Gleixner (tglx@linutronix.de)
8 * 8 *
9 * $Id: nand_bbt.c,v 1.36 2005/11/07 11:14:30 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 version 2 as 10 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c
index 9003a135e05..918a806a847 100644
--- a/drivers/mtd/nand/nand_ecc.c
+++ b/drivers/mtd/nand/nand_ecc.c
@@ -9,8 +9,6 @@
9 * 9 *
10 * Copyright (C) 2006 Thomas Gleixner <tglx@linutronix.de> 10 * Copyright (C) 2006 Thomas Gleixner <tglx@linutronix.de>
11 * 11 *
12 * $Id: nand_ecc.c,v 1.15 2005/11/07 11:14:30 gleixner Exp $
13 *
14 * This file is free software; you can redistribute it and/or modify it 12 * This file is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the 13 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 2 or (at your option) any 14 * Free Software Foundation; either version 2 or (at your option) any
diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c
index a3e3ab0185d..69ee2c90eb0 100644
--- a/drivers/mtd/nand/nand_ids.c
+++ b/drivers/mtd/nand/nand_ids.c
@@ -3,8 +3,6 @@
3 * 3 *
4 * Copyright (C) 2002 Thomas Gleixner (tglx@linutronix.de) 4 * Copyright (C) 2002 Thomas Gleixner (tglx@linutronix.de)
5 * 5 *
6 * $Id: nand_ids.c,v 1.16 2005/11/07 11:14:31 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 version 2 as 7 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index bb885d1fcab..ecd70e2504f 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -21,8 +21,6 @@
21 * You should have received a copy of the GNU General Public License 21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software 22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
24 *
25 * $Id: nandsim.c,v 1.8 2005/03/19 15:33:56 dedekind Exp $
26 */ 24 */
27 25
28#include <linux/init.h> 26#include <linux/init.h>
@@ -39,6 +37,7 @@
39#include <linux/delay.h> 37#include <linux/delay.h>
40#include <linux/list.h> 38#include <linux/list.h>
41#include <linux/random.h> 39#include <linux/random.h>
40#include <asm/div64.h>
42 41
43/* Default simulator parameters values */ 42/* Default simulator parameters values */
44#if !defined(CONFIG_NANDSIM_FIRST_ID_BYTE) || \ 43#if !defined(CONFIG_NANDSIM_FIRST_ID_BYTE) || \
@@ -298,11 +297,11 @@ struct nandsim {
298 297
299 /* NAND flash "geometry" */ 298 /* NAND flash "geometry" */
300 struct nandsin_geometry { 299 struct nandsin_geometry {
301 uint32_t totsz; /* total flash size, bytes */ 300 uint64_t totsz; /* total flash size, bytes */
302 uint32_t secsz; /* flash sector (erase block) size, bytes */ 301 uint32_t secsz; /* flash sector (erase block) size, bytes */
303 uint pgsz; /* NAND flash page size, bytes */ 302 uint pgsz; /* NAND flash page size, bytes */
304 uint oobsz; /* page OOB area size, bytes */ 303 uint oobsz; /* page OOB area size, bytes */
305 uint32_t totszoob; /* total flash size including OOB, bytes */ 304 uint64_t totszoob; /* total flash size including OOB, bytes */
306 uint pgszoob; /* page size including OOB , bytes*/ 305 uint pgszoob; /* page size including OOB , bytes*/
307 uint secszoob; /* sector size including OOB, bytes */ 306 uint secszoob; /* sector size including OOB, bytes */
308 uint pgnum; /* total number of pages */ 307 uint pgnum; /* total number of pages */
@@ -459,6 +458,12 @@ static char *get_partition_name(int i)
459 return kstrdup(buf, GFP_KERNEL); 458 return kstrdup(buf, GFP_KERNEL);
460} 459}
461 460
461static u_int64_t divide(u_int64_t n, u_int32_t d)
462{
463 do_div(n, d);
464 return n;
465}
466
462/* 467/*
463 * Initialize the nandsim structure. 468 * Initialize the nandsim structure.
464 * 469 *
@@ -469,8 +474,8 @@ static int init_nandsim(struct mtd_info *mtd)
469 struct nand_chip *chip = (struct nand_chip *)mtd->priv; 474 struct nand_chip *chip = (struct nand_chip *)mtd->priv;
470 struct nandsim *ns = (struct nandsim *)(chip->priv); 475 struct nandsim *ns = (struct nandsim *)(chip->priv);
471 int i, ret = 0; 476 int i, ret = 0;
472 u_int32_t remains; 477 u_int64_t remains;
473 u_int32_t next_offset; 478 u_int64_t next_offset;
474 479
475 if (NS_IS_INITIALIZED(ns)) { 480 if (NS_IS_INITIALIZED(ns)) {
476 NS_ERR("init_nandsim: nandsim is already initialized\n"); 481 NS_ERR("init_nandsim: nandsim is already initialized\n");
@@ -487,8 +492,8 @@ static int init_nandsim(struct mtd_info *mtd)
487 ns->geom.oobsz = mtd->oobsize; 492 ns->geom.oobsz = mtd->oobsize;
488 ns->geom.secsz = mtd->erasesize; 493 ns->geom.secsz = mtd->erasesize;
489 ns->geom.pgszoob = ns->geom.pgsz + ns->geom.oobsz; 494 ns->geom.pgszoob = ns->geom.pgsz + ns->geom.oobsz;
490 ns->geom.pgnum = ns->geom.totsz / ns->geom.pgsz; 495 ns->geom.pgnum = divide(ns->geom.totsz, ns->geom.pgsz);
491 ns->geom.totszoob = ns->geom.totsz + ns->geom.pgnum * ns->geom.oobsz; 496 ns->geom.totszoob = ns->geom.totsz + (uint64_t)ns->geom.pgnum * ns->geom.oobsz;
492 ns->geom.secshift = ffs(ns->geom.secsz) - 1; 497 ns->geom.secshift = ffs(ns->geom.secsz) - 1;
493 ns->geom.pgshift = chip->page_shift; 498 ns->geom.pgshift = chip->page_shift;
494 ns->geom.oobshift = ffs(ns->geom.oobsz) - 1; 499 ns->geom.oobshift = ffs(ns->geom.oobsz) - 1;
@@ -511,7 +516,7 @@ static int init_nandsim(struct mtd_info *mtd)
511 } 516 }
512 517
513 if (ns->options & OPT_SMALLPAGE) { 518 if (ns->options & OPT_SMALLPAGE) {
514 if (ns->geom.totsz < (32 << 20)) { 519 if (ns->geom.totsz <= (32 << 20)) {
515 ns->geom.pgaddrbytes = 3; 520 ns->geom.pgaddrbytes = 3;
516 ns->geom.secaddrbytes = 2; 521 ns->geom.secaddrbytes = 2;
517 } else { 522 } else {
@@ -537,15 +542,16 @@ static int init_nandsim(struct mtd_info *mtd)
537 remains = ns->geom.totsz; 542 remains = ns->geom.totsz;
538 next_offset = 0; 543 next_offset = 0;
539 for (i = 0; i < parts_num; ++i) { 544 for (i = 0; i < parts_num; ++i) {
540 unsigned long part = parts[i]; 545 u_int64_t part_sz = (u_int64_t)parts[i] * ns->geom.secsz;
541 if (!part || part > remains / ns->geom.secsz) { 546
547 if (!part_sz || part_sz > remains) {
542 NS_ERR("bad partition size.\n"); 548 NS_ERR("bad partition size.\n");
543 ret = -EINVAL; 549 ret = -EINVAL;
544 goto error; 550 goto error;
545 } 551 }
546 ns->partitions[i].name = get_partition_name(i); 552 ns->partitions[i].name = get_partition_name(i);
547 ns->partitions[i].offset = next_offset; 553 ns->partitions[i].offset = next_offset;
548 ns->partitions[i].size = part * ns->geom.secsz; 554 ns->partitions[i].size = part_sz;
549 next_offset += ns->partitions[i].size; 555 next_offset += ns->partitions[i].size;
550 remains -= ns->partitions[i].size; 556 remains -= ns->partitions[i].size;
551 } 557 }
@@ -573,7 +579,7 @@ static int init_nandsim(struct mtd_info *mtd)
573 if (ns->busw == 16) 579 if (ns->busw == 16)
574 NS_WARN("16-bit flashes support wasn't tested\n"); 580 NS_WARN("16-bit flashes support wasn't tested\n");
575 581
576 printk("flash size: %u MiB\n", ns->geom.totsz >> 20); 582 printk("flash size: %llu MiB\n", ns->geom.totsz >> 20);
577 printk("page size: %u bytes\n", ns->geom.pgsz); 583 printk("page size: %u bytes\n", ns->geom.pgsz);
578 printk("OOB area size: %u bytes\n", ns->geom.oobsz); 584 printk("OOB area size: %u bytes\n", ns->geom.oobsz);
579 printk("sector size: %u KiB\n", ns->geom.secsz >> 10); 585 printk("sector size: %u KiB\n", ns->geom.secsz >> 10);
@@ -583,7 +589,7 @@ static int init_nandsim(struct mtd_info *mtd)
583 printk("bits in sector size: %u\n", ns->geom.secshift); 589 printk("bits in sector size: %u\n", ns->geom.secshift);
584 printk("bits in page size: %u\n", ns->geom.pgshift); 590 printk("bits in page size: %u\n", ns->geom.pgshift);
585 printk("bits in OOB size: %u\n", ns->geom.oobshift); 591 printk("bits in OOB size: %u\n", ns->geom.oobshift);
586 printk("flash size with OOB: %u KiB\n", ns->geom.totszoob >> 10); 592 printk("flash size with OOB: %llu KiB\n", ns->geom.totszoob >> 10);
587 printk("page address bytes: %u\n", ns->geom.pgaddrbytes); 593 printk("page address bytes: %u\n", ns->geom.pgaddrbytes);
588 printk("sector address bytes: %u\n", ns->geom.secaddrbytes); 594 printk("sector address bytes: %u\n", ns->geom.secaddrbytes);
589 printk("options: %#x\n", ns->options); 595 printk("options: %#x\n", ns->options);
@@ -825,7 +831,7 @@ static int setup_wear_reporting(struct mtd_info *mtd)
825 831
826 if (!rptwear) 832 if (!rptwear)
827 return 0; 833 return 0;
828 wear_eb_count = mtd->size / mtd->erasesize; 834 wear_eb_count = divide(mtd->size, mtd->erasesize);
829 mem = wear_eb_count * sizeof(unsigned long); 835 mem = wear_eb_count * sizeof(unsigned long);
830 if (mem / sizeof(unsigned long) != wear_eb_count) { 836 if (mem / sizeof(unsigned long) != wear_eb_count) {
831 NS_ERR("Too many erase blocks for wear reporting\n"); 837 NS_ERR("Too many erase blocks for wear reporting\n");
@@ -2013,7 +2019,7 @@ static int __init ns_init_module(void)
2013 } 2019 }
2014 2020
2015 if (overridesize) { 2021 if (overridesize) {
2016 u_int32_t new_size = nsmtd->erasesize << overridesize; 2022 u_int64_t new_size = (u_int64_t)nsmtd->erasesize << overridesize;
2017 if (new_size >> overridesize != nsmtd->erasesize) { 2023 if (new_size >> overridesize != nsmtd->erasesize) {
2018 NS_ERR("overridesize is too big\n"); 2024 NS_ERR("overridesize is too big\n");
2019 goto err_exit; 2025 goto err_exit;
@@ -2021,7 +2027,8 @@ static int __init ns_init_module(void)
2021 /* N.B. This relies on nand_scan not doing anything with the size before we change it */ 2027 /* N.B. This relies on nand_scan not doing anything with the size before we change it */
2022 nsmtd->size = new_size; 2028 nsmtd->size = new_size;
2023 chip->chipsize = new_size; 2029 chip->chipsize = new_size;
2024 chip->chip_shift = ffs(new_size) - 1; 2030 chip->chip_shift = ffs(nsmtd->erasesize) + overridesize - 1;
2031 chip->pagemask = (chip->chipsize >> chip->page_shift) - 1;
2025 } 2032 }
2026 2033
2027 if ((retval = setup_wear_reporting(nsmtd)) != 0) 2034 if ((retval = setup_wear_reporting(nsmtd)) != 0)
diff --git a/drivers/mtd/nand/ppchameleonevb.c b/drivers/mtd/nand/ppchameleonevb.c
index 082073acf20..cc865843185 100644
--- a/drivers/mtd/nand/ppchameleonevb.c
+++ b/drivers/mtd/nand/ppchameleonevb.c
@@ -6,8 +6,6 @@
6 * Derived from drivers/mtd/nand/edb7312.c 6 * Derived from drivers/mtd/nand/edb7312.c
7 * 7 *
8 * 8 *
9 * $Id: ppchameleonevb.c,v 1.7 2005/11/07 11:14:31 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 version 2 as 10 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
diff --git a/drivers/mtd/nand/rtc_from4.c b/drivers/mtd/nand/rtc_from4.c
index 26f88215bc4..a033c4cd8e1 100644
--- a/drivers/mtd/nand/rtc_from4.c
+++ b/drivers/mtd/nand/rtc_from4.c
@@ -6,8 +6,6 @@
6 * Derived from drivers/mtd/nand/spia.c 6 * Derived from drivers/mtd/nand/spia.c
7 * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) 7 * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com)
8 * 8 *
9 * $Id: rtc_from4.c,v 1.10 2005/11/07 11:14:31 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 version 2 as 10 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index b34a460ab67..35c6db54c98 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -1,26 +1,10 @@
1/* linux/drivers/mtd/nand/s3c2410.c 1/* linux/drivers/mtd/nand/s3c2410.c
2 * 2 *
3 * Copyright (c) 2004,2005 Simtec Electronics 3 * Copyright © 2004-2008 Simtec Electronics
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk> 5 * Ben Dooks <ben@simtec.co.uk>
6 * 6 *
7 * Samsung S3C2410/S3C240 NAND driver 7 * Samsung S3C2410/S3C2440/S3C2412 NAND driver
8 *
9 * Changelog:
10 * 21-Sep-2004 BJD Initial version
11 * 23-Sep-2004 BJD Multiple device support
12 * 28-Sep-2004 BJD Fixed ECC placement for Hardware mode
13 * 12-Oct-2004 BJD Fixed errors in use of platform data
14 * 18-Feb-2005 BJD Fix sparse errors
15 * 14-Mar-2005 BJD Applied tglx's code reduction patch
16 * 02-May-2005 BJD Fixed s3c2440 support
17 * 02-May-2005 BJD Reduced hwcontrol decode
18 * 20-Jun-2005 BJD Updated s3c2440 support, fixed timing bug
19 * 08-Jul-2005 BJD Fix OOPS when no platform data supplied
20 * 20-Oct-2005 BJD Fix timing calculation bug
21 * 14-Jan-2006 BJD Allow clock to be stopped when idle
22 *
23 * $Id: s3c2410.c,v 1.23 2006/04/01 18:06:29 bjd Exp $
24 * 8 *
25 * 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
26 * 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
@@ -691,7 +675,8 @@ static void s3c2410_nand_update_chip(struct s3c2410_nand_info *info,
691{ 675{
692 struct nand_chip *chip = &nmtd->chip; 676 struct nand_chip *chip = &nmtd->chip;
693 677
694 printk("%s: chip %p: %d\n", __func__, chip, chip->page_shift); 678 dev_dbg(info->device, "chip %p => page shift %d\n",
679 chip, chip->page_shift);
695 680
696 if (hardware_ecc) { 681 if (hardware_ecc) {
697 /* change the behaviour depending on wether we are using 682 /* change the behaviour depending on wether we are using
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
index 033f8800b1e..6dba2fb66ae 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/sharpsl.c
@@ -3,8 +3,6 @@
3 * 3 *
4 * Copyright (C) 2004 Richard Purdie 4 * Copyright (C) 2004 Richard Purdie
5 * 5 *
6 * $Id: sharpsl.c,v 1.7 2005/11/07 11:14:31 gleixner Exp $
7 *
8 * Based on Sharp's NAND driver sharp_sl.c 6 * Based on Sharp's NAND driver sharp_sl.c
9 * 7 *
10 * 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
diff --git a/drivers/mtd/nand/spia.c b/drivers/mtd/nand/spia.c
index 1f6d429b158..0cc6d0acb8f 100644
--- a/drivers/mtd/nand/spia.c
+++ b/drivers/mtd/nand/spia.c
@@ -8,8 +8,6 @@
8 * to controllines (due to change in nand.c) 8 * to controllines (due to change in nand.c)
9 * page_cache added 9 * page_cache added
10 * 10 *
11 * $Id: spia.c,v 1.25 2005/11/07 11:14:31 gleixner Exp $
12 *
13 * 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
14 * it under the terms of the GNU General Public License version 2 as 12 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation. 13 * published by the Free Software Foundation.
diff --git a/drivers/mtd/nand/toto.c b/drivers/mtd/nand/toto.c
index f9e2d4a0ab8..bbf492e6830 100644
--- a/drivers/mtd/nand/toto.c
+++ b/drivers/mtd/nand/toto.c
@@ -14,8 +14,6 @@
14 * Overview: 14 * Overview:
15 * This is a device driver for the NAND flash device found on the 15 * This is a device driver for the NAND flash device found on the
16 * TI fido board. It supports 32MiB and 64MiB cards 16 * TI fido board. It supports 32MiB and 64MiB cards
17 *
18 * $Id: toto.c,v 1.5 2005/11/07 11:14:31 gleixner Exp $
19 */ 17 */
20 18
21#include <linux/slab.h> 19#include <linux/slab.h>
diff --git a/drivers/mtd/nand/ts7250.c b/drivers/mtd/nand/ts7250.c
index f40081069ab..807a72752ee 100644
--- a/drivers/mtd/nand/ts7250.c
+++ b/drivers/mtd/nand/ts7250.c
@@ -9,8 +9,6 @@
9 * Derived from drivers/mtd/nand/autcpu12.c 9 * Derived from drivers/mtd/nand/autcpu12.c
10 * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de) 10 * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de)
11 * 11 *
12 * $Id: ts7250.c,v 1.4 2004/12/30 22:02:07 joff Exp $
13 *
14 * This program is free software; you can redistribute it and/or modify 12 * 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 13 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation. 14 * published by the Free Software Foundation.
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index 0c9ce19ea27..320b929abe7 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -1,7 +1,6 @@
1/* Linux driver for NAND Flash Translation Layer */ 1/* Linux driver for NAND Flash Translation Layer */
2/* (c) 1999 Machine Vision Holdings, Inc. */ 2/* (c) 1999 Machine Vision Holdings, Inc. */
3/* Author: David Woodhouse <dwmw2@infradead.org> */ 3/* Author: David Woodhouse <dwmw2@infradead.org> */
4/* $Id: nftlcore.c,v 1.98 2005/11/07 11:14:21 gleixner Exp $ */
5 4
6/* 5/*
7 The contents of this file are distributed under the GNU General 6 The contents of this file are distributed under the GNU General
@@ -803,12 +802,8 @@ static struct mtd_blktrans_ops nftl_tr = {
803 .owner = THIS_MODULE, 802 .owner = THIS_MODULE,
804}; 803};
805 804
806extern char nftlmountrev[];
807
808static int __init init_nftl(void) 805static int __init init_nftl(void)
809{ 806{
810 printk(KERN_INFO "NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c %s\n", nftlmountrev);
811
812 return register_mtd_blktrans(&nftl_tr); 807 return register_mtd_blktrans(&nftl_tr);
813} 808}
814 809
diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c
index 345e6eff89c..ccc4f209fbb 100644
--- a/drivers/mtd/nftlmount.c
+++ b/drivers/mtd/nftlmount.c
@@ -4,8 +4,6 @@
4 * Author: Fabrice Bellard (fabrice.bellard@netgem.com) 4 * Author: Fabrice Bellard (fabrice.bellard@netgem.com)
5 * Copyright (C) 2000 Netgem S.A. 5 * Copyright (C) 2000 Netgem S.A.
6 * 6 *
7 * $Id: nftlmount.c,v 1.41 2005/11/07 11:14:21 gleixner Exp $
8 *
9 * 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
10 * 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
11 * the Free Software Foundation; either version 2 of the License, or 9 * the Free Software Foundation; either version 2 of the License, or
@@ -31,8 +29,6 @@
31 29
32#define SECTORSIZE 512 30#define SECTORSIZE 512
33 31
34char nftlmountrev[]="$Revision: 1.41 $";
35
36/* find_boot_record: Find the NFTL Media Header and its Spare copy which contains the 32/* find_boot_record: Find the NFTL Media Header and its Spare copy which contains the
37 * various device information of the NFTL partition and Bad Unit Table. Update 33 * various device information of the NFTL partition and Bad Unit Table. Update
38 * the ReplUnitTable[] table accroding to the Bad Unit Table. ReplUnitTable[] 34 * the ReplUnitTable[] table accroding to the Bad Unit Table. ReplUnitTable[]
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 5d7965f7e9c..926cf3a4135 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -325,28 +325,11 @@ static int onenand_wait(struct mtd_info *mtd, int state)
325 325
326 ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS); 326 ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
327 327
328 if (ctrl & ONENAND_CTRL_ERROR) { 328 /*
329 printk(KERN_ERR "onenand_wait: controller error = 0x%04x\n", ctrl); 329 * In the Spec. it checks the controller status first
330 if (ctrl & ONENAND_CTRL_LOCK) 330 * However if you get the correct information in case of
331 printk(KERN_ERR "onenand_wait: it's locked error.\n"); 331 * power off recovery (POR) test, it should read ECC status first
332 if (state == FL_READING) { 332 */
333 /*
334 * A power loss while writing can result in a page
335 * becoming unreadable. When the device is mounted
336 * again, reading that page gives controller errors.
337 * Upper level software like JFFS2 treat -EIO as fatal,
338 * refusing to mount at all. That means it is necessary
339 * to treat the error as an ECC error to allow recovery.
340 * Note that typically in this case, the eraseblock can
341 * still be erased and rewritten i.e. it has not become
342 * a bad block.
343 */
344 mtd->ecc_stats.failed++;
345 return -EBADMSG;
346 }
347 return -EIO;
348 }
349
350 if (interrupt & ONENAND_INT_READ) { 333 if (interrupt & ONENAND_INT_READ) {
351 int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS); 334 int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
352 if (ecc) { 335 if (ecc) {
@@ -364,6 +347,15 @@ static int onenand_wait(struct mtd_info *mtd, int state)
364 return -EIO; 347 return -EIO;
365 } 348 }
366 349
350 /* If there's controller error, it's a real error */
351 if (ctrl & ONENAND_CTRL_ERROR) {
352 printk(KERN_ERR "onenand_wait: controller error = 0x%04x\n",
353 ctrl);
354 if (ctrl & ONENAND_CTRL_LOCK)
355 printk(KERN_ERR "onenand_wait: it's locked error.\n");
356 return -EIO;
357 }
358
367 return 0; 359 return 0;
368} 360}
369 361
@@ -1135,22 +1127,26 @@ static int onenand_bbt_wait(struct mtd_info *mtd, int state)
1135 interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); 1127 interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT);
1136 ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS); 1128 ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
1137 1129
1138 /* Initial bad block case: 0x2400 or 0x0400 */
1139 if (ctrl & ONENAND_CTRL_ERROR) {
1140 printk(KERN_DEBUG "onenand_bbt_wait: controller error = 0x%04x\n", ctrl);
1141 return ONENAND_BBT_READ_ERROR;
1142 }
1143
1144 if (interrupt & ONENAND_INT_READ) { 1130 if (interrupt & ONENAND_INT_READ) {
1145 int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS); 1131 int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
1146 if (ecc & ONENAND_ECC_2BIT_ALL) 1132 if (ecc & ONENAND_ECC_2BIT_ALL) {
1133 printk(KERN_INFO "onenand_bbt_wait: ecc error = 0x%04x"
1134 ", controller error 0x%04x\n", ecc, ctrl);
1147 return ONENAND_BBT_READ_ERROR; 1135 return ONENAND_BBT_READ_ERROR;
1136 }
1148 } else { 1137 } else {
1149 printk(KERN_ERR "onenand_bbt_wait: read timeout!" 1138 printk(KERN_ERR "onenand_bbt_wait: read timeout!"
1150 "ctrl=0x%04x intr=0x%04x\n", ctrl, interrupt); 1139 "ctrl=0x%04x intr=0x%04x\n", ctrl, interrupt);
1151 return ONENAND_BBT_READ_FATAL_ERROR; 1140 return ONENAND_BBT_READ_FATAL_ERROR;
1152 } 1141 }
1153 1142
1143 /* Initial bad block case: 0x2400 or 0x0400 */
1144 if (ctrl & ONENAND_CTRL_ERROR) {
1145 printk(KERN_DEBUG "onenand_bbt_wait: "
1146 "controller error = 0x%04x\n", ctrl);
1147 return ONENAND_BBT_READ_ERROR;
1148 }
1149
1154 return 0; 1150 return 0;
1155} 1151}
1156 1152
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
index c5030f94f04..2d600a1bf2a 100644
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: redboot.c,v 1.21 2006/03/30 18:34:37 bjd Exp $
3 *
4 * Parse RedBoot-style Flash Image System (FIS) tables and 2 * Parse RedBoot-style Flash Image System (FIS) tables and
5 * produce a Linux partition array to match. 3 * produce a Linux partition array to match.
6 */ 4 */
diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c
index c84e4546549..e538c0a72ab 100644
--- a/drivers/mtd/rfd_ftl.c
+++ b/drivers/mtd/rfd_ftl.c
@@ -3,8 +3,6 @@
3 * 3 *
4 * Copyright (C) 2005 Sean Young <sean@mess.org> 4 * Copyright (C) 2005 Sean Young <sean@mess.org>
5 * 5 *
6 * $Id: rfd_ftl.c,v 1.8 2006/01/15 12:51:44 sean Exp $
7 *
8 * This type of flash translation layer (FTL) is used by the Embedded BIOS 6 * This type of flash translation layer (FTL) is used by the Embedded BIOS
9 * by General Software. It is known as the Resident Flash Disk (RFD), see: 7 * by General Software. It is known as the Resident Flash Disk (RFD), see:
10 * 8 *
diff --git a/include/asm-arm/arch-at91/at91_ecc.h b/include/asm-arm/arch-at91/at91_ecc.h
deleted file mode 100644
index 1e5a8caca2d..00000000000
--- a/include/asm-arm/arch-at91/at91_ecc.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_ecc.h
3 *
4 * Error Corrected Code Controller (ECC) - System peripherals regsters.
5 * Based on AT91SAM9260 datasheet revision B.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef AT91_ECC_H
14#define AT91_ECC_H
15
16#define AT91_ECC_CR 0x00 /* Control register */
17#define AT91_ECC_RST (1 << 0) /* Reset parity */
18
19#define AT91_ECC_MR 0x04 /* Mode register */
20#define AT91_ECC_PAGESIZE (3 << 0) /* Page Size */
21#define AT91_ECC_PAGESIZE_528 (0)
22#define AT91_ECC_PAGESIZE_1056 (1)
23#define AT91_ECC_PAGESIZE_2112 (2)
24#define AT91_ECC_PAGESIZE_4224 (3)
25
26#define AT91_ECC_SR 0x08 /* Status register */
27#define AT91_ECC_RECERR (1 << 0) /* Recoverable Error */
28#define AT91_ECC_ECCERR (1 << 1) /* ECC Single Bit Error */
29#define AT91_ECC_MULERR (1 << 2) /* Multiple Errors */
30
31#define AT91_ECC_PR 0x0c /* Parity register */
32#define AT91_ECC_BITADDR (0xf << 0) /* Bit Error Address */
33#define AT91_ECC_WORDADDR (0xfff << 4) /* Word Error Address */
34
35#define AT91_ECC_NPR 0x10 /* NParity register */
36#define AT91_ECC_NPARITY (0xffff << 0) /* NParity */
37
38#endif
diff --git a/include/asm-arm/arch-at91/board.h b/include/asm-arm/arch-at91/board.h
index dc189f01c5b..6296922a684 100644
--- a/include/asm-arm/arch-at91/board.h
+++ b/include/asm-arm/arch-at91/board.h
@@ -85,7 +85,7 @@ struct at91_usbh_data {
85extern void __init at91_add_device_usbh(struct at91_usbh_data *data); 85extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
86 86
87 /* NAND / SmartMedia */ 87 /* NAND / SmartMedia */
88struct at91_nand_data { 88struct atmel_nand_data {
89 u8 enable_pin; /* chip enable */ 89 u8 enable_pin; /* chip enable */
90 u8 det_pin; /* card detect */ 90 u8 det_pin; /* card detect */
91 u8 rdy_pin; /* ready/busy */ 91 u8 rdy_pin; /* ready/busy */
@@ -94,7 +94,7 @@ struct at91_nand_data {
94 u8 bus_width_16; /* buswidth is 16 bit */ 94 u8 bus_width_16; /* buswidth is 16 bit */
95 struct mtd_partition* (*partition_info)(int, int*); 95 struct mtd_partition* (*partition_info)(int, int*);
96}; 96};
97extern void __init at91_add_device_nand(struct at91_nand_data *data); 97extern void __init at91_add_device_nand(struct atmel_nand_data *data);
98 98
99 /* I2C*/ 99 /* I2C*/
100extern void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices); 100extern void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices);
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h
index a4e2d28bfb5..cc5906cd741 100644
--- a/include/asm-avr32/arch-at32ap/board.h
+++ b/include/asm-avr32/arch-at32ap/board.h
@@ -85,4 +85,17 @@ struct platform_device *
85at32_add_device_cf(unsigned int id, unsigned int extint, 85at32_add_device_cf(unsigned int id, unsigned int extint,
86 struct cf_platform_data *data); 86 struct cf_platform_data *data);
87 87
88/* NAND / SmartMedia */
89struct atmel_nand_data {
90 int enable_pin; /* chip enable */
91 int det_pin; /* card detect */
92 int rdy_pin; /* ready/busy */
93 u8 ale; /* address line number connected to ALE */
94 u8 cle; /* address line number connected to CLE */
95 u8 bus_width_16; /* buswidth is 16 bit */
96 struct mtd_partition *(*partition_info)(int size, int *num_partitions);
97};
98struct platform_device *
99at32_add_device_nand(unsigned int id, struct atmel_nand_data *data);
100
88#endif /* __ASM_ARCH_BOARD_H */ 101#endif /* __ASM_ARCH_BOARD_H */
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h
index 6b563cae23d..da720bc3eb1 100644
--- a/include/linux/jffs2.h
+++ b/include/linux/jffs2.h
@@ -7,9 +7,6 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in the 8 * For licensing information, see the file 'LICENCE' in the
9 * jffs2 directory. 9 * jffs2 directory.
10 *
11 * $Id: jffs2.h,v 1.38 2005/09/26 11:37:23 havasi Exp $
12 *
13 */ 10 */
14 11
15#ifndef __LINUX_JFFS2_H__ 12#ifndef __LINUX_JFFS2_H__
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h
index 9a6e2f953cb..310e6160641 100644
--- a/include/linux/mtd/blktrans.h
+++ b/include/linux/mtd/blktrans.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: blktrans.h,v 1.6 2005/11/07 11:14:54 gleixner Exp $
3 *
4 * (C) 2003 David Woodhouse <dwmw2@infradead.org> 2 * (C) 2003 David Woodhouse <dwmw2@infradead.org>
5 * 3 *
6 * Interface to Linux block layer for MTD 'translation layers'. 4 * Interface to Linux block layer for MTD 'translation layers'.
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h
index b0ddf4b2586..d6fb115f5a0 100644
--- a/include/linux/mtd/cfi.h
+++ b/include/linux/mtd/cfi.h
@@ -1,7 +1,6 @@
1 1
2/* Common Flash Interface structures 2/* Common Flash Interface structures
3 * See http://support.intel.com/design/flash/technote/index.htm 3 * See http://support.intel.com/design/flash/technote/index.htm
4 * $Id: cfi.h,v 1.57 2005/11/15 23:28:17 tpoynor Exp $
5 */ 4 */
6 5
7#ifndef __MTD_CFI_H__ 6#ifndef __MTD_CFI_H__
diff --git a/include/linux/mtd/cfi_endian.h b/include/linux/mtd/cfi_endian.h
index 25724f7d386..d802f7736be 100644
--- a/include/linux/mtd/cfi_endian.h
+++ b/include/linux/mtd/cfi_endian.h
@@ -1,8 +1,3 @@
1/*
2 * $Id: cfi_endian.h,v 1.11 2002/01/30 23:20:48 awozniak Exp $
3 *
4 */
5
6#include <asm/byteorder.h> 1#include <asm/byteorder.h>
7 2
8#ifndef CONFIG_MTD_CFI_ADV_OPTIONS 3#ifndef CONFIG_MTD_CFI_ADV_OPTIONS
diff --git a/include/linux/mtd/concat.h b/include/linux/mtd/concat.h
index ed8dc675521..c02f3d264ec 100644
--- a/include/linux/mtd/concat.h
+++ b/include/linux/mtd/concat.h
@@ -4,8 +4,6 @@
4 * (C) 2002 Robert Kaiser <rkaiser@sysgo.de> 4 * (C) 2002 Robert Kaiser <rkaiser@sysgo.de>
5 * 5 *
6 * This code is GPL 6 * This code is GPL
7 *
8 * $Id: concat.h,v 1.1 2002/03/08 16:34:36 rkaiser Exp $
9 */ 7 */
10 8
11#ifndef MTD_CONCAT_H 9#ifndef MTD_CONCAT_H
diff --git a/include/linux/mtd/doc2000.h b/include/linux/mtd/doc2000.h
index 9addd073bf1..0a6d516ab71 100644
--- a/include/linux/mtd/doc2000.h
+++ b/include/linux/mtd/doc2000.h
@@ -6,8 +6,6 @@
6 * Copyright (C) 2002-2003 Greg Ungerer <gerg@snapgear.com> 6 * Copyright (C) 2002-2003 Greg Ungerer <gerg@snapgear.com>
7 * Copyright (C) 2002-2003 SnapGear Inc 7 * Copyright (C) 2002-2003 SnapGear Inc
8 * 8 *
9 * $Id: doc2000.h,v 1.25 2005/11/07 11:14:54 gleixner Exp $
10 *
11 * Released under GPL 9 * Released under GPL
12 */ 10 */
13 11
diff --git a/include/linux/mtd/flashchip.h b/include/linux/mtd/flashchip.h
index 39e7d2a1be9..08dd131301c 100644
--- a/include/linux/mtd/flashchip.h
+++ b/include/linux/mtd/flashchip.h
@@ -5,9 +5,6 @@
5 * Contains information about the location and state of a given flash device 5 * Contains information about the location and state of a given flash device
6 * 6 *
7 * (C) 2000 Red Hat. GPLd. 7 * (C) 2000 Red Hat. GPLd.
8 *
9 * $Id: flashchip.h,v 1.18 2005/11/07 11:14:54 gleixner Exp $
10 *
11 */ 8 */
12 9
13#ifndef __MTD_FLASHCHIP_H__ 10#ifndef __MTD_FLASHCHIP_H__
diff --git a/include/linux/mtd/ftl.h b/include/linux/mtd/ftl.h
index d9960911330..0be442f881d 100644
--- a/include/linux/mtd/ftl.h
+++ b/include/linux/mtd/ftl.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: ftl.h,v 1.7 2005/11/07 11:14:54 gleixner Exp $
3 *
4 * Derived from (and probably identical to): 2 * Derived from (and probably identical to):
5 * ftl.h 1.7 1999/10/25 20:23:17 3 * ftl.h 1.7 1999/10/25 20:23:17
6 * 4 *
diff --git a/include/linux/mtd/gen_probe.h b/include/linux/mtd/gen_probe.h
index 256e7342ed1..df362ddf294 100644
--- a/include/linux/mtd/gen_probe.h
+++ b/include/linux/mtd/gen_probe.h
@@ -1,7 +1,6 @@
1/* 1/*
2 * (C) 2001, 2001 Red Hat, Inc. 2 * (C) 2001, 2001 Red Hat, Inc.
3 * GPL'd 3 * GPL'd
4 * $Id: gen_probe.h,v 1.4 2005/11/07 11:14:54 gleixner Exp $
5 */ 4 */
6 5
7#ifndef __LINUX_MTD_GEN_PROBE_H__ 6#ifndef __LINUX_MTD_GEN_PROBE_H__
diff --git a/include/linux/mtd/inftl.h b/include/linux/mtd/inftl.h
index 85fd041d44a..64ee53ce95a 100644
--- a/include/linux/mtd/inftl.h
+++ b/include/linux/mtd/inftl.h
@@ -2,8 +2,6 @@
2 * inftl.h -- defines to support the Inverse NAND Flash Translation Layer 2 * inftl.h -- defines to support the Inverse NAND Flash Translation Layer
3 * 3 *
4 * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) 4 * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
5 *
6 * $Id: inftl.h,v 1.7 2005/06/13 13:08:45 sean Exp $
7 */ 5 */
8 6
9#ifndef __MTD_INFTL_H__ 7#ifndef __MTD_INFTL_H__
@@ -52,8 +50,6 @@ struct INFTLrecord {
52int INFTL_mount(struct INFTLrecord *s); 50int INFTL_mount(struct INFTLrecord *s);
53int INFTL_formatblock(struct INFTLrecord *s, int block); 51int INFTL_formatblock(struct INFTLrecord *s, int block);
54 52
55extern char inftlmountrev[];
56
57void INFTL_dumptables(struct INFTLrecord *s); 53void INFTL_dumptables(struct INFTLrecord *s);
58void INFTL_dumpVUchains(struct INFTLrecord *s); 54void INFTL_dumpVUchains(struct INFTLrecord *s);
59 55
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h
index a9fae032ba8..85e3939cf48 100644
--- a/include/linux/mtd/map.h
+++ b/include/linux/mtd/map.h
@@ -1,6 +1,5 @@
1 1
2/* Overhauled routines for dealing with different mmap regions of flash */ 2/* Overhauled routines for dealing with different mmap regions of flash */
3/* $Id: map.h,v 1.54 2005/11/07 11:14:54 gleixner Exp $ */
4 3
5#ifndef __LINUX_MTD_MAP_H__ 4#ifndef __LINUX_MTD_MAP_H__
6#define __LINUX_MTD_MAP_H__ 5#define __LINUX_MTD_MAP_H__
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 245f9098e17..31ed234b2a7 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: mtd.h,v 1.61 2005/11/07 11:14:54 gleixner Exp $
3 *
4 * Copyright (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> et al. 2 * Copyright (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> et al.
5 * 3 *
6 * Released under GPL 4 * Released under GPL
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 53ea3dc8b0e..863e22a0ddb 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -5,8 +5,6 @@
5 * Steven J. Hill <sjhill@realitydiluted.com> 5 * Steven J. Hill <sjhill@realitydiluted.com>
6 * Thomas Gleixner <tglx@linutronix.de> 6 * Thomas Gleixner <tglx@linutronix.de>
7 * 7 *
8 * $Id: nand.h,v 1.74 2005/09/15 13:58:50 vwool Exp $
9 *
10 * 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
11 * 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
12 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
diff --git a/include/linux/mtd/nand_ecc.h b/include/linux/mtd/nand_ecc.h
index 12c5bc342ea..090da505425 100644
--- a/include/linux/mtd/nand_ecc.h
+++ b/include/linux/mtd/nand_ecc.h
@@ -3,8 +3,6 @@
3 * 3 *
4 * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) 4 * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com)
5 * 5 *
6 * $Id: nand_ecc.h,v 1.4 2004/06/17 02:35:02 dbrown 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 version 2 as 7 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
diff --git a/include/linux/mtd/nftl.h b/include/linux/mtd/nftl.h
index 001eec50cac..dcaf611ed74 100644
--- a/include/linux/mtd/nftl.h
+++ b/include/linux/mtd/nftl.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: nftl.h,v 1.16 2004/06/30 14:49:00 dbrown Exp $
3 *
4 * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> 2 * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>
5 */ 3 */
6 4
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index 7c37d7e55ab..5014f7a9f5d 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -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: partitions.h,v 1.17 2005/11/07 11:14:55 gleixner Exp $
9 */ 7 */
10 8
11#ifndef MTD_PARTITIONS_H 9#ifndef MTD_PARTITIONS_H
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h
index 0dc07d5f335..c8e63a5ee72 100644
--- a/include/linux/mtd/physmap.h
+++ b/include/linux/mtd/physmap.h
@@ -2,8 +2,6 @@
2 * For boards with physically mapped flash and using 2 * For boards with physically mapped flash and using
3 * drivers/mtd/maps/physmap.c mapping driver. 3 * drivers/mtd/maps/physmap.c mapping driver.
4 * 4 *
5 * $Id: physmap.h,v 1.4 2005/11/07 11:14:55 gleixner Exp $
6 *
7 * Copyright (C) 2003 MontaVista Software Inc. 5 * Copyright (C) 2003 MontaVista Software Inc.
8 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net 6 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
9 * 7 *
diff --git a/include/linux/mtd/plat-ram.h b/include/linux/mtd/plat-ram.h
index 0e37ad07bce..e07890aff1c 100644
--- a/include/linux/mtd/plat-ram.h
+++ b/include/linux/mtd/plat-ram.h
@@ -6,8 +6,6 @@
6 * 6 *
7 * Generic platform device based RAM map 7 * Generic platform device based RAM map
8 * 8 *
9 * $Id: plat-ram.h,v 1.2 2005/01/24 00:37:40 bjd 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 version 2 as 10 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
diff --git a/include/linux/mtd/pmc551.h b/include/linux/mtd/pmc551.h
index 5cc070c24d8..27ad40aed19 100644
--- a/include/linux/mtd/pmc551.h
+++ b/include/linux/mtd/pmc551.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: pmc551.h,v 1.6 2005/11/07 11:14:55 gleixner Exp $
3 *
4 * PMC551 PCI Mezzanine Ram Device 2 * PMC551 PCI Mezzanine Ram Device
5 * 3 *
6 * Author: 4 * Author:
@@ -17,7 +15,7 @@
17 15
18#include <linux/mtd/mtd.h> 16#include <linux/mtd/mtd.h>
19 17
20#define PMC551_VERSION "$Id: pmc551.h,v 1.6 2005/11/07 11:14:55 gleixner Exp $\n"\ 18#define PMC551_VERSION \
21 "Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n" 19 "Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n"
22 20
23/* 21/*
diff --git a/include/linux/mtd/xip.h b/include/linux/mtd/xip.h
index e9d40bdde48..36efcba15ec 100644
--- a/include/linux/mtd/xip.h
+++ b/include/linux/mtd/xip.h
@@ -11,8 +11,6 @@
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 version 2 as 12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation. 13 * published by the Free Software Foundation.
14 *
15 * $Id: xip.h,v 1.5 2005/11/07 11:14:55 gleixner Exp $
16 */ 14 */
17 15
18#ifndef __LINUX_MTD_XIP_H__ 16#ifndef __LINUX_MTD_XIP_H__
diff --git a/include/mtd/inftl-user.h b/include/mtd/inftl-user.h
index 9b1e2526b45..e17eda302b2 100644
--- a/include/mtd/inftl-user.h
+++ b/include/mtd/inftl-user.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: inftl-user.h,v 1.2 2005/11/07 11:14:56 gleixner Exp $
3 *
4 * Parts of INFTL headers shared with userspace 2 * Parts of INFTL headers shared with userspace
5 * 3 *
6 */ 4 */
diff --git a/include/mtd/jffs2-user.h b/include/mtd/jffs2-user.h
index d508ef0ae09..001685d7fa8 100644
--- a/include/mtd/jffs2-user.h
+++ b/include/mtd/jffs2-user.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: jffs2-user.h,v 1.1 2004/05/05 11:57:54 dwmw2 Exp $
3 *
4 * JFFS2 definitions for use in user space only 2 * JFFS2 definitions for use in user space only
5 */ 3 */
6 4
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index 615072c4da0..c6c61cd5a25 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: mtd-abi.h,v 1.13 2005/11/07 11:14:56 gleixner Exp $
3 *
4 * Portions of MTD ABI definition which are shared by kernel and user space 2 * Portions of MTD ABI definition which are shared by kernel and user space
5 */ 3 */
6 4
diff --git a/include/mtd/mtd-user.h b/include/mtd/mtd-user.h
index 713f34d3e62..170ceca3b2d 100644
--- a/include/mtd/mtd-user.h
+++ b/include/mtd/mtd-user.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: mtd-user.h,v 1.2 2004/05/05 14:44:57 dwmw2 Exp $
3 *
4 * MTD ABI header for use by user space only. 2 * MTD ABI header for use by user space only.
5 */ 3 */
6 4
diff --git a/include/mtd/nftl-user.h b/include/mtd/nftl-user.h
index b2bca18e731..390d21c080a 100644
--- a/include/mtd/nftl-user.h
+++ b/include/mtd/nftl-user.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: nftl-user.h,v 1.2 2005/11/07 11:14:56 gleixner Exp $
3 *
4 * Parts of NFTL headers shared with userspace 2 * Parts of NFTL headers shared with userspace
5 * 3 *
6 */ 4 */