Changeset 1115 for trunk/flash.h


Ignore:
Timestamp:
Jul 29, 2010, 3:09:18 PM (4 years ago)
Author:
hailfinger
Message:

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>
Tested-by: Steven Rosario
Acked-by: Uwe Hermann <uwe@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/flash.h

    r1112 r1115  
    7070/* 
    7171 * How many different erase functions do we have per chip? 
    72  */ 
    73 #define NUM_ERASEFUNCTIONS 5 
     72 * Atmel AT25FS010 has 6 different functions. 
     73 */ 
     74#define NUM_ERASEFUNCTIONS 6 
    7475 
    7576#define FEATURE_REGISTERMAP     (1 << 0) 
     
    8384#define FEATURE_ADDR_AAA        (2 << 2) 
    8485#define FEATURE_ADDR_SHIFTED    (1 << 5) 
     86#define FEATURE_WRSR_EWSR       (1 << 6) 
     87#define FEATURE_WRSR_WREN       (1 << 7) 
     88#define FEATURE_WRSR_EITHER     (FEATURE_WRSR_EWSR | FEATURE_WRSR_WREN) 
    8589 
    8690struct flashchip { 
Note: See TracChangeset for help on using the changeset viewer.