aboutsummaryrefslogtreecommitdiff
path: root/util/flashrom/flash.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2007-12-31 01:49:00 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2007-12-31 01:49:00 +0000
commit85acc09786fe1d3873cda0bba61b30a798071add (patch)
tree63c8728af15be7d552719c30d398ce16385d361b /util/flashrom/flash.h
parent1704179acdc62da788e12474523fe89dea9fc920 (diff)
Add continuation ID support to jedec.c
The continuation ID code does not go further than checking for IDs of the type 0x7fXX, but does this for vendor and product ID. The current published JEDEC spec has a list where the largest vendor ID is 7 bytes long, but all leading bytes are 0x7f. The list will grow in the future, and using a 64bit variable will not be enough anymore. Besides that, it seems that the location of the ID byte after the first continuation ID byte is very vendor specific, so we may have to revisit that code some time in the future. (Suggestion for a new encoding: Use a two-byte data type for the ID, the lower byte contains the only non-0x7f byte, the upper byte contains the number of 0x7f bytes used as prefix, which is the bank number minus 1 the vendor ID appears in.) Add support for EON EN29F002AT. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Corey Osgood <corey.osgood@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3030 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/flash.h')
-rw-r--r--util/flashrom/flash.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/util/flashrom/flash.h b/util/flashrom/flash.h
index d8a86dd056..d7c659791d 100644
--- a/util/flashrom/flash.h
+++ b/util/flashrom/flash.h
@@ -32,8 +32,12 @@
struct flashchip {
const char *name;
- int manufacture_id;
- int model_id;
+ /* With 32bit manufacture_id and model_id we can cover IDs up to
+ * (including) the 4th bank of JEDEC JEP106W Standard Manufacturer's
+ * Identification code.
+ */
+ uint32_t manufacture_id;
+ uint32_t model_id;
int total_size;
int page_size;
@@ -85,8 +89,14 @@ extern struct flashchip flashchips[];
/*
* EN25 chips are SPI, first byte of device ID is memory type,
* second byte of device ID is log(bitsize)-9.
+ * Vendor and device ID of EN29 series are both prefixed with 0x7F, which
+ * is the continuation code for IDs in bank 2.
+ * Vendor ID of EN25 series is NOT prefixed with 0x7F, this results in
+ * a collision with Mitsubishi. Mitsubishi once manufactured flash chips.
+ * Let's hope they are not manufacturing SPI flash chips as well.
*/
-#define EON_ID 0x1C /* EON Silicon Devices */
+#define EON_ID 0x7F1C /* EON Silicon Devices */
+#define EON_ID_NOPREFIX 0x1C /* EON, missing 0x7F prefix */
#define EN_25B05 0x2010 /* 2^19 kbit or 2^16 kByte */
#define EN_25B10 0x2011
#define EN_25B20 0x2012
@@ -94,6 +104,13 @@ extern struct flashchip flashchips[];
#define EN_25B80 0x2014
#define EN_25B16 0x2015
#define EN_25B32 0x2016
+#define EN_29F512 0x7F21
+#define EN_29F010 0x7F20
+#define EN_29F040A 0x7F04
+#define EN_29LV010 0x7F6E
+#define EN_29LV040A 0x7F4F /* EN_29LV040(A) */
+#define EN_29F002AT 0x7F92
+#define EN_29F002AB 0x7F97
#define FUJITSU_ID 0x04 /* Fujitsu */
/* MBM29F400TC_STRANGE has a value not mentioned in the data sheet and we