1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-28 23:43:42 +02:00

Makefile: Enable bitbang_spi based on its dependency list

Change-Id: I2a22667cfe14e4c5816b3bce13de632941690d17
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/55880
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Nico Huber 2021-06-27 14:34:16 +02:00
parent c30dd79837
commit be46e43b2a

View File

@ -140,6 +140,12 @@ $(foreach p,$1, \
$(eval override $(p) := no))) $(eval override $(p) := no)))
endef endef
define filter_deps
$(strip $(foreach p,$1, \
$(if $(filter $($(p)),yes), \
$(p))))
endef
define disable_all define disable_all
$(foreach p,$1, \ $(foreach p,$1, \
$(eval override $(p) := no)) $(eval override $(p) := no))
@ -479,27 +485,12 @@ $(foreach var, $(filter CONFIG_%, $(.VARIABLES)),\
endif endif
# Bitbanging SPI infrastructure, default off unless needed. # Bitbanging SPI infrastructure, default off unless needed.
ifeq ($(CONFIG_RAYER_SPI), yes)
override CONFIG_BITBANG_SPI = yes ifneq ($(call filter_deps,$(DEPENDS_ON_BITBANG_SPI)), )
else
ifeq ($(CONFIG_PONY_SPI), yes)
override CONFIG_BITBANG_SPI = yes
else
ifeq ($(CONFIG_INTERNAL), yes)
override CONFIG_BITBANG_SPI = yes
else
ifeq ($(CONFIG_NICINTEL_SPI), yes)
override CONFIG_BITBANG_SPI = yes
else
ifeq ($(CONFIG_OGP_SPI), yes)
override CONFIG_BITBANG_SPI = yes override CONFIG_BITBANG_SPI = yes
else else
CONFIG_BITBANG_SPI ?= no CONFIG_BITBANG_SPI ?= no
endif endif
endif
endif
endif
endif
############################################################################### ###############################################################################
# Handle CONFIG_* variables that depend on others set (and verified) above. # Handle CONFIG_* variables that depend on others set (and verified) above.