summaryrefslogtreecommitdiffstats
path: root/it87spi.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-06-01 02:08:58 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-06-01 02:08:58 +0000
commit9747d578974e0f6dd0e0e99f7708eaf54ff12f6d (patch)
treec2fd7bff346e61d3433a0c0e2fe66b7173e482de /it87spi.c
parent526ee2e8dd3cfd4771f808137287fc041ddee46e (diff)
downloadflashrom-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.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/it87spi.c b/it87spi.c
index d9f93e6..2528b91 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -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;
}
/*
OpenPOWER on IntegriCloud