summaryrefslogtreecommitdiffstats
path: root/spi.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-07-29 13:09:18 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-07-29 13:09:18 +0000
commitfd7075ae75c04df49f61a7617e772c54e0b4984d (patch)
treec95adc0c593268590615032f0d297e7190bcf2a7 /spi.h
parentf792c7d4cb43e8c34719e015f20e8049579e34af (diff)
downloadflashrom-fd7075ae75c04df49f61a7617e772c54e0b4984d.tar.gz
flashrom-fd7075ae75c04df49f61a7617e772c54e0b4984d.tar.bz2
flashrom-fd7075ae75c04df49f61a7617e772c54e0b4984d.zip
Add detailed status register printing and unlocking for all ATMEL AT25* chips
Add support for Atmel AT25DF081A and AT25DQ161. Some chips require EWSR before WRSR, others require WREN before WRSR, and some support both variants. Add feature_bits to select the correct SPI command, and default to EWSR. Corresponding to flashrom svn r1115. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Tested-by: Steven Rosario Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'spi.h')
-rw-r--r--spi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/spi.h b/spi.h
index 383e53559..edf303ee4 100644
--- a/spi.h
+++ b/spi.h
@@ -31,7 +31,7 @@
#define JEDEC_RDID_INSIZE 0x03
/* AT25F512A has bit 3 as don't care bit in commands */
-#define AT25F512A_RDID 0x15
+#define AT25F512A_RDID 0x15 /* 0x15 or 0x1d */
#define AT25F512A_RDID_OUTSIZE 0x01
#define AT25F512A_RDID_INSIZE 0x02
@@ -123,5 +123,6 @@
#define SPI_INVALID_OPCODE -2
#define SPI_INVALID_ADDRESS -3
#define SPI_INVALID_LENGTH -4
+#define SPI_FLASHROM_BUG -5
#endif /* !__SPI_H__ */