summaryrefslogtreecommitdiffstats
path: root/spi.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2008-05-15 03:19:49 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2008-05-15 03:19:49 +0000
commit42c54971801dc1cec7c5724b5619e7731126222d (patch)
tree68c1d560242821885e66578bca46a1e6c68eb36c /spi.h
parent6dc1d3b8dc6bd226bb2530c7af8d109407faa056 (diff)
downloadflashrom-42c54971801dc1cec7c5724b5619e7731126222d.tar.gz
flashrom-42c54971801dc1cec7c5724b5619e7731126222d.tar.bz2
flashrom-42c54971801dc1cec7c5724b5619e7731126222d.zip
Add support for the JEDEC RES
Add support for the JEDEC RES (Read Electronic Signature and Resume from Powerdown) SPI command to identify older SPI chips which can't handle JEDEC RDID. Since RES gives a one-byte identifier which is shared among many different vendors and even different sizes, we want to match RES as a last resort if RDID returns 0xff 0xff 0xff. Corresponding to flashrom svn r235 and coreboot v2 svn r3320. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Peter Stuge <peter@stuge.se> This is a heavily reworked version of a patch by Fredrik Tolf, which was Signed-off-by: Fredrik Tolf <fredrik@dolda2000.com>
Diffstat (limited to 'spi.h')
-rw-r--r--spi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/spi.h b/spi.h
index 15bac4ec5..f5c877cdc 100644
--- a/spi.h
+++ b/spi.h
@@ -29,6 +29,11 @@
#define JEDEC_RDID_OUTSIZE 0x01
#define JEDEC_RDID_INSIZE 0x03
+/* Read Electronic Signature */
+#define JEDEC_RES 0xab
+#define JEDEC_RES_OUTSIZE 0x04
+#define JEDEC_RES_INSIZE 0x01
+
/* Write Enable */
#define JEDEC_WREN 0x06
#define JEDEC_WREN_OUTSIZE 0x01