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
commitb22918cadc5ba07c037935644f8c6dcef0583e23 (patch)
treec2fd7bff346e61d3433a0c0e2fe66b7173e482de /it87spi.c
parent3504b539bfa33693510d83402a344b1eafd7a592 (diff)
downloadflashrom-b22918cadc5ba07c037935644f8c6dcef0583e23.tar.gz
flashrom-b22918cadc5ba07c037935644f8c6dcef0583e23.tar.bz2
flashrom-b22918cadc5ba07c037935644f8c6dcef0583e23.zip
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. Corresponding to flashrom svn r560. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Tested on real hardware and 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 d9f93e632..2528b91b0 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;
}
/*