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 --- flash.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'flash.h') diff --git a/flash.h b/flash.h index ff84602f..6f0d7c06 100644 --- a/flash.h +++ b/flash.h @@ -69,8 +69,9 @@ enum chipbustype { /* * How many different erase functions do we have per chip? + * Atmel AT25FS010 has 6 different functions. */ -#define NUM_ERASEFUNCTIONS 5 +#define NUM_ERASEFUNCTIONS 6 #define FEATURE_REGISTERMAP (1 << 0) #define FEATURE_BYTEWRITES (1 << 1) @@ -82,6 +83,9 @@ enum chipbustype { #define FEATURE_ADDR_2AA (1 << 2) #define FEATURE_ADDR_AAA (2 << 2) #define FEATURE_ADDR_SHIFTED (1 << 5) +#define FEATURE_WRSR_EWSR (1 << 6) +#define FEATURE_WRSR_WREN (1 << 7) +#define FEATURE_WRSR_EITHER (FEATURE_WRSR_EWSR | FEATURE_WRSR_WREN) struct flashchip { const char *vendor; -- cgit v1.2.3