[PATCH]armv7: cache: support L2 cache disable

PL310 is the L2$ controller from ARM used in many SoCs. Before jumping to linux, UBoot will call v7_outer_cache_disable in cleanup_before_linux_select to disable L2$. This patch is to support cache disable of PL310.
Signed-off-by: Haifeng Li haifeng.li@timesintelli.com
arch/arm/lib/cache-pl310.c | 5 +++++ 1 file changed, 5 insertions(+)

On Fri, Mar 18, 2022 at 06:16:45PM +0800, haifeng.li@timesintelli.com wrote:
PL310 is the L2$ controller from ARM used in many SoCs. Before jumping to linux, UBoot will call v7_outer_cache_disable in cleanup_before_linux_select to disable L2$. This patch is to support cache disable of PL310.
Signed-off-by: Haifeng Li haifeng.li@timesintelli.com
arch/arm/lib/cache-pl310.c | 5 +++++ 1 file changed, 5 insertions(+)
Please re-send with the patch itself inline, thanks.

PL310 is the L2$ controller from ARM used in many SoCs. Before jumping to linux, UBoot will call v7_outer_cache_disable in cleanup_before_linux_select to disable L2$. This patch is to support cache disable of PL310.
Signed-off-by: Haifeng Li haifeng.li@timesintelli.com ---
arch/arm/lib/cache-pl310.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/lib/cache-pl310.c b/arch/arm/lib/cache-pl310.c index bbaaaa4157..4fd6eda07a 100644 --- a/arch/arm/lib/cache-pl310.c +++ b/arch/arm/lib/cache-pl310.c @@ -13,6 +13,11 @@
struct pl310_regs *const pl310 = (struct pl310_regs *)CONFIG_SYS_PL310_BASE;
+void v7_outer_cache_disable(void) +{ + writel(0, &pl310->pl310_ctrl); +} + static void pl310_cache_sync(void) { writel(0, &pl310->pl310_cache_sync);

please ignore this thread. I re-sent the patch inline in another thread as Tom mentioned.
Thanks, Haifeng ------------------------------------------------------------------ From:Haifeng Li haifeng.li@timesintelli.com Sent At:2022 Mar. 18 (Fri.) 21:05 To:Tom Rini trini@konsulko.com Cc:u-boot u-boot@lists.denx.de Subject:Re: [PATCH]armv7: cache: support L2 cache disable
PL310 is the L2$ controller from ARM used in many SoCs. Before jumping to linux, UBoot will call v7_outer_cache_disable in cleanup_before_linux_select to disable L2$. This patch is to support cache disable of PL310.
Signed-off-by: Haifeng Li haifeng.li@timesintelli.com ---
arch/arm/lib/cache-pl310.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/lib/cache-pl310.c b/arch/arm/lib/cache-pl310.c index bbaaaa4157..4fd6eda07a 100644 --- a/arch/arm/lib/cache-pl310.c +++ b/arch/arm/lib/cache-pl310.c @@ -13,6 +13,11 @@
struct pl310_regs *const pl310 = (struct pl310_regs *)CONFIG_SYS_PL310_BASE;
+void v7_outer_cache_disable(void) +{ + writel(0, &pl310->pl310_ctrl); +} + static void pl310_cache_sync(void) { writel(0, &pl310->pl310_cache_sync);
participants (3)
-
Haifeng Li
-
haifeng.li@timesintelli.com
-
Tom Rini