summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorIlya A. Volynets-Evenbakh <ilya@total-knowledge.com>2012-09-26 00:47:09 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2012-09-26 00:47:09 +0000
commit2c714ab2244ffd7c37c38bd13929eeb5ab43c357 (patch)
treec703559ce7f98d9060e975f1abe580da9c2131cf /Makefile
parentfbc71ac494a798ed6b19f5895c0f4a5183e9866c (diff)
downloadast2050-flashrom-2c714ab2244ffd7c37c38bd13929eeb5ab43c357.zip
ast2050-flashrom-2c714ab2244ffd7c37c38bd13929eeb5ab43c357.tar.gz
Add support for FT232H
For older versions of libftdi we define TYPE_232H ourselves and this seems to be enough to get at least basic support (and we don't need more than that AFAICT). Corresponding to flashrom svn r1609. Signed-off-by: Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index cf65c71..b087b3d 100644
--- a/Makefile
+++ b/Makefile
@@ -477,6 +477,7 @@ ifeq ($(CONFIG_FT2232_SPI), yes)
FTDILIBS := $(shell pkg-config --libs libftdi 2>/dev/null || printf "%s" "-lftdi -lusb")
# This is a totally ugly hack.
FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'CONFIG_FT2232_SPI=1'")
+FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FT232H := yes" .features && printf "%s" "-D'HAVE_FT232H=1'")
FEATURE_LIBS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "$(FTDILIBS)")
PROGRAMMER_OBJS += ft2232_spi.o
endif
@@ -731,6 +732,12 @@ int main(int argc, char **argv)
endef
export FTDI_TEST
+define FTDI_232H_TEST
+#include <ftdi.h>
+enum ftdi_chip_type type = TYPE_232H;
+endef
+export FTDI_232H_TEST
+
define UTSNAME_TEST
#include <sys/utsname.h>
struct utsname osinfo;
@@ -765,6 +772,11 @@ ifeq ($(CONFIG_FT2232_SPI), yes)
@$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >/dev/null 2>&1 && \
( echo "found."; echo "FTDISUPPORT := yes" >> .features.tmp ) || \
( echo "not found."; echo "FTDISUPPORT := no" >> .features.tmp )
+ @printf "Checking for FT232H support in libftdi... "
+ @echo "$$FTDI_232H_TEST" >> .featuretest.c
+ @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >/dev/null 2>&1 && \
+ ( echo "found."; echo "FT232H := yes" >> .features.tmp ) || \
+ ( echo "not found."; echo "FT232H := no" >> .features.tmp )
endif
ifeq ($(CONFIG_LINUX_SPI), yes)
@printf "Checking if Linux SPI headers are present... "
OpenPOWER on IntegriCloud