summaryrefslogtreecommitdiff
path: root/util/superiotool/nsc.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2007-09-20 23:57:44 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2007-09-20 23:57:44 +0000
commiteddc473ce0753bfd8aa55cc19bcec991866694fd (patch)
treec710be3d289d2d649572bf59cc429e2edc44cddb /util/superiotool/nsc.c
parentb4db2209f9e01e1a013cc33356bceec57c3a3c80 (diff)
Add -D / --dump-readable option which prints the Super I/O register
contents in human-readable form (e.g. "COM1 enabled" etc.) instead of the hex-table format from -d / --dump. 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@2795 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool/nsc.c')
-rw-r--r--util/superiotool/nsc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/superiotool/nsc.c b/util/superiotool/nsc.c
index ec9b326192..797f3d4c4d 100644
--- a/util/superiotool/nsc.c
+++ b/util/superiotool/nsc.c
@@ -25,8 +25,11 @@ static const char *familyid[] = {
[0xf1] = "PC8374 (Winbond/NatSemi)"
};
-void dump_ns8374(uint16_t port)
+static void dump_readable_ns8374(uint16_t port)
{
+ if (!dump_readable)
+ return;
+
printf("Enables: 21=%02x, 22=%02x, 23=%02x, 24=%02x, 26=%02x\n",
regval(port, 0x21), regval(port, 0x22), regval(port, 0x23),
regval(port, 0x24), regval(port, 0x26));
@@ -79,7 +82,7 @@ void probe_idregs_simple(uint16_t port)
switch (id) {
case 0xf1:
- dump_ns8374(port);
+ dump_readable_ns8374(port);
break;
default:
printf("No dump for 0x%02x\n", id);