On 02.07.2008 04:25, Peter Stuge wrote:
On Wed, Jul 02, 2008 at 03:20:36AM +0200, Carl-Daniel Hailfinger wrote:
The evolution of flashrom is somewhat funny:
Too many cooks, a little bitrot and that's what you get. :)
<manager>we need to enstrengthen our common vision while concentrating on a customoer-focused attitude</manager> I'd really like to discuss future flashrom design once we got version 1.0 out. There are so many things flashrom could be made to do and everybody has ideas, yet we are missing a coherent design. The good thing about this is that the flashrom design certainly won't suffer from a lack of participation.
Anyway - optimize for the common case! That means degrading in uncommon cases, which I think is fine.
One could argue that two flash chips are an uncommon case, but... point taken.
As long as we don't perform per-bus/address probing (where appropriate), there will be no real fix for readability nor functionality.
-frc can allow reading at any time if the chip is the only problem.
Multiple known chips will work reliably.
Multiple chips with 2nd or 3rd unknown will not work - but this is a highly uncommon case so I do not really care.
The price we pay for this is even more special-case code.
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 expect it to take much longer than a few days, and thus be after 1.0, which should go out the door any day now.
No offense intended, but with all this probe special-casing the code has become a lot less readable. I look forward to the per-bus probing because it will allow us to revert most of the probing code to the state directly after multiple flash chip support went in (short, easily readable code).
I believe that will simplify the code greatly, while fixing the "unknown chip" problem permanently.
I should go post a reply in the flash bus thread. I have some thoughts.
Please do! Your input on the design is very much desired.
Regards, Carl-Daniel