[coreboot] [RFC] flashrom: Add feature bitfield
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Mon May 12 16:50:38 CEST 2008
On 12.05.2008 07:15, jtd wrote:
> On Sunday 11 May 2008 20:58, Carl-Daniel Hailfinger wrote:
>
>
>> I'd like to introduce another field into struct flashchip: u32
>> flags. flags would hold a bit for every supported (and important)
>> opcode and one bit for every variant of a supported opcode. Example
>> follows:
>>
>> #define SPIFLAG_CHIP_ERASE_60 (1<<0)
>> #define SPIFLAG_CHIP_ERASE_C7 (1<<1)
>> #define SPIFLAG_BLOCK_ERASE_52 (1<<2)
>> #define SPIFLAG_BLOCK_ERASE_D8 (1<<3)
>> #define SPIFLAG_SECTOR_ERASE_20 (1<<4)
>> #define SPIFLAG_BYTE_PROGRAM_BYTE (1<<16) //only one byte per
>> command #define SPIFLAG_BYTE_PROGRAM_PAGE (1<<17) //256 bytes per
>> command
>>
>
> AT45DB321D 32Mb (4MB) device has user configurable page size of 512 or
> 528 bytes.
>
Hey, that's evil! I have read the complete data sheet and implementing a
driver for this is going to be very painful (different command set, lots
of conditional bahviour). It can be done, but I'd like to wait until we
encounter such a chip on a mainboard. Thanks for pointing this out, though.
Regards,
Carl-Daniel
More information about the coreboot
mailing list