summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-09-16 10:09:21 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-09-16 10:09:21 +0000
commit2fa6f73ce19a6c3582f597cfa331766c94c10963 (patch)
tree9e511c0b501d900db3810632231ca8a620a118e6 /flashrom.c
parent41f78375687690549a26eca62552b4576bd1fea4 (diff)
downloadflashrom-2fa6f73ce19a6c3582f597cfa331766c94c10963.zip
flashrom-2fa6f73ce19a6c3582f597cfa331766c94c10963.tar.gz
Allow to exclude each of the external programmer drivers from being compiled in
Example make commandline if you want only internal programmers: make CONFIG_FT2232SPI=no CONFIG_SERPROG=no CONFIG_NIC3COM=no CONFIG_SATASII=no CONFIG_DRKAISER=no CONFIG_DUMMY=no Of course, all of the CONFIG_* symbols can be mixed and matched as needed. CONFIG_FT2232SPI is special because even if it is enabled, make will check if the headers are available and skip it otherwise. Corresponding to flashrom svn r724. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/flashrom.c b/flashrom.c
index 6c03d93..fc69f25 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -54,6 +54,7 @@ const struct programmer_entry programmer_table[] = {
.delay = internal_delay,
},
+#if DUMMY_SUPPORT == 1
{
.name = "dummy",
.init = dummy_init,
@@ -70,7 +71,9 @@ const struct programmer_entry programmer_table[] = {
.chip_writen = dummy_chip_writen,
.delay = internal_delay,
},
+#endif
+#if NIC3COM_SUPPORT == 1
{
.name = "nic3com",
.init = nic3com_init,
@@ -87,7 +90,9 @@ const struct programmer_entry programmer_table[] = {
.chip_writen = fallback_chip_writen,
.delay = internal_delay,
},
+#endif
+#if DRKAISER_SUPPORT == 1
{
.name = "drkaiser",
.init = drkaiser_init,
@@ -104,7 +109,9 @@ const struct programmer_entry programmer_table[] = {
.chip_writen = fallback_chip_writen,
.delay = internal_delay,
},
+#endif
+#if SATASII_SUPPORT == 1
{
.name = "satasii",
.init = satasii_init,
@@ -121,18 +128,19 @@ const struct programmer_entry programmer_table[] = {
.chip_writen = fallback_chip_writen,
.delay = internal_delay,
},
+#endif
{
.name = "it87spi",
.init = it87spi_init,
- .shutdown = fallback_shutdown,
+ .shutdown = noop_shutdown,
.map_flash_region = fallback_map,
.unmap_flash_region = fallback_unmap,
- .chip_readb = dummy_chip_readb,
+ .chip_readb = noop_chip_readb,
.chip_readw = fallback_chip_readw,
.chip_readl = fallback_chip_readl,
.chip_readn = fallback_chip_readn,
- .chip_writeb = fallback_chip_writeb,
+ .chip_writeb = noop_chip_writeb,
.chip_writew = fallback_chip_writew,
.chip_writel = fallback_chip_writel,
.chip_writen = fallback_chip_writen,
@@ -143,14 +151,14 @@ const struct programmer_entry programmer_table[] = {
{
.name = "ft2232spi",
.init = ft2232_spi_init,
- .shutdown = fallback_shutdown,
+ .shutdown = noop_shutdown, /* Missing shutdown */
.map_flash_region = fallback_map,
.unmap_flash_region = fallback_unmap,
- .chip_readb = dummy_chip_readb,
+ .chip_readb = noop_chip_readb,
.chip_readw = fallback_chip_readw,
.chip_readl = fallback_chip_readl,
.chip_readn = fallback_chip_readn,
- .chip_writeb = fallback_chip_writeb,
+ .chip_writeb = noop_chip_writeb,
.chip_writew = fallback_chip_writew,
.chip_writel = fallback_chip_writel,
.chip_writen = fallback_chip_writen,
@@ -793,9 +801,15 @@ int main(int argc, char *argv[])
print_supported_boards();
printf("\nSupported PCI devices flashrom can use "
"as programmer:\n\n");
+#if NIC3COM_SUPPORT == 1
print_supported_pcidevs(nics_3com);
+#endif
+#if DRKAISER_SUPPORT == 1
print_supported_pcidevs(drkaiser_pcidev);
+#endif
+#if SATASII_SUPPORT == 1
print_supported_pcidevs(satas_sii);
+#endif
exit(0);
}
OpenPOWER on IntegriCloud