see patch.
Patch also fixes an all-space indent to tab-based indent with chip M29W512B
On 18.03.2010 23:21, Sean Nelson wrote:
change chip specific functions towards functions found in 82820ab.c
Please rework (see below).
change unprotect_28sf040(chipaddr bios) to unlock_28sf040(struct flashchip *flash)
OK.
add unlock_stm50flw0x0x
OK.
Signed-off-by: Sean Nelson audiohacked@gmail.com
Sorry, this needs more work. erase_block_stm50flw0x0x -> erase_82802ab_block is an invalid conversion because erase_82802ab_block has included unlocking code and erase_block_stm50flw0x0x doesn't have that code. One possible option is to remove the unlocking stuff from the 82802 function and create a wrapper erase_82802ab_block that unlocks and then calls erase_82802ab_block_without_unlock. The replacement would then be erase_block_stm50flw0x0x -> erase_82802ab_block_without_unlock (well, my naming suggestions are to be taken with a pinch of salt). Similar problems exist with write_stm50flw0x0x -> write_82802ab. Oh well. I just sent a patch which should eliminate most of my concerns above. I'm open to acking your patch once we have a clear way forward which doesn't involve breaking unlocking.
I didn't review the SST49 and SHARPLHF stuff yet.
Regards, Carl-Daniel
On 19.03.2010 04:13, Carl-Daniel Hailfinger wrote:
On 18.03.2010 23:21, Sean Nelson wrote:
change chip specific functions towards functions found in 82820ab.c
[...] I'm open to acking your patch once we have a clear way forward which doesn't involve breaking unlocking.
I didn't review the SST49 and SHARPLHF stuff yet.
Just in case anyone out there wants a summary of the flashchips.c changes, here they are:
SHARP_LHF00L04 erase_lhf00l04_block -> erase_82802ab_block write_lhf00l04 -> write_82802ab
SST_28SF040 -> unlock_28sf040
SST_49LF004C -> unlock_49lfxxxc
SST_49LF008C -> unlock_49lfxxxc
SST_49LF016C -> unlock_49lfxxxc
ST_M50FLW040A erase_block_stm50flw0x0x -> erase_82802ab_block write_stm50flw0x0x -> write_82802ab -> unlock_stm50flw0x0x
ST_M50FLW040B erase_block_stm50flw0x0x -> erase_82802ab_block write_stm50flw0x0x -> write_82802ab -> unlock_stm50flw0x0x ST_M50FLW080A erase_block_stm50flw0x0x -> erase_82802ab_block write_stm50flw0x0x -> write_82802ab -> unlock_stm50flw0x0x
ST_M50FLW080B erase_block_stm50flw0x0x -> erase_82802ab_block write_stm50flw0x0x -> write_82802ab -> unlock_stm50flw0x0x
ST_M50FW002 erase_block_stm50flw0x0x -> erase_82802ab_block write_stm50flw0x0x -> write_82802ab -> unlock_stm50flw0x0x
ST_M50FW016 erase_block_stm50flw0x0x -> erase_82802ab_block write_stm50flw0x0x -> write_82802ab -> unlock_stm50flw0x0x
ST_M50FW040 erase_block_stm50flw0x0x -> erase_82802ab_block write_stm50flw0x0x -> write_82802ab -> unlock_stm50flw0x0x
ST_M50FW080 erase_block_stm50flw0x0x -> erase_82802ab_block write_stm50flw0x0x -> write_82802ab -> unlock_stm50flw0x0x
ST_M50LPW116 erase_block_stm50flw0x0x -> erase_82802ab_block write_stm50flw0x0x -> write_82802ab -> unlock_stm50flw0x0x
Regards, Carl-Daniel