[coreboot] [PATCH] flashrom: Drop duplicate write_39sf020()

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Tue May 12 15:55:27 CEST 2009


On 12.05.2009 15:46, Uwe Hermann wrote:
> See patch.
>
> We should also rename w49f002u.c in another patch to something more
> generic, that code is in no way specific to the w49f002u. Maybe
> even put the only function in that file (byte-wise JEDEC writes of one
> page/sector) into jedec.c?
>   

Sounds like a good idea. Usually, the only thing that differs between
various LPC/FWH flashes is block locking, the rest is identical. Maybe
add a function pointer to struct flashchip which takes
block_locking(struct flashchip chip, enum (LOCK, UNLOCK, CHECK) action,
int start, int len)
That would allow probably even more refactoring.

> The write_39sf020() and write_49f002() functions are identical except
> for whitespace differences, so drop one of them.
>
> Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
>   

Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Regards,
Carl-Daniel

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





More information about the coreboot mailing list