summaryrefslogtreecommitdiff
path: root/util/superiotool/fintek.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2007-09-23 13:17:29 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2007-09-23 13:17:29 +0000
commit6b4ad4304a57fdcfd6147370235896406f229e61 (patch)
tree239f09c4505c13661afb58222877afb2e2230dfa /util/superiotool/fintek.c
parent3a9740db2eef45ed006a700632b7800ff5fc1d2b (diff)
Minor fixes/improvements in the Fintek code (trivial).
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@2802 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool/fintek.c')
-rw-r--r--util/superiotool/fintek.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/util/superiotool/fintek.c b/util/superiotool/fintek.c
index f7f0a7c5c8..6a7d785e8b 100644
--- a/util/superiotool/fintek.c
+++ b/util/superiotool/fintek.c
@@ -25,6 +25,8 @@
#define VENDOR_ID_BYTE1_REG 0x23
#define VENDOR_ID_BYTE2_REG 0x24
+#define FINTEK_VENDOR_ID 0x3419
+
const static struct superio_registers reg_table[] = {
{0x0604, "F71805", {
{EOT}}},
@@ -38,17 +40,7 @@ static void dump_readable_fintek(uint16_t port, uint16_t did)
if (!dump_readable)
return;
- switch (did) {
- case 0x0604:
- printf("Fintek F71805\n");
- break;
- case 0x4103:
- printf("Fintek F71872\n");
- break;
- default:
- printf("Unknown Fintek Super I/O: did=0x%04x\n", did);
- return;
- }
+ printf("Human-readable register dump:\n");
printf("Flash write is %s.\n",
regval(port, 0x28) & 0x80 ? "enabled" : "disabled");
@@ -117,7 +109,7 @@ void probe_idregs_fintek(uint16_t port)
vid = regval(port, VENDOR_ID_BYTE1_REG);
vid |= (regval(port, VENDOR_ID_BYTE2_REG) << 8);
- if (vid != 0x3419) {
+ if (vid != FINTEK_VENDOR_ID || superio_unknown(reg_table, did)) {
no_superio_found(port);
exit_conf_mode_winbond_fintek_ite_8787(port);
return;