util/superiotool: recognize a VT1211 LPC superio
Change-Id: I2c24c347c3e044397944ca2abbceb36f83483daf Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-on: https://review.coreboot.org/22253 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
00a455c8a7
commit
2f6a29e2e6
|
@ -249,7 +249,7 @@ static const struct {
|
||||||
{probe_idregs_smsc, {0x2e, 0x4e, 0x162e, 0x164e, 0x3f0, 0x370, EOT}},
|
{probe_idregs_smsc, {0x2e, 0x4e, 0x162e, 0x164e, 0x3f0, 0x370, EOT}},
|
||||||
{probe_idregs_winbond, {0x2e, 0x4e, 0x3f0, 0x370, 0x250, EOT}},
|
{probe_idregs_winbond, {0x2e, 0x4e, 0x3f0, 0x370, 0x250, EOT}},
|
||||||
#ifdef PCI_SUPPORT
|
#ifdef PCI_SUPPORT
|
||||||
{probe_idregs_via, {0x3f0, EOT}},
|
{probe_idregs_via, {0x2e, 0x4e, 0x3f0, EOT}},
|
||||||
/* in fact read the BASE from HW */
|
/* in fact read the BASE from HW */
|
||||||
{probe_idregs_amd, {0xaa, EOT}},
|
{probe_idregs_amd, {0xaa, EOT}},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,8 +19,11 @@
|
||||||
#define DEVICE_ID_VT82C686_REG 0xe0
|
#define DEVICE_ID_VT82C686_REG 0xe0
|
||||||
#define DEVICE_REV_VT82C686_REG 0xe1
|
#define DEVICE_REV_VT82C686_REG 0xe1
|
||||||
|
|
||||||
|
#define DEVICE_ID_VT1211_REG 0x20
|
||||||
|
#define DEVICE_REV_VT1211_REG 0x21
|
||||||
|
|
||||||
static const struct superio_registers reg_table[] = {
|
static const struct superio_registers reg_table[] = {
|
||||||
{0x3c, "VT82C686A/VT82C686B", {
|
{0x3c, "VT82C686A/VT82C686B/VT1211", {
|
||||||
{EOT}}},
|
{EOT}}},
|
||||||
{EOT}
|
{EOT}
|
||||||
};
|
};
|
||||||
|
@ -74,8 +77,8 @@ void probe_idregs_via(uint16_t port)
|
||||||
uint16_t id;
|
uint16_t id;
|
||||||
uint8_t rev;
|
uint8_t rev;
|
||||||
|
|
||||||
probing_for("VIA", "", port);
|
if (port == 0x3f0) {
|
||||||
|
probing_for("VIA", "(init=vt82c686)", port);
|
||||||
if (enter_conf_mode_via_vt82c686())
|
if (enter_conf_mode_via_vt82c686())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -85,15 +88,32 @@ void probe_idregs_via(uint16_t port)
|
||||||
if (superio_unknown(reg_table, id)) {
|
if (superio_unknown(reg_table, id)) {
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev);
|
printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev);
|
||||||
exit_conf_mode_via_vt82c686();
|
} else {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("Found VIA %s (id=0x%04x, rev=0x%02x) at 0x%x\n",
|
printf("Found VIA %s (id=0x%04x, rev=0x%02x) at 0x%x\n",
|
||||||
get_superio_name(reg_table, id), id, rev, port);
|
get_superio_name(reg_table, id), id, rev, port);
|
||||||
chip_found = 1;
|
chip_found = 1;
|
||||||
|
}
|
||||||
exit_conf_mode_via_vt82c686();
|
exit_conf_mode_via_vt82c686();
|
||||||
|
if (chip_found)
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
probing_for("VIA", "(init=0x87,0x87)", port);
|
||||||
|
enter_conf_mode_winbond_fintek_ite_8787(port);
|
||||||
|
|
||||||
|
id = regval(port, DEVICE_ID_VT1211_REG);
|
||||||
|
rev = regval(port, DEVICE_REV_VT1211_REG);
|
||||||
|
|
||||||
|
if (superio_unknown(reg_table, id)) {
|
||||||
|
if (verbose)
|
||||||
|
printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev);
|
||||||
|
} else {
|
||||||
|
printf("Found VIA %s (id=0x%04x, rev=0x%02x) at 0x%x\n",
|
||||||
|
get_superio_name(reg_table, id), id, rev, port);
|
||||||
|
chip_found = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exit_conf_mode_winbond_fintek_ite_8787(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_via_chips(void)
|
void print_via_chips(void)
|
||||||
|
|
Loading…
Reference in New Issue