[flashrom] [PATCH] 82802ab and stm50flw0x0x cleanup

Sean Nelson audiohacked at gmail.com
Sat Mar 20 16:01:26 CET 2010


On 3/20/10 1:59 AM, Michael Karcher wrote:
> Am Freitag, den 19.03.2010, 10:54 -0700 schrieb Sean Nelson:
>    
>> +int unlock_82802ab(struct flashchip *flash)
>> +{
>> +       int i;
>> +       //chipaddr wrprotect = flash->virtual_registers + page + 2;
>> +
>> +       for (i = 0; i<  flash->total_size; i+= flash->page_size)
>> +       {
>> +               chip_writeb(0, flash->virtual_registers + i + 2);
>> +       }
>> +
>> +       return 0;
>> +}
>>      
> Sorry for rushing in so late. This is wrong.
>
> flash->total_size is in kilobytes, and flas->page_size is in bytes.
>
> Regards,
>    Michael Karcher
>
>    
You're right! Here's a patch fix.
Signed-off-by: Sean Nelson <audiohacked at gmail.com>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 82802ab-unlock-fix.diff
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20100320/cd62d4eb/attachment.ksh>


More information about the flashrom mailing list