<p>Lubomir Rintel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22254">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/superiotool: distinguish between VT82C686 and VT1211<br><br>They both have a device id of 0x3c. The former is part of the PCI chip set<br>accessible via port 0x3f0 while the latter is a standalone LPC chip accessible<br>via 0x2e/0x4e depending on strapping.<br><br>They're not register compatible: the VT82C686 only provides a FDC, LPT and part<br>of UARTs.<br><br>The VT82C686 documentation suggests it has revision 0x00 while the VT1211<br>datasheet indicates 0x01. Nevertheless, the VT1211 I happen to have hs a<br>revision of 0x02. Thus the revision is probably not good enough to tell one<br>from the another.<br><br>Change-Id: Ic7529c84724c8d6b9eb75b863f1bceef5e4b52b5<br>Signed-off-by: Lubomir Rintel <lkundrak@v3.sk><br>---<br>M util/superiotool/via.c<br>1 file changed, 17 insertions(+), 11 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/22254/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/util/superiotool/via.c b/util/superiotool/via.c<br>index 4a97336..3fa3635 100644<br>--- a/util/superiotool/via.c<br>+++ b/util/superiotool/via.c<br>@@ -23,7 +23,9 @@<br> #define DEVICE_REV_VT1211_REG 0x21<br> <br> static const struct superio_registers reg_table[] = {<br>- {0x3c, "VT82C686A/VT82C686B/VT1211", {<br>+ {0x3c00, "VT82C686A/VT82C686B", {<br>+ {EOT}}},<br>+ {0x3c01, "VT1211", {<br> {EOT}}},<br> {EOT}<br> };<br>@@ -75,41 +77,45 @@<br> void probe_idregs_via(uint16_t port)<br> {<br> uint16_t id;<br>+ uint8_t devid;<br> uint8_t rev;<br> <br> if (port == 0x3f0) {<br>- probing_for("VIA", "(init=vt82c686)", port);<br>+ probing_for("VIA", "(init=vt82c686) ", port);<br> if (enter_conf_mode_via_vt82c686())<br> return;<br> <br>- id = regval(port, DEVICE_ID_VT82C686_REG);<br>+ devid = regval(port, DEVICE_ID_VT82C686_REG);<br> rev = regval(port, DEVICE_REV_VT82C686_REG);<br>+ id = devid << 8;<br> <br> if (superio_unknown(reg_table, id)) {<br> if (verbose)<br>- printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev);<br>+ printf(NOTFOUND "id=0x%02x, rev=0x%02x\n", devid, rev);<br> } else {<br>- printf("Found VIA %s (id=0x%04x, rev=0x%02x) at 0x%x\n",<br>- get_superio_name(reg_table, id), id, rev, port);<br>+ printf("Found VIA %s (id=0x%02x, rev=0x%02x) at 0x%x\n",<br>+ get_superio_name(reg_table, id), devid, rev, port);<br> chip_found = 1;<br> }<br> exit_conf_mode_via_vt82c686();<br> if (chip_found)<br> return;<br> } else {<br>- probing_for("VIA", "(init=0x87,0x87)", port);<br>+ probing_for("VIA", "(init=0x87,0x87) ", port);<br> enter_conf_mode_winbond_fintek_ite_8787(port);<br> <br>- id = regval(port, DEVICE_ID_VT1211_REG);<br>+ devid = regval(port, DEVICE_ID_VT1211_REG);<br> rev = regval(port, DEVICE_REV_VT1211_REG);<br>+ id = (devid << 8) | 1;<br> <br> if (superio_unknown(reg_table, id)) {<br> if (verbose)<br>- printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev);<br>+ printf(NOTFOUND "id=0x%02x, rev=0x%02x\n", devid, rev);<br> } else {<br>- printf("Found VIA %s (id=0x%04x, rev=0x%02x) at 0x%x\n",<br>- get_superio_name(reg_table, id), id, rev, port);<br>+ printf("Found VIA %s (id=0x%02x, rev=0x%02x) at 0x%x\n",<br>+ get_superio_name(reg_table, id), devid, rev, port);<br> chip_found = 1;<br>+ dump_superio("VIA", reg_table, port, id, LDN_SEL);<br> }<br> }<br> <br></pre><p>To view, visit <a href="https://review.coreboot.org/22254">change 22254</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/22254"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic7529c84724c8d6b9eb75b863f1bceef5e4b52b5 </div>
<div style="display:none"> Gerrit-Change-Number: 22254 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Lubomir Rintel <lkundrak@v3.sk> </div>