summaryrefslogtreecommitdiff
path: root/util/superiotool
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2007-10-07 20:01:23 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2007-10-07 20:01:23 +0000
commite9d4616a9566e29e69d3c967d35126abddd99cee (patch)
tree8798c2d8ca8d6ee3a1850d5fe4118a08628a5f35 /util/superiotool
parent84bf1e250617fbb213fd0ebb9574b11c46346ed0 (diff)
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> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2835 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool')
-rw-r--r--util/superiotool/ali.c1
-rw-r--r--util/superiotool/fintek.c1
-rw-r--r--util/superiotool/ite.c1
-rw-r--r--util/superiotool/nsc.c1
-rw-r--r--util/superiotool/smsc.c1
-rw-r--r--util/superiotool/superiotool.c6
-rw-r--r--util/superiotool/superiotool.h2
-rw-r--r--util/superiotool/winbond.c1
8 files changed, 14 insertions, 0 deletions
diff --git a/util/superiotool/ali.c b/util/superiotool/ali.c
index e8bf36c577..58d348577a 100644
--- a/util/superiotool/ali.c
+++ b/util/superiotool/ali.c
@@ -89,6 +89,7 @@ void probe_idregs_ali(uint16_t port)
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 */
diff --git a/util/superiotool/fintek.c b/util/superiotool/fintek.c
index 2fe8cb3747..bdabbc6583 100644
--- a/util/superiotool/fintek.c
+++ b/util/superiotool/fintek.c
@@ -155,6 +155,7 @@ void probe_idregs_fintek(uint16_t port)
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);
diff --git a/util/superiotool/ite.c b/util/superiotool/ite.c
index 0367023010..f6ca00489c 100644
--- a/util/superiotool/ite.c
+++ b/util/superiotool/ite.c
@@ -361,6 +361,7 @@ static void probe_idregs_ite_helper(const char *init, uint16_t port)
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 */
diff --git a/util/superiotool/nsc.c b/util/superiotool/nsc.c
index 5bc9e9f463..242cea9f13 100644
--- a/util/superiotool/nsc.c
+++ b/util/superiotool/nsc.c
@@ -98,6 +98,7 @@ void probe_idregs_nsc(uint16_t port)
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)
diff --git a/util/superiotool/smsc.c b/util/superiotool/smsc.c
index fd88ceb6d5..8c14b35d8e 100644
--- a/util/superiotool/smsc.c
+++ b/util/superiotool/smsc.c
@@ -298,6 +298,7 @@ static void probe_idregs_smsc_helper(uint16_t port, uint8_t idreg,
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 */
diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c
index 6771996091..6c93f58c6b 100644
--- a/util/superiotool/superiotool.c
+++ b/util/superiotool/superiotool.c
@@ -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 @@ int main(int argc, char *argv[])
superio_ports_table[i].ports[j]);
}
+ if (!chip_found)
+ printf("No Super I/O found\n");
+
return 0;
}
diff --git a/util/superiotool/superiotool.h b/util/superiotool/superiotool.h
index a3dab52ccb..3509d07bc3 100644
--- a/util/superiotool/superiotool.h
+++ b/util/superiotool/superiotool.h
@@ -59,6 +59,8 @@ and print its vendor, name, ID, revision, and config port.\n"
/* 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 */
diff --git a/util/superiotool/winbond.c b/util/superiotool/winbond.c
index 6e502fb068..44fac47f65 100644
--- a/util/superiotool/winbond.c
+++ b/util/superiotool/winbond.c
@@ -313,6 +313,7 @@ void probe_idregs_winbond_helper(const char *init, uint16_t port)
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);