[coreboot] flashrom: probe_flash() cleanup and remove false positive unknown .. SPI chip
c-d.hailfinger.devel.2006 at gmx.net
Wed Jul 2 03:20:36 CEST 2008
On 02.07.2008 01:20, Peter Stuge wrote:
> flashrom: probe_flash() cleanup and remove false positive unknown .. SPI chip
> Restructure probe_flash() for some readability, and now only find an unknown
> .. SPI chip if it is the first flash chip found in the system.
> This also removes the true positive match when there is more than one flash
> chip and the 2nd or 3rd are unknown but I think that case is uncommon enough
> to warrant this improvement for the common case. The uncommon case can still
> use the -frc forced read.
> Signed-off-by: Peter Stuge <peter at stuge.se>
Hm. AFAICS this collides with the cleanups Stefan wanted to do.
The evolution of flashrom is somewhat funny:
1. worked perfectly as long as only one flash chip was present, no false
2. multiple flash chip support was added, false generic positives for
all SPI chips occured
3. cleanup/fix/bandaid for the code either improves functionality and
reduces readability or the other way round
4. repeat step 3
As long as we don't perform per-bus/address probing (where appropriate),
there will be no real fix for readability nor functionality.
Stefan's cleanup queue looks very promising, though.
Peter, can you hold this patch for a few more days until Stefan had time
to send part 2 of his cleanup stuff? I believe that will simplify the
code greatly, while fixing the "unknown chip" problem permanently.
More information about the coreboot