path: root/chipdrivers.h
diff options
authorCarl-Daniel Hailfinger <>2010-07-29 13:09:18 +0000
committerCarl-Daniel Hailfinger <>2010-07-29 13:09:18 +0000
commitfd7075ae75c04df49f61a7617e772c54e0b4984d (patch)
treec95adc0c593268590615032f0d297e7190bcf2a7 /chipdrivers.h
parentf792c7d4cb43e8c34719e015f20e8049579e34af (diff)
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 <> Tested-by: Steven Rosario Acked-by: Uwe Hermann <>
Diffstat (limited to 'chipdrivers.h')
1 files changed, 10 insertions, 0 deletions
diff --git a/chipdrivers.h b/chipdrivers.h
index 9e7af2d..119ea70 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -47,7 +47,17 @@ int spi_chip_write_1_new(struct flashchip *flash, uint8_t *buf, int start, int l
int spi_chip_write_256_new(struct flashchip *flash, uint8_t *buf, int start, int len);
int spi_chip_read(struct flashchip *flash, uint8_t *buf, int start, int len);
uint8_t spi_read_status_register(void);
+int spi_prettyprint_status_register_at25df(struct flashchip *flash);
+int spi_prettyprint_status_register_at25df_sec(struct flashchip *flash);
+int spi_prettyprint_status_register_at25f(struct flashchip *flash);
+int spi_prettyprint_status_register_at25fs010(struct flashchip *flash);
+int spi_prettyprint_status_register_at25fs040(struct flashchip *flash);
int spi_disable_blockprotect(struct flashchip *flash);
+int spi_disable_blockprotect_at25df(struct flashchip *flash);
+int spi_disable_blockprotect_at25df_sec(struct flashchip *flash);
+int spi_disable_blockprotect_at25f(struct flashchip *flash);
+int spi_disable_blockprotect_at25fs010(struct flashchip *flash);
+int spi_disable_blockprotect_at25fs040(struct flashchip *flash);
int spi_byte_program(int addr, uint8_t databyte);
int spi_nbyte_program(int addr, uint8_t *bytes, int len);
int spi_nbyte_read(int addr, uint8_t *bytes, int len);
OpenPOWER on IntegriCloud