aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/chips')
-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
11 files changed, 120 insertions, 22 deletions
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>