From fd7075ae75c04df49f61a7617e772c54e0b4984d Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Thu, 29 Jul 2010 13:09:18 +0000 Subject: 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 --- chipdrivers.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'chipdrivers.h') diff --git a/chipdrivers.h b/chipdrivers.h index 9e7af2dc..119ea700 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); -- cgit v1.2.3