Author: uwe Date: 2007-10-07 22:01:23 +0200 (Sun, 07 Oct 2007) New Revision: 2835
Modified: trunk/util/superiotool/ali.c trunk/util/superiotool/fintek.c trunk/util/superiotool/ite.c trunk/util/superiotool/nsc.c trunk/util/superiotool/smsc.c trunk/util/superiotool/superiotool.c trunk/util/superiotool/superiotool.h trunk/util/superiotool/winbond.c Log: Print a short message if no Super I/O chip could be detected (trivial).
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de Acked-by: Uwe Hermann uwe@hermann-uwe.de
Modified: trunk/util/superiotool/ali.c =================================================================== --- trunk/util/superiotool/ali.c 2007-10-07 19:10:24 UTC (rev 2834) +++ trunk/util/superiotool/ali.c 2007-10-07 20:01:23 UTC (rev 2835) @@ -89,6 +89,7 @@
printf("Found ALi %s (id=0x%04x, rev=0x%02x) at 0x%x\n", get_superio_name(reg_table, id), id, rev, port); + chip_found = 1;
dump_superio("ALi", reg_table, port, id); dump_superio_readable(port); /* TODO */
Modified: trunk/util/superiotool/fintek.c =================================================================== --- trunk/util/superiotool/fintek.c 2007-10-07 19:10:24 UTC (rev 2834) +++ trunk/util/superiotool/fintek.c 2007-10-07 20:01:23 UTC (rev 2835) @@ -155,6 +155,7 @@
printf("Found Fintek %s (vid=0x%04x, id=0x%04x) at 0x%x\n", get_superio_name(reg_table, did), vid, did, port); + chip_found = 1;
dump_superio("Fintek", reg_table, port, did); dump_readable_fintek(port, did);
Modified: trunk/util/superiotool/ite.c =================================================================== --- trunk/util/superiotool/ite.c 2007-10-07 19:10:24 UTC (rev 2834) +++ trunk/util/superiotool/ite.c 2007-10-07 20:01:23 UTC (rev 2835) @@ -361,6 +361,7 @@
printf("Found ITE %s (id=0x%04x, rev=0x%01x) at 0x%x\n", get_superio_name(reg_table, id), id, chipver, port); + chip_found = 1;
dump_superio("ITE", reg_table, port, id); dump_superio_readable(port); /* TODO */
Modified: trunk/util/superiotool/nsc.c =================================================================== --- trunk/util/superiotool/nsc.c 2007-10-07 19:10:24 UTC (rev 2834) +++ trunk/util/superiotool/nsc.c 2007-10-07 20:01:23 UTC (rev 2835) @@ -98,6 +98,7 @@
printf("Found NSC %s (sid=0x%02x, srid=0x%02x) at 0x%x\n", get_superio_name(reg_table, id), id, rev, port); + chip_found = 1;
dump_superio("NSC", reg_table, port, id); if (id == 0xf1)
Modified: trunk/util/superiotool/smsc.c =================================================================== --- trunk/util/superiotool/smsc.c 2007-10-07 19:10:24 UTC (rev 2834) +++ trunk/util/superiotool/smsc.c 2007-10-07 20:01:23 UTC (rev 2835) @@ -298,6 +298,7 @@ printf("Found %s %s (id=0x%02x, rev=0x%02x) at 0x%x\n", (id == 0x77 ? "ASUS" : "SMSC"), get_superio_name(reg_table, id), id, rev, port); + chip_found = 1;
dump_superio((id == 0x77 ? "ASUS" : "SMSC"), reg_table, port, id); dump_superio_readable(port); /* TODO */
Modified: trunk/util/superiotool/superiotool.c =================================================================== --- trunk/util/superiotool/superiotool.c 2007-10-07 19:10:24 UTC (rev 2834) +++ trunk/util/superiotool/superiotool.c 2007-10-07 20:01:23 UTC (rev 2835) @@ -25,6 +25,9 @@ /* Command line options. */ int dump = 0, dump_readable = 0, verbose = 0;
+/* Global flag which indicates whether a chip was detected at all. */ +int chip_found = 0; + uint8_t regval(uint16_t port, uint8_t reg) { outb(reg, port); @@ -229,5 +232,8 @@ superio_ports_table[i].ports[j]); }
+ if (!chip_found) + printf("No Super I/O found\n"); + return 0; }
Modified: trunk/util/superiotool/superiotool.h =================================================================== --- trunk/util/superiotool/superiotool.h 2007-10-07 19:10:24 UTC (rev 2834) +++ trunk/util/superiotool/superiotool.h 2007-10-07 20:01:23 UTC (rev 2835) @@ -59,6 +59,8 @@ /* Command line parameters. */ extern int dump, dump_readable, verbose;
+extern int chip_found; + struct superio_registers { int32_t superio_id; /* Signed, as we need EOT. */ const char name[MAXNAMELEN]; /* Super I/O name */
Modified: trunk/util/superiotool/winbond.c =================================================================== --- trunk/util/superiotool/winbond.c 2007-10-07 19:10:24 UTC (rev 2834) +++ trunk/util/superiotool/winbond.c 2007-10-07 20:01:23 UTC (rev 2835) @@ -313,6 +313,7 @@ else printf("Found Winbond %s (id=0x%02x, rev=0x%02x) at 0x%x\n", get_superio_name(reg_table, id), devid, rev, port); + chip_found = 1;
/* TODO: Special notes in dump output for the MISC entries. */ dump_superio("Winbond", reg_table, port, id);