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

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Jul 29 15:12:26 CEST 2010


On 29.07.2010 14:12, Uwe Hermann wrote:
> 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>
>   

Thanks.


> 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?
>   

I've seen 60-85 ms delays in various datasheets. Some chips may require
more. 100 ms should be a safe bet for now, but I will send a followup
patch which adds WIP polling.


>> +	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.
>   

Please see above.

Thanks for the review, committed in r1115.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list