summaryrefslogtreecommitdiffstats
path: root/spi.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
commit4740c6ff3c230c83fa618557f94cc6675c5ab3b1 (patch)
tree9e511c0b501d900db3810632231ca8a620a118e6 /spi.c
parentab044b20a2b44097ce65c3fd4f232ee7170303ba (diff)
downloadflashrom-4740c6ff3c230c83fa618557f94cc6675c5ab3b1.tar.gz
flashrom-4740c6ff3c230c83fa618557f94cc6675c5ab3b1.tar.bz2
flashrom-4740c6ff3c230c83fa618557f94cc6675c5ab3b1.zip
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 'spi.c')
-rw-r--r--spi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/spi.c b/spi.c
index 86ffe6962..73709f2fa 100644
--- a/spi.c
+++ b/spi.c
@@ -91,12 +91,14 @@ const struct spi_programmer spi_programmer[] = {
},
#endif
+#if DUMMY_SUPPORT == 1
{ /* SPI_CONTROLLER_DUMMY */
.command = dummy_spi_send_command,
.multicommand = default_spi_send_multicommand,
.read = NULL,
.write_256 = NULL,
},
+#endif
{}, /* This entry corresponds to SPI_CONTROLLER_INVALID. */
};
@@ -301,7 +303,9 @@ int probe_spi_rdid4(struct flashchip *flash)
#if FT2232_SPI_SUPPORT == 1
case SPI_CONTROLLER_FT2232:
#endif
+#if DUMMY_SUPPORT == 1
case SPI_CONTROLLER_DUMMY:
+#endif
return probe_spi_rdid_generic(flash, 4);
default:
printf_debug("4b ID not supported on this SPI controller\n");