diff options
Diffstat (limited to 'drivers/mtd/chips')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 17 | ||||
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 3 | ||||
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0020.c | 2 | ||||
-rw-r--r-- | drivers/mtd/chips/cfi_probe.c | 1 | ||||
-rw-r--r-- | drivers/mtd/chips/cfi_util.c | 3 | ||||
-rw-r--r-- | drivers/mtd/chips/chipreg.c | 2 | ||||
-rw-r--r-- | drivers/mtd/chips/gen_probe.c | 5 | ||||
-rw-r--r-- | drivers/mtd/chips/jedec_probe.c | 133 | ||||
-rw-r--r-- | drivers/mtd/chips/map_absent.c | 1 | ||||
-rw-r--r-- | drivers/mtd/chips/map_ram.c | 1 | ||||
-rw-r--r-- | drivers/mtd/chips/map_rom.c | 1 |
11 files changed, 140 insertions, 29 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index fcd1aeccdf93..5f1b472137a0 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 | ||
55 | static int cfi_intelext_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); | 55 | static 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 | }; |
306 | static struct cfi_fixup fixup_table[] = { | 308 | static struct cfi_fixup fixup_table[] = { |
@@ -1147,7 +1149,7 @@ static int inval_cache_and_wait_for_operation( | |||
1147 | struct cfi_private *cfi = map->fldrv_priv; | 1149 | struct cfi_private *cfi = map->fldrv_priv; |
1148 | map_word status, status_OK = CMD(0x80); | 1150 | map_word status, status_OK = CMD(0x80); |
1149 | int chip_state = chip->state; | 1151 | int chip_state = chip->state; |
1150 | unsigned int timeo, sleep_time; | 1152 | unsigned int timeo, sleep_time, reset_timeo; |
1151 | 1153 | ||
1152 | spin_unlock(chip->mutex); | 1154 | spin_unlock(chip->mutex); |
1153 | if (inval_len) | 1155 | if (inval_len) |
@@ -1158,6 +1160,7 @@ static int inval_cache_and_wait_for_operation( | |||
1158 | timeo = chip_op_time * 8; | 1160 | timeo = chip_op_time * 8; |
1159 | if (!timeo) | 1161 | if (!timeo) |
1160 | timeo = 500000; | 1162 | timeo = 500000; |
1163 | reset_timeo = timeo; | ||
1161 | sleep_time = chip_op_time / 2; | 1164 | sleep_time = chip_op_time / 2; |
1162 | 1165 | ||
1163 | for (;;) { | 1166 | for (;;) { |
@@ -1199,6 +1202,12 @@ static int inval_cache_and_wait_for_operation( | |||
1199 | remove_wait_queue(&chip->wq, &wait); | 1202 | remove_wait_queue(&chip->wq, &wait); |
1200 | spin_lock(chip->mutex); | 1203 | spin_lock(chip->mutex); |
1201 | } | 1204 | } |
1205 | if (chip->erase_suspended || chip->write_suspended) { | ||
1206 | /* Suspend has occured while sleep: reset timeout */ | ||
1207 | timeo = reset_timeo; | ||
1208 | chip->erase_suspended = 0; | ||
1209 | chip->write_suspended = 0; | ||
1210 | } | ||
1202 | } | 1211 | } |
1203 | 1212 | ||
1204 | /* Done and happy. */ | 1213 | /* Done and happy. */ |
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index f7fcc6389533..a972cc6be436 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 1b720cc571f3..d4714dd9f7ab 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 a4463a91ce31..c418e92e1d92 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 72e0022a47bf..0ee457018016 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 2174c97549f0..c85760968227 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 d338b8c92780..f061885b2812 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> |
@@ -71,8 +70,8 @@ static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chi | |||
71 | interleave and device type, etc. */ | 70 | interleave and device type, etc. */ |
72 | if (!genprobe_new_chip(map, cp, &cfi)) { | 71 | if (!genprobe_new_chip(map, cp, &cfi)) { |
73 | /* The probe didn't like it */ | 72 | /* The probe didn't like it */ |
74 | printk(KERN_DEBUG "%s: Found no %s device at location zero\n", | 73 | pr_debug("%s: Found no %s device at location zero\n", |
75 | cp->name, map->name); | 74 | cp->name, map->name); |
76 | return NULL; | 75 | return NULL; |
77 | } | 76 | } |
78 | 77 | ||
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index aa07575eb288..dbba5abf0db8 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 |
@@ -191,6 +200,7 @@ enum uaddr { | |||
191 | MTD_UADDR_0x0555_0x0AAA, | 200 | MTD_UADDR_0x0555_0x0AAA, |
192 | MTD_UADDR_0x5555_0x2AAA, | 201 | MTD_UADDR_0x5555_0x2AAA, |
193 | MTD_UADDR_0x0AAA_0x0555, | 202 | MTD_UADDR_0x0AAA_0x0555, |
203 | MTD_UADDR_0xAAAA_0x5555, | ||
194 | MTD_UADDR_DONT_CARE, /* Requires an arbitrary address */ | 204 | MTD_UADDR_DONT_CARE, /* Requires an arbitrary address */ |
195 | MTD_UADDR_UNNECESSARY, /* Does not require any address */ | 205 | MTD_UADDR_UNNECESSARY, /* Does not require any address */ |
196 | }; | 206 | }; |
@@ -238,6 +248,11 @@ static const struct unlock_addr unlock_addrs[] = { | |||
238 | .addr2 = 0x0555 | 248 | .addr2 = 0x0555 |
239 | }, | 249 | }, |
240 | 250 | ||
251 | [MTD_UADDR_0xAAAA_0x5555] = { | ||
252 | .addr1 = 0xaaaa, | ||
253 | .addr2 = 0x5555 | ||
254 | }, | ||
255 | |||
241 | [MTD_UADDR_DONT_CARE] = { | 256 | [MTD_UADDR_DONT_CARE] = { |
242 | .addr1 = 0x0000, /* Doesn't matter which address */ | 257 | .addr1 = 0x0000, /* Doesn't matter which address */ |
243 | .addr2 = 0x0000 /* is used - must be last entry */ | 258 | .addr2 = 0x0000 /* is used - must be last entry */ |
@@ -522,6 +537,36 @@ static const struct amd_flash_info jedec_table[] = { | |||
522 | ERASEINFO(0x04000,1), | 537 | ERASEINFO(0x04000,1), |
523 | } | 538 | } |
524 | }, { | 539 | }, { |
540 | .mfr_id = MANUFACTURER_AMD, | ||
541 | .dev_id = AM29SL800DT, | ||
542 | .name = "AMD AM29SL800DT", | ||
543 | .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8, | ||
544 | .uaddr = MTD_UADDR_0x0AAA_0x0555, | ||
545 | .dev_size = SIZE_1MiB, | ||
546 | .cmd_set = P_ID_AMD_STD, | ||
547 | .nr_regions = 4, | ||
548 | .regions = { | ||
549 | ERASEINFO(0x10000,15), | ||
550 | ERASEINFO(0x08000,1), | ||
551 | ERASEINFO(0x02000,2), | ||
552 | ERASEINFO(0x04000,1), | ||
553 | } | ||
554 | }, { | ||
555 | .mfr_id = MANUFACTURER_AMD, | ||
556 | .dev_id = AM29SL800DB, | ||
557 | .name = "AMD AM29SL800DB", | ||
558 | .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8, | ||
559 | .uaddr = MTD_UADDR_0x0AAA_0x0555, | ||
560 | .dev_size = SIZE_1MiB, | ||
561 | .cmd_set = P_ID_AMD_STD, | ||
562 | .nr_regions = 4, | ||
563 | .regions = { | ||
564 | ERASEINFO(0x04000,1), | ||
565 | ERASEINFO(0x02000,2), | ||
566 | ERASEINFO(0x08000,1), | ||
567 | ERASEINFO(0x10000,15), | ||
568 | } | ||
569 | }, { | ||
525 | .mfr_id = MANUFACTURER_ATMEL, | 570 | .mfr_id = MANUFACTURER_ATMEL, |
526 | .dev_id = AT49BV512, | 571 | .dev_id = AT49BV512, |
527 | .name = "Atmel AT49BV512", | 572 | .name = "Atmel AT49BV512", |
@@ -599,6 +644,36 @@ static const struct amd_flash_info jedec_table[] = { | |||
599 | ERASEINFO(0x02000,8) | 644 | ERASEINFO(0x02000,8) |
600 | } | 645 | } |
601 | }, { | 646 | }, { |
647 | .mfr_id = MANUFACTURER_EON, | ||
648 | .dev_id = EN29SL800BT, | ||
649 | .name = "Eon EN29SL800BT", | ||
650 | .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8, | ||
651 | .uaddr = MTD_UADDR_0x0AAA_0x0555, | ||
652 | .dev_size = SIZE_1MiB, | ||
653 | .cmd_set = P_ID_AMD_STD, | ||
654 | .nr_regions = 4, | ||
655 | .regions = { | ||
656 | ERASEINFO(0x10000,15), | ||
657 | ERASEINFO(0x08000,1), | ||
658 | ERASEINFO(0x02000,2), | ||
659 | ERASEINFO(0x04000,1), | ||
660 | } | ||
661 | }, { | ||
662 | .mfr_id = MANUFACTURER_EON, | ||
663 | .dev_id = EN29SL800BB, | ||
664 | .name = "Eon EN29SL800BB", | ||
665 | .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8, | ||
666 | .uaddr = MTD_UADDR_0x0AAA_0x0555, | ||
667 | .dev_size = SIZE_1MiB, | ||
668 | .cmd_set = P_ID_AMD_STD, | ||
669 | .nr_regions = 4, | ||
670 | .regions = { | ||
671 | ERASEINFO(0x04000,1), | ||
672 | ERASEINFO(0x02000,2), | ||
673 | ERASEINFO(0x08000,1), | ||
674 | ERASEINFO(0x10000,15), | ||
675 | } | ||
676 | }, { | ||
602 | .mfr_id = MANUFACTURER_FUJITSU, | 677 | .mfr_id = MANUFACTURER_FUJITSU, |
603 | .dev_id = MBM29F040C, | 678 | .dev_id = MBM29F040C, |
604 | .name = "Fujitsu MBM29F040C", | 679 | .name = "Fujitsu MBM29F040C", |
@@ -1392,8 +1467,8 @@ static const struct amd_flash_info jedec_table[] = { | |||
1392 | .mfr_id = MANUFACTURER_SST, /* should be CFI */ | 1467 | .mfr_id = MANUFACTURER_SST, /* should be CFI */ |
1393 | .dev_id = SST39LF160, | 1468 | .dev_id = SST39LF160, |
1394 | .name = "SST 39LF160", | 1469 | .name = "SST 39LF160", |
1395 | .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8, | 1470 | .devtypes = CFI_DEVICETYPE_X16, |
1396 | .uaddr = MTD_UADDR_0x5555_0x2AAA, /* ???? */ | 1471 | .uaddr = MTD_UADDR_0xAAAA_0x5555, |
1397 | .dev_size = SIZE_2MiB, | 1472 | .dev_size = SIZE_2MiB, |
1398 | .cmd_set = P_ID_AMD_STD, | 1473 | .cmd_set = P_ID_AMD_STD, |
1399 | .nr_regions = 2, | 1474 | .nr_regions = 2, |
@@ -1405,8 +1480,8 @@ static const struct amd_flash_info jedec_table[] = { | |||
1405 | .mfr_id = MANUFACTURER_SST, /* should be CFI */ | 1480 | .mfr_id = MANUFACTURER_SST, /* should be CFI */ |
1406 | .dev_id = SST39VF1601, | 1481 | .dev_id = SST39VF1601, |
1407 | .name = "SST 39VF1601", | 1482 | .name = "SST 39VF1601", |
1408 | .devtypes = CFI_DEVICETYPE_X16|CFI_DEVICETYPE_X8, | 1483 | .devtypes = CFI_DEVICETYPE_X16, |
1409 | .uaddr = MTD_UADDR_0x5555_0x2AAA, /* ???? */ | 1484 | .uaddr = MTD_UADDR_0xAAAA_0x5555, |
1410 | .dev_size = SIZE_2MiB, | 1485 | .dev_size = SIZE_2MiB, |
1411 | .cmd_set = P_ID_AMD_STD, | 1486 | .cmd_set = P_ID_AMD_STD, |
1412 | .nr_regions = 2, | 1487 | .nr_regions = 2, |
@@ -1590,6 +1665,36 @@ static const struct amd_flash_info jedec_table[] = { | |||
1590 | .nr_regions = 1, | 1665 | .nr_regions = 1, |
1591 | .regions = { | 1666 | .regions = { |
1592 | ERASEINFO(0x10000,16), | 1667 | ERASEINFO(0x10000,16), |
1668 | }, | ||
1669 | }, { | ||
1670 | .mfr_id = MANUFACTURER_ST, | ||
1671 | .dev_id = M50FLW080A, | ||
1672 | .name = "ST M50FLW080A", | ||
1673 | .devtypes = CFI_DEVICETYPE_X8, | ||
1674 | .uaddr = MTD_UADDR_UNNECESSARY, | ||
1675 | .dev_size = SIZE_1MiB, | ||
1676 | .cmd_set = P_ID_INTEL_EXT, | ||
1677 | .nr_regions = 4, | ||
1678 | .regions = { | ||
1679 | ERASEINFO(0x1000,16), | ||
1680 | ERASEINFO(0x10000,13), | ||
1681 | ERASEINFO(0x1000,16), | ||
1682 | ERASEINFO(0x1000,16), | ||
1683 | } | ||
1684 | }, { | ||
1685 | .mfr_id = MANUFACTURER_ST, | ||
1686 | .dev_id = M50FLW080B, | ||
1687 | .name = "ST M50FLW080B", | ||
1688 | .devtypes = CFI_DEVICETYPE_X8, | ||
1689 | .uaddr = MTD_UADDR_UNNECESSARY, | ||
1690 | .dev_size = SIZE_1MiB, | ||
1691 | .cmd_set = P_ID_INTEL_EXT, | ||
1692 | .nr_regions = 4, | ||
1693 | .regions = { | ||
1694 | ERASEINFO(0x1000,16), | ||
1695 | ERASEINFO(0x1000,16), | ||
1696 | ERASEINFO(0x10000,13), | ||
1697 | ERASEINFO(0x1000,16), | ||
1593 | } | 1698 | } |
1594 | }, { | 1699 | }, { |
1595 | .mfr_id = MANUFACTURER_TOSHIBA, | 1700 | .mfr_id = MANUFACTURER_TOSHIBA, |
@@ -1696,9 +1801,21 @@ static inline u32 jedec_read_mfr(struct map_info *map, uint32_t base, | |||
1696 | { | 1801 | { |
1697 | map_word result; | 1802 | map_word result; |
1698 | unsigned long mask; | 1803 | unsigned long mask; |
1699 | u32 ofs = cfi_build_cmd_addr(0, cfi_interleave(cfi), cfi->device_type); | 1804 | int bank = 0; |
1700 | mask = (1 << (cfi->device_type * 8)) -1; | 1805 | |
1701 | result = map_read(map, base + ofs); | 1806 | /* According to JEDEC "Standard Manufacturer's Identification Code" |
1807 | * (http://www.jedec.org/download/search/jep106W.pdf) | ||
1808 | * several first banks can contain 0x7f instead of actual ID | ||
1809 | */ | ||
1810 | do { | ||
1811 | uint32_t ofs = cfi_build_cmd_addr(0 + (bank << 8), | ||
1812 | cfi_interleave(cfi), | ||
1813 | cfi->device_type); | ||
1814 | mask = (1 << (cfi->device_type * 8)) - 1; | ||
1815 | result = map_read(map, base + ofs); | ||
1816 | bank++; | ||
1817 | } while ((result.x[0] & mask) == CONTINUATION_CODE); | ||
1818 | |||
1702 | return result.x[0] & mask; | 1819 | return result.x[0] & mask; |
1703 | } | 1820 | } |
1704 | 1821 | ||
diff --git a/drivers/mtd/chips/map_absent.c b/drivers/mtd/chips/map_absent.c index fc478c0f93f5..494d30d0631a 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 5cb6d5263661..072dd8abf33a 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 cb27f855074c..821d0ed6bae3 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> |