[flashrom] [PATCH] Print lock status for Winbond W39*
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Sun Dec 5 17:34:21 CET 2010
On 05.12.2010 00:06, Michael Karcher wrote:
> Am Samstag, den 04.12.2010, 05:25 +0100 schrieb Carl-Daniel Hailfinger:
>
>> +static int printlock_w39_wblwp(uint8_t lock)
>>
> as discussed on IRC: typo in function name.
>
Fixed.
>> +int printlock_w39v040c(struct flashchip *flash)
>> +{
>> + return printlock_w39_common(flash, 0xfff2);
>> +}
>>
> I would guess this is a typo in the datasheet, and should be 0x7fff2
> too, OTOH, that datasheet uses that address consistently and that
> address was also used in the old code. Still it should be tested on real
> hardware, and left the way you have it now.
>
I have added a comment.
>> +/* Unused because W39V040B and W39V040FB can not be distinguished from each
>> + * other based on ID.
>> + */
>>
> That comment is not true anymore.
>
>
>> +/* Unused because W39V040C and W39V040FC can not be distinguished from each
>> + * other based on ID.
>> + */
>>
> Dito.
>
Both fixed.
>> +int unlock_w39v080fa(struct flashchip *flash)
>> +{
>> + if (unlock_w39_fwh(flash))
>> + return -1;
>> + /* The soft bootblock locks may have been deactivated by the unlock
>> + * above, so check them last.
>> + */
>> + if (printlock_w39_common(flash, 0xffff2))
>> + return -1;
>> +
>> + return 0;
>> +}
>>
> I don't understand the comment in here: The w39v080fa does not have the
> software boot block lock feature if I skimmed over the datasheet
> correctly, and the software boot block lock other chips have is
> permanent and can not be cleared.
>
Yes, the comment was a leftover from another unlocking function I wanted
to write. Killed.
> Acked-by: Michael Karcher <flashrom at mkarcher.dialup.fu-berlin.de>
>
Thanks, committed in r1245.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
More information about the flashrom
mailing list