summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorRudolf Marek <r.marek@assembler.cz>2009-05-17 19:39:27 +0000
committerRudolf Marek <r.marek@assembler.cz>2009-05-17 19:39:27 +0000
commit68720c7bed9294907dfc49c6f40b692947b52299 (patch)
tree6c429d105f1c3a0901af2770065c1ed0e9f72c71 /flashrom.c
parente186da6b1558f0a2b697911627a428d4dfbcdcc0 (diff)
downloadast2050-flashrom-68720c7bed9294907dfc49c6f40b692947b52299.zip
ast2050-flashrom-68720c7bed9294907dfc49c6f40b692947b52299.tar.gz
This patch adds support for BIOS flashing on the all SiliconImage SATA controllers
It was easy because 1) flashrom has now nice API 2) documentation is public on the web site Corresponding to flashrom svn r527. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/flashrom.c b/flashrom.c
index 925b05b..fa6e06a 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -74,6 +74,19 @@ const struct programmer_entry programmer_table[] = {
.chip_writel = fallback_chip_writel,
},
+ {
+ .init = satasii_init,
+ .shutdown = satasii_shutdown,
+ .map_flash_region = satasii_map,
+ .unmap_flash_region = satasii_unmap,
+ .chip_readb = satasii_chip_readb,
+ .chip_readw = fallback_chip_readw,
+ .chip_readl = fallback_chip_readl,
+ .chip_writeb = satasii_chip_writeb,
+ .chip_writew = fallback_chip_writew,
+ .chip_writel = fallback_chip_writel,
+ },
+
{},
};
@@ -503,6 +516,10 @@ int main(int argc, char *argv[])
programmer = PROGRAMMER_NIC3COM;
if (optarg[7] == '=')
pcidev_bdf = strdup(optarg + 8);
+ } else if (strncmp(optarg, "satasii", 7) == 0) {
+ programmer = PROGRAMMER_SATASII;
+ if (optarg[7] == '=')
+ pcidev_bdf = strdup(optarg + 8);
} else {
printf("Error: Unknown programmer.\n");
exit(1);
OpenPOWER on IntegriCloud