summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorUrja Rannikko <urjaman@gmail.com>2016-01-31 22:10:29 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2016-01-31 22:10:29 +0000
commit0870b02516ec9ef90364c3feeb5d0d7dc9c0e785 (patch)
tree016c2ebed9c5ee0cc0f5e5d13b5e1859f4ca0258 /Makefile
parente49edbb8989abe206d144e4ae7bc9f7ae636bada (diff)
downloadast2050-flashrom-0870b02516ec9ef90364c3feeb5d0d7dc9c0e785.zip
ast2050-flashrom-0870b02516ec9ef90364c3feeb5d0d7dc9c0e785.tar.gz
Add support for WCH CH341A as an SPI programmer
Corresponding to flashrom svn r1921. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Urja Rannikko <urjaman@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 21 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8f3b672..25d865d 100644
--- a/Makefile
+++ b/Makefile
@@ -157,7 +157,7 @@ UNSUPPORTED_FEATURES += CONFIG_PONY_SPI=yes
else
override CONFIG_PONY_SPI = no
endif
-# Dediprog, USB-Blaster, PICkit2 and FT2232 are not supported under DOS (missing USB support).
+# Dediprog, USB-Blaster, PICkit2, CH341A and FT2232 are not supported under DOS (missing USB support).
ifeq ($(CONFIG_DEDIPROG), yes)
UNSUPPORTED_FEATURES += CONFIG_DEDIPROG=yes
else
@@ -178,6 +178,11 @@ UNSUPPORTED_FEATURES += CONFIG_PICKIT2_SPI=yes
else
override CONFIG_PICKIT2_SPI = no
endif
+ifeq ($(CONFIG_CH341A_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_CH341A_SPI=yes
+else
+override CONFIG_CH341A_SPI = no
+endif
endif
# FIXME: Should we check for Cygwin/MSVC as well?
@@ -303,7 +308,7 @@ UNSUPPORTED_FEATURES += CONFIG_PONY_SPI=yes
else
override CONFIG_PONY_SPI = no
endif
-# Dediprog, USB-Blaster, PICkit2 and FT2232 are not supported with libpayload (missing libusb support)
+# Dediprog, USB-Blaster, PICkit2, CH341A and FT2232 are not supported with libpayload (missing libusb support)
ifeq ($(CONFIG_DEDIPROG), yes)
UNSUPPORTED_FEATURES += CONFIG_DEDIPROG=yes
else
@@ -324,6 +329,11 @@ UNSUPPORTED_FEATURES += CONFIG_PICKIT2_SPI=yes
else
override CONFIG_PICKIT2_SPI = no
endif
+ifeq ($(CONFIG_CH341A_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_CH341A_SPI=yes
+else
+override CONFIG_CH341A_SPI = no
+endif
endif
ifneq ($(TARGET_OS), Linux)
@@ -505,6 +515,9 @@ CONFIG_LINUX_SPI ?= yes
# Always enable ITE IT8212F PATA controllers for now.
CONFIG_IT8212 ?= yes
+# Winchiphead CH341A
+CONFIG_CH341A_SPI ?= yes
+
# Disable wiki printing by default. It is only useful if you have wiki access.
CONFIG_PRINT_WIKI ?= no
@@ -751,6 +764,12 @@ NEED_LINUX_I2C := yes
PROGRAMMER_OBJS += mstarddc_spi.o
endif
+ifeq ($(CONFIG_CH341A_SPI), yes)
+FEATURE_CFLAGS += -D'CONFIG_CH341A_SPI=1'
+PROGRAMMER_OBJS += ch341a_spi.o
+NEED_LIBUSB1 := yes
+endif
+
ifeq ($(NEED_SERIAL), yes)
LIB_OBJS += serial.o
endif
OpenPOWER on IntegriCloud