On Tue, Jul 27, 2010 at 12:47:47AM +0200, Carl-Daniel Hailfinger wrote:
Next try, with one status register printing corner case fixed and with a better changelog.
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@gmx.net
Looks good.
Acked-by: Uwe Hermann uwe@hermann-uwe.de
I have to admit that I did _not_ cross-check the bits against the datasheet, though. It's compile-tested, however.
- /* WRSR performs a self-timed erase before the changes take effect. */
- programmer_delay(100 * 1000);
Why 100ms here? Is that mentioned in some datasheet or standardized or estimated? Is it the same for all chips?
- result = spi_send_multicommand(cmds);
- if (result) {
msg_cerr("%s failed during command execution\n",
__func__);
- }
- /* WRSR performs a self-timed erase before the changes take effect. */
- programmer_delay(100 * 1000);
Ditto.
Uwe.