summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-05-31 18:00:57 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-05-31 18:00:57 +0000
commitb8afecd0f5b87d319e5be385d670bb6bf368d7f8 (patch)
tree97fc6f5f98b27d821d7a3a917742ea8020bd4528 /flashrom.c
parent1dfe0ff1745118406f2ca0d03340dd346cc39770 (diff)
downloadast2050-flashrom-b8afecd0f5b87d319e5be385d670bb6bf368d7f8.zip
ast2050-flashrom-b8afecd0f5b87d319e5be385d670bb6bf368d7f8.tar.gz
Add IT87xx SPI as external flasher option
This is a fast way to test if a IT87xx board_enable() would work. Corresponding to flashrom svn r557. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Tested-by: Harald Gutmann <harald.gutmann@gmx.net> Acked-by: Harald Gutmann <harald.gutmann@gmx.net>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/flashrom.c b/flashrom.c
index c47c6fd..5113a6b 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -87,6 +87,19 @@ const struct programmer_entry programmer_table[] = {
.chip_writel = fallback_chip_writel,
},
+ {
+ .init = it87spi_init,
+ .shutdown = dummy_shutdown,
+ .map_flash_region = dummy_map,
+ .unmap_flash_region = dummy_unmap,
+ .chip_readb = dummy_chip_readb,
+ .chip_readw = dummy_chip_readw,
+ .chip_readl = dummy_chip_readl,
+ .chip_writeb = dummy_chip_writeb,
+ .chip_writew = dummy_chip_writew,
+ .chip_writel = dummy_chip_writel,
+ },
+
{},
};
@@ -400,7 +413,7 @@ void usage(const char *name)
" -i | --image <name>: only flash image name from flash layout\n"
" -L | --list-supported: print supported devices\n"
" -p | --programmer <name>: specify the programmer device\n"
- " (internal, dummy, nic3com, satasii)\n"
+ " (internal, dummy, nic3com, satasii, it87spi)\n"
" -h | --help: print this help text\n"
" -R | --version: print the version (release)\n"
"\nIf no file is specified, then all that happens"
@@ -532,6 +545,8 @@ int main(int argc, char *argv[])
programmer = PROGRAMMER_SATASII;
if (optarg[7] == '=')
pcidev_bdf = strdup(optarg + 8);
+ } else if (strncmp(optarg, "it87spi", 7) == 0) {
+ programmer = PROGRAMMER_IT87SPI;
} else {
printf("Error: Unknown programmer.\n");
exit(1);
OpenPOWER on IntegriCloud