summaryrefslogtreecommitdiff
path: root/internal.c
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-12-13 22:28:00 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-12-13 22:28:00 +0000
commit122c82201036a90f7440a0908f5dc22780ce1ef4 (patch)
treedf65fe458cd52070208d9e46e23418a015b16696 /internal.c
parent6e653bf747b63f5e650ee9ebbdd070860342fb3e (diff)
downloadflashrom-122c82201036a90f7440a0908f5dc22780ce1ef4.tar.gz
Internal (onboard) programming was the only feature which could not be
disabled. Make various pieces of code conditional on support for internal programming. Code shared between PCI device programmers and onboard programming is now conditional as well. It is now possible to build only with dummy support: make CONFIG_INTERNAL=no CONFIG_NIC3COM=no CONFIG_SATASII=no CONFIG_DRKAISER=no CONFIG_SERPROG=no CONFIG_FT2232SPI=no This allows building for a specific use case only, and it also facilitates porting to a new architecture because it is possible to focus on highlevel code only. Note: Either internal or dummy programmer needs to be compiled in due to the current behaviour of always picking a default programmer if -p is not specified. Picking an arbitrary external programmer as default wouldn't make sense. Build and runtime tested in all 1024 possible build combinations. The only failures are by design as mentioned above. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@797 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'internal.c')
-rw-r--r--internal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal.c b/internal.c
index fc662c5..cfb83d7 100644
--- a/internal.c
+++ b/internal.c
@@ -31,6 +31,7 @@
int io_fd;
#endif
+#if NEED_PCI == 1
struct pci_dev *pci_dev_find_filter(struct pci_filter filter)
{
struct pci_dev *temp;
@@ -99,6 +100,7 @@ struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device,
return NULL;
}
+#endif
void get_io_perms(void)
{
@@ -122,6 +124,7 @@ void release_io_perms(void)
#endif
}
+#if INTERNAL_SUPPORT == 1
int internal_init(void)
{
int ret = 0;
@@ -163,6 +166,7 @@ int internal_shutdown(void)
return 0;
}
+#endif
void internal_chip_writeb(uint8_t val, chipaddr addr)
{