diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-06-01 02:08:58 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-06-01 02:08:58 +0000 |
commit | 9747d578974e0f6dd0e0e99f7708eaf54ff12f6d (patch) | |
tree | c2fd7bff346e61d3433a0c0e2fe66b7173e482de /it87spi.c | |
parent | 526ee2e8dd3cfd4771f808137287fc041ddee46e (diff) | |
download | flashrom-9747d578974e0f6dd0e0e99f7708eaf54ff12f6d.zip flashrom-9747d578974e0f6dd0e0e99f7708eaf54ff12f6d.tar.gz |
Only probe for chips with compatible bus protocols
It doesn't make sense to probe for SPI chips on a LPC host, nor does it
make sense to probe for LPC chips on a Parallel host.
This change is backwards compatible, but adding host protocol info to
chipset init functions will speed up probing.
Once all chipset init functions are updated and the Winbond W29EE011 and
AMIC A49LF040A chip definitions are updated, the W29EE011 workaround can
be deleted as the W29/A49 conflict magically disappears.
Tested on real hardware and
Corresponding to flashrom svn r560.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'it87spi.c')
-rw-r--r-- | it87spi.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -109,14 +109,23 @@ int it87spi_common_init(void) int it87spi_init(void) { - get_io_perms(); + int ret; - return it87spi_common_init(); + get_io_perms(); + ret = it87spi_common_init(); + if (!ret) + buses_supported = CHIP_BUSTYPE_SPI; + return ret; } int it87xx_probe_spi_flash(const char *name) { - return it87spi_common_init(); + int ret; + + ret = it87spi_common_init(); + if (!ret) + buses_supported |= CHIP_BUSTYPE_SPI; + return ret; } /* |