The Winbond Super I/O chips have another indirection of registers. The
hwmon has generic registers and banked registers, mostly temperature
handling, and SMI/GPIO stuff.
Not all LDNs are switched via register offset 0x07, make it a parameter.
Add support for dumping the hardware monitor of Winbond W83627THF/THG
parts with the -e option.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3784 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c
index 1bbe5fe..9d3840f 100644
--- a/util/superiotool/superiotool.c
+++ b/util/superiotool/superiotool.c
@@ -82,7 +82,7 @@
}
static void dump_regs(const struct superio_registers reg_table[],
- int i, int j, uint16_t port)
+ int i, int j, uint16_t port, uint8_t ldn_sel)
{
int k;
const int16_t *idx;
@@ -91,7 +91,7 @@
printf("LDN 0x%02x", reg_table[i].ldn[j].ldn);
if (reg_table[i].ldn[j].name != NULL)
printf(" (%s)", reg_table[i].ldn[j].name);
- regwrite(port, 0x07, reg_table[i].ldn[j].ldn);
+ regwrite(port, ldn_sel, reg_table[i].ldn[j].ldn);
} else {
printf("Register dump:");
}
@@ -131,7 +131,7 @@
void dump_superio(const char *vendor,
const struct superio_registers reg_table[],
- uint16_t port, uint16_t id)
+ uint16_t port, uint16_t id, uint8_t ldn_sel)
{
int i, j, no_dump_available = 1;
@@ -149,7 +149,7 @@
if (reg_table[i].ldn[j].ldn == EOT)
break;
no_dump_available = 0;
- dump_regs(reg_table, i, j, port);
+ dump_regs(reg_table, i, j, port, ldn_sel);
}
if (no_dump_available)