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
This commit is contained in:
parent
7fe8f5da4d
commit
5f45fc234f
@ -129,22 +129,15 @@ static void exit_conf_mode_smsc(uint16_t port)
|
|||||||
outb(0xaa, 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;
|
uint8_t id, rev;
|
||||||
|
|
||||||
enter_conf_mode_smsc(port);
|
enter_conf_mode_smsc(port);
|
||||||
|
|
||||||
/* Check for older SMSC Super I/Os. */
|
id = regval(port, idreg);
|
||||||
id = regval(port, DEVICE_ID_REG_OLD);
|
rev = regval(port, revreg);
|
||||||
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);
|
|
||||||
|
|
||||||
if (superio_unknown(reg_table, id)) {
|
if (superio_unknown(reg_table, id)) {
|
||||||
no_superio_found(port);
|
no_superio_found(port);
|
||||||
@ -162,3 +155,9 @@ void probe_idregs_smsc(uint16_t port)
|
|||||||
exit_conf_mode_smsc(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);
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user