[flashrom] [PATCH] Convert chips to block erasers: ST

Michael Karcher flashrom at mkarcher.dialup.fu-berlin.de
Tue Jan 19 11:45:43 CET 2010


Am Dienstag, den 19.01.2010, 11:36 +0100 schrieb Carl-Daniel Hailfinger:
> > +				.eraseblocks = {
> > +					{4 * 1024, 16},  /* sector */
> > +					{64 * 1024, 5}, /* block */
> > +					{4 * 1024, 16}, /* sector */
> > +					{4 * 1024, 16}, /* sector */
> > +				},
> > +				.block_erase = NULL,

> It might be a good idea to change the line
> 
> {64 * 1024, 5},
> 
> to
> 
> {320 * 1024, -1},
> 
> once flashrom can deal with negative sizes and interpret them as
> "function does not apply to this area".
I really like that idea, although it may make block walking harder. The
idea is to have the walking code centralized, so it shouldn't matter
that much.

On the other hand, things get messy if you have partly overlapping erase
blocks in different erase functions, but I think this is just a "don't
do it then" issue. I can't imagine any sane flash chip that would have
partly overlapping erase blocks.

> Or we create a special erase
> function which does different things based on eraseblock size/location.
And don't like this one, as these functions probably get chip specific,
and currently we are heading to kill chip specific functions, don't we?

Regards,
  Michael Karcher





More information about the flashrom mailing list