diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2007-09-28 15:02:17 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2007-09-28 15:02:17 +0000 |
commit | 5f45fc234fd37d88d387a192ba748e116f5b9d16 (patch) | |
tree | a0fea4ec8d55b709a997662377484e0bf4ffc2e8 /util/superiotool | |
parent | 7fe8f5da4d127bb4538e95cab14cd9ee07d33690 (diff) |
Fix up the SMSC detection code to probe _both_ old- and new-style
Super I/Os from SMSC. Otherwise not all of them are detected (and there
could theoretically be _two_ of them in a system, so we should probe
for both types anyway).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2812 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool')
-rw-r--r-- | util/superiotool/smsc.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/util/superiotool/smsc.c b/util/superiotool/smsc.c index c2fed31193..64995c2a6c 100644 --- a/util/superiotool/smsc.c +++ b/util/superiotool/smsc.c @@ -129,22 +129,15 @@ static void exit_conf_mode_smsc(uint16_t port) outb(0xaa, port); } -void probe_idregs_smsc(uint16_t port) +static void probe_idregs_smsc_helper(uint16_t port, uint8_t idreg, + uint8_t revreg) { uint8_t id, rev; enter_conf_mode_smsc(port); - /* Check for older SMSC Super I/Os. */ - id = regval(port, DEVICE_ID_REG_OLD); - rev = regval(port, DEVICE_REV_REG_OLD); - - if (superio_unknown(reg_table, id)) - no_superio_found(port); - - /* Check for newer SMSC Super I/Os. */ - id = regval(port, DEVICE_ID_REG); - rev = regval(port, DEVICE_REV_REG); + id = regval(port, idreg); + rev = regval(port, revreg); if (superio_unknown(reg_table, id)) { no_superio_found(port); @@ -162,3 +155,9 @@ void probe_idregs_smsc(uint16_t port) exit_conf_mode_smsc(port); } +void probe_idregs_smsc(uint16_t port) +{ + probe_idregs_smsc_helper(port, DEVICE_ID_REG, DEVICE_REV_REG); + probe_idregs_smsc_helper(port, DEVICE_ID_REG_OLD, DEVICE_REV_REG_OLD); +} + |