Author: uwe
Date: 2008-03-01 19:49:39 +0100 (Sat, 01 Mar 2008)
New Revision: 3121
Modified:
trunk/util/superiotool/README
trunk/util/superiotool/ite.c
trunk/util/superiotool/superiotool.8
trunk/util/superiotool/superiotool.c
trunk/util/superiotool/superiotool.h
Log:
Small coding style fixes and documentation updates (trivial).
Signed-off-by: Uwe Hermann <uwe(a)hermann-uwe.de>
Acked-by: Uwe Hermann <uwe(a)hermann-uwe.de>
Modified: trunk/util/superiotool/README
===================================================================
--- trunk/util/superiotool/README 2008-03-01 15:33:03 UTC (rev 3120)
+++ trunk/util/superiotool/README 2008-03-01 18:49:39 UTC (rev 3121)
@@ -30,10 +30,10 @@
Usage
-----
- $ superiotool [-d] [-l] [-V] [-v] [-h]
+ $ superiotool [-d] [-e] [-l] [-V] [-v] [-h]
-d | --dump Dump Super I/O register contents
- -e | --extra-dump Dump Secondary registers too (like EC registers etc.)
+ -e | --extra-dump Dump secondary registers too (e.g. EC registers)
-l | --list-supported Show the list of supported Super I/O chips
-V | --verbose Verbose mode
-v | --version Show the superiotool version
Modified: trunk/util/superiotool/ite.c
===================================================================
--- trunk/util/superiotool/ite.c 2008-03-01 15:33:03 UTC (rev 3120)
+++ trunk/util/superiotool/ite.c 2008-03-01 18:49:39 UTC (rev 3121)
@@ -379,7 +379,7 @@
static void probe_idregs_ite_helper(const char *init, uint16_t port)
{
- uint16_t id, chipver;
+ uint16_t id, chipver, ecport;
probing_for("ITE", init, port);
@@ -400,13 +400,16 @@
dump_superio("ITE", reg_table, port, id);
if (extra_dump) {
- uint16_t ecport;
- regwrite(port, 0x07, 0x04); /*EC LDN*/
+ regwrite(port, 0x07, 0x04); /* Select LDN 4 (EC). */
+
+ /* Get EC base address (stored in LDN 4, index 0x60/0x61). */
ecport = regval(port, 0x60) << 8;
ecport |= regval(port, 0x61);
+
+ /* EC address register = EC base address + 5. */
ecport += 5;
- printf("Environment Controller (0x%04x)\n",ecport);
+ printf("Environment controller (0x%04x)\n", ecport);
dump_superio("ITE-EC", ec_table, ecport, id);
}
}
Modified: trunk/util/superiotool/superiotool.8
===================================================================
--- trunk/util/superiotool/superiotool.8 2008-03-01 15:33:03 UTC (rev 3120)
+++ trunk/util/superiotool/superiotool.8 2008-03-01 18:49:39 UTC (rev 3121)
@@ -77,8 +77,8 @@
Dump extra secondary register contents too, if available. Only in combination
with the
.B --dump
-option. This option will, for instance, dump the Environmental Controller
-configuration registers for the ITE IT8716f chip. The format is similar to
+option. This option will, for instance, dump the environmental controller (EC)
+configuration registers for the ITE IT8716F chip. The format is similar to
the output of the
.B --dump
option.
Modified: trunk/util/superiotool/superiotool.c
===================================================================
--- trunk/util/superiotool/superiotool.c 2008-03-01 15:33:03 UTC (rev 3120)
+++ trunk/util/superiotool/superiotool.c 2008-03-01 18:49:39 UTC (rev 3121)
@@ -158,8 +158,7 @@
return;
/* Yes, there's no space between '%s' and 'at'! */
- printf("Probing for %s Super I/O %sat 0x%x...\n",
- vendor, info, port);
+ printf("Probing for %s Super I/O %sat 0x%x...\n", vendor, info, port);
}
/** Print a list of all supported chips from the given vendor. */
Modified: trunk/util/superiotool/superiotool.h
===================================================================
--- trunk/util/superiotool/superiotool.h 2008-03-01 15:33:03 UTC (rev 3120)
+++ trunk/util/superiotool/superiotool.h 2008-03-01 18:49:39 UTC (rev 3121)
@@ -30,9 +30,9 @@
#include <getopt.h>
#include <sys/io.h>
-#define USAGE "Usage: superiotool [-d] [-l] [-V] [-v] [-h]\n\n\
+#define USAGE "Usage: superiotool [-d] [-e] [-l] [-V] [-v] [-h]\n\n\
-d | --dump Dump Super I/O register contents\n\
- -e | --extra-dump Dump Secondary registers too (like EC registers etc.)\n\
+ -e | --extra-dump Dump secondary registers too (e.g. EC registers)\n\
-l | --list-supported Show the list of supported Super I/O chips\n\
-V | --verbose Verbose mode\n\
-v | --version Show the superiotool version\n\