[flashrom] [PATCH] Write protection handling for Atmel AT25*

Uwe Hermann uwe at hermann-uwe.de
Thu Jul 29 14:12:21 CEST 2010


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 at gmx.net>

Looks good.

Acked-by: Uwe Hermann <uwe at 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.
-- 
http://hermann-uwe.de     | http://sigrok.org
http://randomprojects.org | http://unmaintained-free-software.org




More information about the flashrom mailing list