cache:L2: Provide *_cache_{enable|disable} function calls
Subsystems (2)
PATCH 1/1 cache:L2: Provide *_cache_{enable|disable} function calls
It seems like L2 is enabled, but more investigation on its configuration is needed
Signed-off-by Lukasz Majewski <[email protected]>
--- arch/arm/cpu/armv7/exynos/soc.c | 12 ++++++++++++ arch/arm/include/asm/pl310.h | 2 ++ arch/arm/lib/cache-pl310.c | 12 ++++++++++++ 3 files changed, 26 insertions(+), 0 deletions(-)
arch/arm/cpu/armv7/exynos/soc.c +12 -0
@@ -23,6 +23,7 @@#include <common.h> #include <asm/io.h> +#include <asm/pl310.h> void reset_cpu (ulong addr) {
@@ -36,3 +37,14 @@ void enable_caches(void) dcache_enable(); }#endif + +#ifndef CONFIG_SYS_L2CACHE_OFF +void v7_outer_cache_enable (void ) +{ +pl310_enable (); +} +void v7_outer_cache_disable (void ) +{ +pl310_disable (); +} +#endif
arch/arm/include/asm/pl310.h +2 -0
@@ -65,6 +65,8 @@ struct pl310_regs {u32 pl310_clean_inv_way; }; +void pl310_enable (void ); +void pl310_disable (void );void pl310_inval_all (void );void pl310_clean_inval_all (void );void pl310_inval_range (u32 start,u32 end);
arch/arm/lib/cache-pl310.c +12 -0
@@ -116,3 +116,15 @@ void v7_outer_cache_inval_range(u32 start, u32 stop)pl310_cache_sync (); } + +void pl310_enable (void ) +{ +writel (1 , &pl310->pl310_ctrl); +printf ("p310_ctrl: 0x%x p310_aux_ctrl: 0x%x\n" , +readl (&pl310->pl310_ctrl),readl (&pl310->pl310_aux_ctrl)); +} + +void pl310_disable (void ) +{ +writel (0 , &pl310->pl310_ctrl); +}
Signature · 8 lines
1.7.2.3 --MP_/7OT0hlOE0TLvqj8kABCHwi2 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-cache-wip-Test-program-to-evaluate-if-L2-is-working.patch