summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2020-03-26 00:00:41 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2020-05-04 00:52:42 +0000
commitd97f87b00cc8301b91023301a24e690146d74cef (patch)
tree17b3fe03e064bcafbdc74d3473a80983ee9ec0ff /Makefile
parent3ef0df067b4f14c230a411b2e3726492e60ae24b (diff)
downloadflashrom-d97f87b00cc8301b91023301a24e690146d74cef.tar.gz
flashrom-d97f87b00cc8301b91023301a24e690146d74cef.tar.bz2
flashrom-d97f87b00cc8301b91023301a24e690146d74cef.zip
Initial Realtek MST i2c_spi support
This spi master allows for programming of a Realtek RTD2142 MST with external SPI flash chip routed via its internal i2c transport mechanism. BUG=b:152558985,b:148745673 BRANCH=none TEST=echo "00000000:0004ffff fw" > layout && \ flashrom -p realtek_mst_i2c_spi:bus=8 -l layout -i fw:dump.bin -r && \ flashrom -p realtek_mst_i2c_spi:bus=8 -l layout -i fw:dump.bin -w && \ flashrom -p realtek_mst_i2c_spi:bus=8 --flash-size && \ flashrom -p realtek_mst_i2c_spi:bus=8 --flash-name Change-Id: I892e0be776fe605e69fb39c77abf3016591d7123 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/40667 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Shiyu Sun <sshiyu@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a533acf3c..31e987c7c 100644
--- a/Makefile
+++ b/Makefile
@@ -200,6 +200,11 @@ UNSUPPORTED_FEATURES += CONFIG_LSPCON_I2C_SPI=yes
else
override CONFIG_LSPCON_I2C_SPI = no
endif
+ifeq ($(CONFIG_REALTEK_MST_I2C_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_REALTEK_MST_I2C_SPI=yes
+else
+override CONFIG_REALTEK_MST_I2C_SPI = no
+endif
# libjaylink is also not available for DOS
ifeq ($(CONFIG_JLINK_SPI), yes)
UNSUPPORTED_FEATURES += CONFIG_JLINK_SPI=yes
@@ -316,6 +321,11 @@ UNSUPPORTED_FEATURES += CONFIG_LSPCON_I2C_SPI=yes
else
override CONFIG_LSPCON_I2C_SPI = no
endif
+ifeq ($(CONFIG_REALTEK_MST_I2C_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_REALTEK_MST_I2C_SPI=yes
+else
+override CONFIG_REALTEK_MST_I2C_SPI = no
+endif
endif
ifneq ($(TARGET_OS), MinGW)
@@ -396,6 +406,11 @@ UNSUPPORTED_FEATURES += CONFIG_LSPCON_I2C_SPI=yes
else
override CONFIG_LSPCON_I2C_SPI = no
endif
+ifeq ($(CONFIG_REALTEK_MST_I2C_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_REALTEK_MST_I2C_SPI=yes
+else
+override CONFIG_REALTEK_MST_I2C_SPI = no
+endif
ifeq ($(CONFIG_CH341A_SPI), yes)
UNSUPPORTED_FEATURES += CONFIG_CH341A_SPI=yes
else
@@ -674,6 +689,9 @@ CONFIG_STLINKV3_SPI ?= yes
# Disables LSPCON support until the i2c helper supports multiple systems.
CONFIG_LSPCON_I2C_SPI ?= no
+# Disables REALTEK_MST support until the i2c helper supports multiple systems.
+CONFIG_REALTEK_MST_I2C_SPI ?= no
+
# Always enable dummy tracing for now.
CONFIG_DUMMY ?= yes
@@ -755,6 +773,7 @@ override CONFIG_PICKIT2_SPI = no
override CONFIG_RAIDEN = no
override CONFIG_STLINKV3_SPI = no
override CONFIG_LSPCON_I2C_SPI = no
+override CONFIG_REALTEK_MST_I2C_SPI = no
endif
ifeq ($(CONFIG_ENABLE_LIBPCI_PROGRAMMERS), no)
override CONFIG_INTERNAL = no
@@ -939,6 +958,11 @@ PROGRAMMER_OBJS += lspcon_i2c_spi.o
NEED_LIBUSB1 += CONFIG_LSPCON_I2C_SPI
endif
+ifeq ($(CONFIG_REALTEK_MST_I2C_SPI), yes)
+FEATURE_CFLAGS += -D'CONFIG_REALTEK_MST_I2C_SPI=1'
+PROGRAMMER_OBJS += realtek_mst_i2c_spi.o
+endif
+
ifneq ($(NEED_LIBFTDI), )
FTDILIBS := $(call debug_shell,[ -n "$(PKG_CONFIG_LIBDIR)" ] && export PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)" ; $(PKG_CONFIG) --libs libftdi1 || $(PKG_CONFIG) --libs libftdi || printf "%s" "-lftdi -lusb")
FEATURE_CFLAGS += $(call debug_shell,grep -q "FT232H := yes" .features && printf "%s" "-D'HAVE_FT232H=1'")