summaryrefslogtreecommitdiffstats
path: root/flash.h
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 /flash.h
parentab044b20a2b44097ce65c3fd4f232ee7170303ba (diff)
downloadast2050-flashrom-4740c6ff3c230c83fa618557f94cc6675c5ab3b1.zip
ast2050-flashrom-4740c6ff3c230c83fa618557f94cc6675c5ab3b1.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 'flash.h')
-rw-r--r--flash.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/flash.h b/flash.h
index dce0e41..2a54806 100644
--- a/flash.h
+++ b/flash.h
@@ -82,10 +82,18 @@ typedef unsigned long chipaddr;
enum programmer {
PROGRAMMER_INTERNAL,
+#if DUMMY_SUPPORT == 1
PROGRAMMER_DUMMY,
+#endif
+#if NIC3COM_SUPPORT == 1
PROGRAMMER_NIC3COM,
+#endif
+#if DRKAISER_SUPPORT == 1
PROGRAMMER_DRKAISER,
+#endif
+#if SATASII_SUPPORT == 1
PROGRAMMER_SATASII,
+#endif
PROGRAMMER_IT87SPI,
#if FT2232_SPI_SUPPORT == 1
PROGRAMMER_FT2232SPI,
@@ -375,10 +383,11 @@ uint8_t mmio_readb(void *addr);
uint16_t mmio_readw(void *addr);
uint32_t mmio_readl(void *addr);
void internal_delay(int usecs);
-int fallback_shutdown(void);
+int noop_shutdown(void);
void *fallback_map(const char *descr, unsigned long phys_addr, size_t len);
void fallback_unmap(void *virt_addr, size_t len);
-void fallback_chip_writeb(uint8_t val, chipaddr addr);
+uint8_t noop_chip_readb(const chipaddr addr);
+void noop_chip_writeb(uint8_t val, chipaddr addr);
void fallback_chip_writew(uint16_t val, chipaddr addr);
void fallback_chip_writel(uint32_t val, chipaddr addr);
void fallback_chip_writen(uint8_t *buf, chipaddr addr, size_t len);
@@ -474,7 +483,9 @@ enum spi_controller {
#if FT2232_SPI_SUPPORT == 1
SPI_CONTROLLER_FT2232,
#endif
+#if DUMMY_SUPPORT == 1
SPI_CONTROLLER_DUMMY,
+#endif
SPI_CONTROLLER_INVALID /* This must always be the last entry. */
};
extern const int spi_programmer_count;
OpenPOWER on IntegriCloud