Author: uwe Date: 2007-09-24 03:40:09 +0200 (Mon, 24 Sep 2007) New Revision: 2803
Modified: trunk/util/superiotool/ite.c trunk/util/superiotool/smsc.c trunk/util/superiotool/superiotool.h Log: Add detection support for quite a number of SMSC Super I/Os. Also, add dump support for the SMSC DME1737 and the ASUS A8000. Random minor fixes.
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de Acked-by: Uwe Hermann uwe@hermann-uwe.de
Modified: trunk/util/superiotool/ite.c =================================================================== --- trunk/util/superiotool/ite.c 2007-09-23 13:17:29 UTC (rev 2802) +++ trunk/util/superiotool/ite.c 2007-09-24 01:40:09 UTC (rev 2803) @@ -239,10 +239,7 @@ };
/** - * Enable configuration sequence (ITE uses this for newer IT87[012]xF). - * - * IT871[01]F uses 0x87, 0x87 -> Fintek detection should handle it - * IT8708F uses 0x87, 0x87 -> Fintek detection should handle it + * IT871[01]F and IT8708F use 0x87, 0x87 * IT8761F uses 0x87, 0x61, 0x55, 0x55/0xaa * IT86xxF series uses different ports * IT8661F uses 0x86, 0x61, 0x55/0xaa, 0x55/0xaa and 32 more writes
Modified: trunk/util/superiotool/smsc.c =================================================================== --- trunk/util/superiotool/smsc.c 2007-09-23 13:17:29 UTC (rev 2802) +++ trunk/util/superiotool/smsc.c 2007-09-24 01:40:09 UTC (rev 2803) @@ -20,9 +20,12 @@
#include "superiotool.h"
-#define DEVICE_ID_REG 0x0d -#define DEVICE_REV_REG 0x0e +#define DEVICE_ID_REG_OLD 0x0d +#define DEVICE_REV_REG_OLD 0x0e
+#define DEVICE_ID_REG 0x20 +#define DEVICE_REV_REG 0x21 + const static struct superio_registers reg_table[] = { {0x28, "FDC37N769", { {NOLDN, NULL, @@ -37,6 +40,82 @@ 0x80,0x00,0x3c,RSVD,RSVD,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,RSVD,0x00,0x00,0x03,0x00,0x00,EOT}}, {EOT}}}, + {0x42, "FDC37B80x", { + {EOT}}}, + {0x44, "FDC37B78x", { + {EOT}}}, + {0x4c, "FDC37B72x", { + {EOT}}}, + {0x4d, "FDC37M81x", { + {EOT}}}, + {0x47, "FDC37M60x", { + {EOT}}}, + {0x51, "LPC47B27x", { + {EOT}}}, + {0x59, "LPC47M10x", { + {EOT}}}, + {0x60, "LPC47M15x", { + {EOT}}}, + {0x62, "LPC47S45x", { + {EOT}}}, + {0x6f, "LPC47B397", { + {EOT}}}, + {0x77, "A8000", { /* ASUS A8000, a rebranded DME1737(?) */ + {NOLDN, NULL, + {0x03,0x07,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28, + 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, + {RSVD,0x00,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD, + NANA,NANA,NANA,NANA,NANA,NANA,EOT}}, + {0x0, "Floppy", + {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, + 0xf5,EOT}, + {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, + 0x00,EOT}}, + {0x3, "Parallel port", + {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, + {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, + {0x4, "COM1", + {0x30,0x60,0x61,0x70,0xf0,EOT}, + {0x00,0x00,0x00,0x00,0x00,EOT}}, + {0x5, "COM2", + {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, + {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}}, + {0x7, "Keyboard", + {0x30,0x70,0x72,0xf0,EOT}, + {0x00,0x00,0x00,0x00,EOT}}, + {0xa, "Runtime registers", + {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT}, + {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}}, + {EOT}}}, + {0x78, "DME1737", { + {NOLDN, NULL, + {0x03,0x07,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28, + 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, + {RSVD,0x00,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD, + NANA,NANA,NANA,NANA,NANA,NANA,EOT}}, + {0x0, "Floppy", + {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, + 0xf5,EOT}, + {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, + 0x00,EOT}}, + {0x3, "Parallel port", + {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, + {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, + {0x4, "COM1", + {0x30,0x60,0x61,0x70,0xf0,EOT}, + {0x00,0x00,0x00,0x00,0x00,EOT}}, + {0x5, "COM2", + {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, + {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}}, + {0x7, "Keyboard", + {0x30,0x70,0x72,0xf0,EOT}, + {0x00,0x00,0x00,0x00,EOT}}, + {0xa, "Runtime registers", + {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT}, + {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}}, + {EOT}}}, + {0x81, "SCH5307", { + {EOT}}}, {EOT} };
@@ -56,6 +135,14 @@
enter_conf_mode_smsc(port);
+ /* Check for older SMSC Super I/Os. */ + id = regval(port, DEVICE_ID_REG_OLD); + rev = regval(port, DEVICE_REV_REG_OLD); + + if (superio_unknown(reg_table, id)) + no_superio_found(port); + + /* Check for newer SMSC Super I/Os. */ id = regval(port, DEVICE_ID_REG); rev = regval(port, DEVICE_REV_REG);
@@ -65,10 +152,11 @@ return; }
- printf("Found SMSC %s (id=0x%02x, rev=0x%02x) at port=0x%x\n", - get_superio_name(reg_table, id), id, rev, port); + printf("Found %s %s (id=0x%02x, rev=0x%02x) at port=0x%x\n", + (id == 0x77 ? "ASUS" : "SMSC"), get_superio_name(reg_table, id), + id, rev, port);
- dump_superio("SMSC", reg_table, port, id); + dump_superio((id == 0x77 ? "ASUS" : "SMSC"), reg_table, port, id); dump_superio_readable(port); /* TODO */
exit_conf_mode_smsc(port);
Modified: trunk/util/superiotool/superiotool.h =================================================================== --- trunk/util/superiotool/superiotool.h 2007-09-23 13:17:29 UTC (rev 2802) +++ trunk/util/superiotool/superiotool.h 2007-09-24 01:40:09 UTC (rev 2803) @@ -52,7 +52,7 @@ #define LDNSIZE (MAXLDN + 3) /* Biggest LDN + 0 + NOLDN + EOT */ #define MAXNUMIDX 70 /* Maximum number of indexes */ #define IDXSIZE (MAXNUMIDX + 1) -#define MAXNUMPORTS (2 + 1) /* Maximum number of Super I/O ports */ +#define MAXNUMPORTS (4 + 1) /* Maximum number of Super I/O ports */
/* Command line parameters. */ extern int dump, dump_readable, verbose; @@ -101,11 +101,11 @@ void (*probe_idregs) (uint16_t port); int ports[MAXNUMPORTS]; /* Signed, as we need EOT. */ } superio_ports_table[] = { - {probe_idregs_simple, {0x2e, 0x4e, EOT}}, - {probe_idregs_fintek, {0x2e, 0x4e, EOT}}, - {probe_idregs_ite, {0x2e, 0x4e, EOT}}, - {probe_idregs_smsc, {0x3f0, 0x370, EOT}}, - {probe_idregs_winbond, {0x2e, 0x4e, EOT}}, + {probe_idregs_simple, {0x2e, 0x4e, EOT}}, + {probe_idregs_fintek, {0x2e, 0x4e, EOT}}, + {probe_idregs_ite, {0x2e, 0x4e, EOT}}, + {probe_idregs_smsc, {0x2e, 0x4e, 0x3f0, 0x370, EOT}}, + {probe_idregs_winbond, {0x2e, 0x4e, EOT}}, };
#endif