summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-10-31 09:25:18 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2018-01-15 00:42:26 +0000
commit4d1bbe99086472185a7d4df30ee3324989e17f85 (patch)
tree1b55c26efecd69d079329c89d5df7da7c04d540f /util
parent2f6a29e2e6fac16e167723b47cc0fd500770ac62 (diff)
downloadcoreboot-4d1bbe99086472185a7d4df30ee3324989e17f85.tar.xz
util/superiotool: distinguish between VT82C686 and VT1211
They both have a device id of 0x3c. The former is part of the PCI chip set accessible via port 0x3f0 while the latter is a standalone LPC chip accessible via 0x2e/0x4e depending on strapping. They're not register compatible: the VT82C686 only provides a FDC, LPT and part of UARTs. The VT82C686 documentation suggests it has revision 0x00 while the VT1211 datasheet indicates 0x01. Nevertheless, the VT1211 I happen to have hs a revision of 0x02. Thus the revision is probably not good enough to tell one from the another. Change-Id: Ic7529c84724c8d6b9eb75b863f1bceef5e4b52b5 Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-on: https://review.coreboot.org/22254 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/superiotool/via.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/util/superiotool/via.c b/util/superiotool/via.c
index 4a97336614..3fa3635979 100644
--- a/util/superiotool/via.c
+++ b/util/superiotool/via.c
@@ -23,7 +23,9 @@
#define DEVICE_REV_VT1211_REG 0x21
static const struct superio_registers reg_table[] = {
- {0x3c, "VT82C686A/VT82C686B/VT1211", {
+ {0x3c00, "VT82C686A/VT82C686B", {
+ {EOT}}},
+ {0x3c01, "VT1211", {
{EOT}}},
{EOT}
};
@@ -75,41 +77,45 @@ static void exit_conf_mode_via_vt82c686(void)
void probe_idregs_via(uint16_t port)
{
uint16_t id;
+ uint8_t devid;
uint8_t rev;
if (port == 0x3f0) {
- probing_for("VIA", "(init=vt82c686)", port);
+ probing_for("VIA", "(init=vt82c686) ", port);
if (enter_conf_mode_via_vt82c686())
return;
- id = regval(port, DEVICE_ID_VT82C686_REG);
+ devid = regval(port, DEVICE_ID_VT82C686_REG);
rev = regval(port, DEVICE_REV_VT82C686_REG);
+ id = devid << 8;
if (superio_unknown(reg_table, id)) {
if (verbose)
- printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev);
+ printf(NOTFOUND "id=0x%02x, rev=0x%02x\n", devid, 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);
+ printf("Found VIA %s (id=0x%02x, rev=0x%02x) at 0x%x\n",
+ get_superio_name(reg_table, id), devid, rev, port);
chip_found = 1;
}
exit_conf_mode_via_vt82c686();
if (chip_found)
return;
} else {
- probing_for("VIA", "(init=0x87,0x87)", port);
+ probing_for("VIA", "(init=0x87,0x87) ", port);
enter_conf_mode_winbond_fintek_ite_8787(port);
- id = regval(port, DEVICE_ID_VT1211_REG);
+ devid = regval(port, DEVICE_ID_VT1211_REG);
rev = regval(port, DEVICE_REV_VT1211_REG);
+ id = (devid << 8) | 1;
if (superio_unknown(reg_table, id)) {
if (verbose)
- printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev);
+ printf(NOTFOUND "id=0x%02x, rev=0x%02x\n", devid, 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);
+ printf("Found VIA %s (id=0x%02x, rev=0x%02x) at 0x%x\n",
+ get_superio_name(reg_table, id), devid, rev, port);
chip_found = 1;
+ dump_superio("VIA", reg_table, port, id, LDN_SEL);
}
}