[coreboot-gerrit] Change in coreboot[master]: util/superiotool: recognize a VT1211 LPC superio

Lubomir Rintel (Code Review) gerrit at coreboot.org
Tue Oct 31 09:26:11 CET 2017


Lubomir Rintel has uploaded this change for review. ( https://review.coreboot.org/22253


Change subject: util/superiotool: recognize a VT1211 LPC superio
......................................................................

util/superiotool: recognize a VT1211 LPC superio

Change-Id: I2c24c347c3e044397944ca2abbceb36f83483daf
Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
---
M 3rdparty/libgfxinit
M 3rdparty/libhwbase
M 3rdparty/vboot
M util/superiotool/superiotool.h
M util/superiotool/via.c
5 files changed, 40 insertions(+), 20 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/22253/1

diff --git a/3rdparty/libgfxinit b/3rdparty/libgfxinit
index 3a0e2a0..fb4f8ce 160000
--- a/3rdparty/libgfxinit
+++ b/3rdparty/libgfxinit
@@ -1 +1 @@
-Subproject commit 3a0e2a08f5489f3bb5c6e9f97b903e6e10c31a6c
+Subproject commit fb4f8ce26a05c2304367c066b806519941658373
diff --git a/3rdparty/libhwbase b/3rdparty/libhwbase
index 6685971..3bf6759 160000
--- a/3rdparty/libhwbase
+++ b/3rdparty/libhwbase
@@ -1 +1 @@
-Subproject commit 66859712e4817288591908d737dbf41ddea31c3a
+Subproject commit 3bf6759dc09d27c06b3533fd536e667356853d3d
diff --git a/3rdparty/vboot b/3rdparty/vboot
index 3b80572..3d25d2b 160000
--- a/3rdparty/vboot
+++ b/3rdparty/vboot
@@ -1 +1 @@
-Subproject commit 3b805725c15022783f0737a72b4f27962abf48cd
+Subproject commit 3d25d2b4ba7886244176aa8c429fdac2acf7db3e
diff --git a/util/superiotool/superiotool.h b/util/superiotool/superiotool.h
index 58a9d61..01237a5 100644
--- a/util/superiotool/superiotool.h
+++ b/util/superiotool/superiotool.h
@@ -249,7 +249,7 @@
 	{probe_idregs_smsc,	{0x2e, 0x4e, 0x162e, 0x164e, 0x3f0, 0x370, EOT}},
 	{probe_idregs_winbond,	{0x2e, 0x4e, 0x3f0, 0x370, 0x250, EOT}},
 #ifdef PCI_SUPPORT
-	{probe_idregs_via,	{0x3f0, EOT}},
+	{probe_idregs_via,	{0x2e, 0x4e, 0x3f0, EOT}},
 	/* in fact read the BASE from HW */
 	{probe_idregs_amd,	{0xaa, EOT}},
 #endif
diff --git a/util/superiotool/via.c b/util/superiotool/via.c
index b71d43c..4a97336 100644
--- a/util/superiotool/via.c
+++ b/util/superiotool/via.c
@@ -19,8 +19,11 @@
 #define DEVICE_ID_VT82C686_REG	0xe0
 #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[] = {
-	{0x3c, "VT82C686A/VT82C686B", {
+	{0x3c, "VT82C686A/VT82C686B/VT1211", {
 		{EOT}}},
 	{EOT}
 };
@@ -74,26 +77,43 @@
 	uint16_t id;
 	uint8_t rev;
 
-	probing_for("VIA", "", port);
+	if (port == 0x3f0) {
+		probing_for("VIA", "(init=vt82c686)", port);
+		if (enter_conf_mode_via_vt82c686())
+			return;
 
-	if (enter_conf_mode_via_vt82c686())
-		return;
+		id = regval(port, DEVICE_ID_VT82C686_REG);
+		rev = regval(port, DEVICE_REV_VT82C686_REG);
 
-	id = regval(port, DEVICE_ID_VT82C686_REG);
-	rev = regval(port, DEVICE_REV_VT82C686_REG);
-
-	if (superio_unknown(reg_table, id)) {
-		if (verbose)
-			printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev);
+		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_via_vt82c686();
-		return;
+		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;
+		}
 	}
 
-	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_via_vt82c686();
+	exit_conf_mode_winbond_fintek_ite_8787(port);
 }
 
 void print_via_chips(void)

-- 
To view, visit https://review.coreboot.org/22253
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c24c347c3e044397944ca2abbceb36f83483daf
Gerrit-Change-Number: 22253
Gerrit-PatchSet: 1
Gerrit-Owner: Lubomir Rintel <lkundrak at v3.sk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171031/d21b7b18/attachment.html>


More information about the coreboot-gerrit mailing list