Peter Stuge wrote:
> On Sat, Jun 28, 2008 at 06:38:01PM +0200, Peter Stuge wrote:
>>> Unfortunately this patch broke flashrom on ICH7 not using SPI for
>> at least one user as reported on IRC just now. :(
>>> ..
>>> I asked the reporter to send a message to flashrom@ and I got a
>> promise about testing patches to fix the problem. :)
>>>> I had an idea. The attached patch fixes flashrom 3393 on non-SPI ICH7
> at least for the reporter.
>> The second hunk is needed for me to be able to compile flashrom with
> gcc 4.2.2. That should teach me to build test before I ack. Also
> there seems to be a bit of whitespace damage in the 3393 patch.
>
Yes, that fix is fine, thanks.
I was having a cleanup of the whole SPI/LPC bus handling in mind:
we have _1_ global variable (per instance of "flashes"?) instead of one
per supported chipset.
This variable is an ENUM
enum flash_bus {
FLASH_BUS_LPC,
FLASH_BUS_ICH7_SPI,
FLASH_BUS_ICH9_SPI,
FLASH_BUS_VIA_SPI,
FLASH_BUS_IT87_SPI
}
I think this matches the physical actualities much better than the
design-less hack that is used at the moment. Also the code could be much
nicer in many places, as we could use case statements instead of endless
if () else if () else if() statements
But even without this:
Instead of unconditionally setting ich7_detected, it should only be
conditionally set if bbs == 1 (SPI) because the flag really means
"spi_strapping_detected_on_ich7"
--
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.de • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866