[flashrom] [PATCH] fwhub minimal cleanup/consolidation
c-d.hailfinger.devel.2006 at gmx.net
Fri Mar 19 04:13:00 CET 2010
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)
> add unlock_stm50flw0x0x
> Signed-off-by: Sean Nelson <audiohacked at 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.
"I do consider assignment statements and pointer variables to be among
computer science's most valuable treasures."
-- Donald E. Knuth
More information about the flashrom