[U-Boot] [PATCH v2] spl: Allow cache drivers to be used in SPL

Add an option for building cache drivers in SPL.
Signed-off-by: Ley Foon Tan ley.foon.tan@intel.com
--- v2: - Added "depends on CACHE" to SPL_CACHE. - Change to use $(CONFIG_$(SPL_TPL_)CACHE) to enable cache DM build. --- common/spl/Kconfig | 6 ++++++ drivers/Makefile | 1 + drivers/cache/Makefile | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 1f122833a7..ce119d1cc6 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -714,6 +714,12 @@ config SPL_UBI README.ubispl for more info.
if SPL_DM +config SPL_CACHE + depends on CACHE + bool "Support cache drivers in SPL" + help + Enable support for cache drivers in SPL. + config SPL_DM_SPI bool "Support SPI DM drivers in SPL" help diff --git a/drivers/Makefile b/drivers/Makefile index 0befeddfcb..aed591c614 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0+
+obj-$(CONFIG_$(SPL_TPL_)CACHE) += cache/ obj-$(CONFIG_$(SPL_TPL_)CLK) += clk/ obj-$(CONFIG_$(SPL_TPL_)DM) += core/ obj-$(CONFIG_$(SPL_TPL_)DFU) += dfu/ diff --git a/drivers/cache/Makefile b/drivers/cache/Makefile index 4a6458c602..924217044a 100644 --- a/drivers/cache/Makefile +++ b/drivers/cache/Makefile @@ -1,5 +1,5 @@
-obj-$(CONFIG_CACHE) += cache-uclass.o +obj-$(CONFIG_$(SPL_TPL_)CACHE) += cache-uclass.o obj-$(CONFIG_SANDBOX) += sandbox_cache.o obj-$(CONFIG_L2X0_CACHE) += cache-l2x0.o obj-$(CONFIG_V5L2_CACHE) += cache-v5l2.o

On Fri, Nov 29, 2019 at 09:59:26AM +0800, Ley Foon Tan wrote:
Add an option for building cache drivers in SPL.
Signed-off-by: Ley Foon Tan ley.foon.tan@intel.com
Reviewed-by: Tom Rini trini@konsulko.com

Am 02.12.2019 um 17:01 schrieb Tom Rini:
On Fri, Nov 29, 2019 at 09:59:26AM +0800, Ley Foon Tan wrote:
Add an option for building cache drivers in SPL.
Signed-off-by: Ley Foon Tan ley.foon.tan@intel.com
Reviewed-by: Tom Rini trini@konsulko.com
Reviewed-by: Simon Goldschmidt simon.k.r.goldschmidt@gmail.com

On Fri, Nov 29, 2019 at 09:59:26AM +0800, Ley Foon Tan wrote:
Add an option for building cache drivers in SPL.
Signed-off-by: Ley Foon Tan ley.foon.tan@intel.com Reviewed-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Goldschmidt simon.k.r.goldschmidt@gmail.com
Applied to u-boot/master, thanks!
participants (3)
-
Ley Foon Tan
-
Simon Goldschmidt
-
Tom Rini