From: Philip Oberfichtner <pro@denx.de>
To: u-boot@lists.denx.de
Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>,
Stefano Babic <sbabic@denx.de>, Marek Vasut <marex@denx.de>,
Philip Oberfichtner <pro@denx.de>,
Bharat Gooty <bharat.gooty@broadcom.com>,
Dzmitry Sankouski <dsankouski@gmail.com>,
Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
Sean Anderson <sean.anderson@seco.com>, Stefan Roese <sr@denx.de>,
Tom Rini <trini@konsulko.com>
Subject: [PATCH v3 2/3] ARM: cache: Allow SPL to build cache-pl310.c
Date: Tue, 9 Aug 2022 12:07:01 +0200 [thread overview]
Message-ID: <20220809100703.3101047-3-pro@denx.de> (raw)
In-Reply-To: <20220809100703.3101047-1-pro@denx.de>
Introduce the new Kconfig symbol CONFIG_SPL_SYS_L2_PL310 to allow the
SPL to build cache-pl310.c.
Before this commit, the SPL could enable the PL310 L2 cache [1], but the
cache maintenance functions from cache-pl310.c were only useable for
non-SPL builds.
After enabling the cache one must be able to flush it, too. Thus this
commit allows cache-pl310.c to be included in the SPL build.
[1] See for example arch/arm/mach-imx/cache.c: v7_outer_cache_enable()
Signed-off-by: Philip Oberfichtner <pro@denx.de>
---
Changes in v3:
- Introduce CONFIG_SPL_SYS_L2_PL310
arch/arm/Kconfig | 5 +++++
arch/arm/lib/Makefile | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index dde06bdd96..0bc03c921a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -493,6 +493,11 @@ config SYS_L2_PL310
help
Enable support for ARM PL310 L2 cache controller in U-Boot
+config SPL_SYS_L2_PL310
+ bool "ARM PL310 L2 cache controller in SPL"
+ help
+ Enable support for ARM PL310 L2 cache controller in SPL
+
config SYS_L2CACHE_OFF
bool "L2cache off"
help
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index c603fe61bc..d137b4bf0f 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -33,7 +33,6 @@ obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
obj-$(CONFIG_CMD_BOOTM) += bootm.o
obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
-obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
else
obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o
obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
@@ -46,6 +45,7 @@ else
obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMSET) += memset.o
obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMCPY) += memcpy.o
endif
+obj-$(CONFIG_$(SPL_TPL_)SYS_L2_PL310) += cache-pl310.o
obj-$(CONFIG_$(SPL_TPL_)SEMIHOSTING) += semihosting.o
ifneq ($(filter y,$(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR) $(CONFIG_SAVE_PREV_BL_FDT_ADDR)),)
--
2.37.1
next prev parent reply other threads:[~2022-08-09 10:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 10:06 [PATCH v3 0/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL Philip Oberfichtner
2022-08-09 10:07 ` [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig Philip Oberfichtner
2022-08-09 10:58 ` Pali Rohár
2022-08-09 11:16 ` Marek Vasut
2022-08-09 11:21 ` Pali Rohár
2022-08-09 11:27 ` Marek Vasut
2022-08-09 11:32 ` Pali Rohár
2022-08-09 11:38 ` Marek Vasut
2022-08-09 12:59 ` Pali Rohár
2022-08-09 13:16 ` Marek Behún
2022-08-09 13:18 ` Marek Behún
2022-08-09 13:46 ` Tom Rini
2022-08-09 16:03 ` Marek Vasut
2022-08-09 16:36 ` Tom Rini
2022-08-09 18:27 ` Marek Vasut
2022-08-11 10:17 ` Philip Oberfichtner
2022-08-16 14:42 ` Philip Oberfichtner
2022-08-09 14:32 ` Phil Sutter
2022-08-12 8:39 ` Soeren Moch
2022-08-09 10:07 ` Philip Oberfichtner [this message]
2022-08-09 10:07 ` [PATCH v3 3/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL Philip Oberfichtner
2022-08-09 11:17 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220809100703.3101047-3-pro@denx.de \
--to=pro@denx.de \
--cc=bharat.gooty@broadcom.com \
--cc=cniedermaier@dh-electronics.com \
--cc=dsankouski@gmail.com \
--cc=marex@denx.de \
--cc=rayagonda.kokatanur@broadcom.com \
--cc=sbabic@denx.de \
--cc=sean.anderson@seco.com \
--cc=sr@denx.de \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.