diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-12 11:54:51 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-12 11:54:51 +0000 |
commit | 098913dadfcb9e5205112ee05ec3042bbd4cb277 (patch) | |
tree | 22040c256a0bca0783c6d106b3793d84ac3652cb /util/flashrom/chipset_enable.c | |
parent | 2aa14367774bc19ab4df4ff527e15d5e73258ddd (diff) | |
download | coreboot-098913dadfcb9e5205112ee05ec3042bbd4cb277.tar.xz |
Add --list-supported option to flashrom which lists the supported
ROM chips, chipsets, and mainboards (Closes #90).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Ward Vandewege <ward@gnu.org>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3133 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/chipset_enable.c')
-rw-r--r-- | util/flashrom/chipset_enable.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/util/flashrom/chipset_enable.c b/util/flashrom/chipset_enable.c index 84cb191cf6..872f25495e 100644 --- a/util/flashrom/chipset_enable.c +++ b/util/flashrom/chipset_enable.c @@ -561,6 +561,17 @@ static const FLASH_ENABLE enables[] = { {0x1166, 0x0205, "Broadcom HT-1000", enable_flash_ht1000}, }; +void print_supported_chipsets(void) +{ + int i; + + printf("\nSupported chipsets:\n\n"); + + for (i = 0; i < ARRAY_SIZE(enables); i++) + printf("%s (%04x:%04x)\n", enables[i].name, + enables[i].vendor, enables[i].device); +} + int chipset_flash_enable(void) { struct pci_dev *dev = 0; @@ -568,8 +579,7 @@ int chipset_flash_enable(void) int i; /* Now let's try to find the chipset we have... */ - /* TODO: Use ARRAY_SIZE. */ - for (i = 0; i < sizeof(enables) / sizeof(enables[0]); i++) { + for (i = 0; i < ARRAY_SIZE(enables); i++) { dev = pci_dev_find(enables[i].vendor, enables[i].device); if (dev) break; |