[flashrom] [PATCH] Check if an erase is needed to write

Stefan Reinauer stepan at coresystems.de
Wed Sep 16 19:07:38 CEST 2009


Carl-Daniel Hailfinger wrote:
> For optimal partial reflashing, we have to find out which parts of the
> chip can be written without erase. For that, the only criterion (except
> a limit on the number of writes for very old chips) is whether the write
> will only clear bits (set them to 0).
> If (current&new==new) we can skip the erase.
> If any bit would have to be set to 1, we need to erase.
>
>   
Is that sufficient? Ie is it always ok to skip an erase if we're only
clearing bits?

>
>   





More information about the flashrom mailing list