From 552cfb7b74cc0f39aee0c6babecdb045c81073e7 Mon Sep 17 00:00:00 2001 From: "Robinson P. Tryon" Date: Tue, 15 Jan 2008 22:30:55 +0000 Subject: Add new --list-supported switch for printing the list of Super I/Os supported by superiotool (closes #91). Signed-off-by: Robinson P. Tryon Acked-by: Uwe Hermann git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3050 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/superiotool/superiotool.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'util/superiotool/superiotool.h') diff --git a/util/superiotool/superiotool.h b/util/superiotool/superiotool.h index e7c4e2363b..5d402561a9 100644 --- a/util/superiotool/superiotool.h +++ b/util/superiotool/superiotool.h @@ -3,6 +3,7 @@ * * Copyright (C) 2007 Carl-Daniel Hailfinger * Copyright (C) 2007 Uwe Hermann + * Copyright (C) 2008 Robinson P. Tryon * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,8 +30,9 @@ #include #include -#define USAGE "Usage: superiotool [-d] [-V] [-v] [-h]\n\n\ +#define USAGE "Usage: superiotool [-d] [-l] [-V] [-v] [-h]\n\n\ -d | --dump Dump Super I/O register contents\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\ -h | --help Show a short help text\n\n\ @@ -80,24 +82,32 @@ const char *get_superio_name(const struct superio_registers reg_table[], void dump_superio(const char *name, const struct superio_registers reg_table[], uint16_t port, uint16_t id); void probing_for(const char *vendor, const char *info, uint16_t port); +void print_vendor_chips(const char *vendor, + const struct superio_registers reg_table[]); /* ali.c */ void probe_idregs_ali(uint16_t port); +void print_ali_chips(void); /* fintek.c */ void probe_idregs_fintek(uint16_t port); +void print_fintek_chips(void); /* ite.c */ void probe_idregs_ite(uint16_t port); +void print_ite_chips(void); /* nsc.c */ void probe_idregs_nsc(uint16_t port); +void print_nsc_chips(void); /* smsc.c */ void probe_idregs_smsc(uint16_t port); +void print_smsc_chips(void); /* winbond.c */ void probe_idregs_winbond(uint16_t port); +void print_winbond_chips(void); /** Table of which config ports to probe for each Super I/O family. */ static const struct { @@ -112,4 +122,17 @@ static const struct { {probe_idregs_winbond, {0x2e, 0x4e, 0x3f0, 0x370, 0x250, EOT}}, }; + +/** Table of functions to print out supported Super I/O chips. */ +static const struct { + void (*print_list) (void); +} vendor_print_functions[] = { + {print_ali_chips}, + {print_fintek_chips}, + {print_ite_chips}, + {print_nsc_chips}, + {print_smsc_chips}, + {print_winbond_chips}, +}; + #endif -- cgit v1.2.3