diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-04-26 11:40:26 -0500 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2012-06-22 17:19:48 -0600 |
commit | ba5d1018a177466ff0a1914e50a0d564a874e46a (patch) | |
tree | cd3cd8452407d4da792a4b835765d75bac643977 /arch/arm/mach-highbank/highbank.c | |
parent | 004391208179ca2bd0380294501a05c058453d69 (diff) |
UBUNTU: SAUCE: ARM: highbank: Add smc calls to enable/disable the L2
BugLink: http://bugs.launchpad.net/bugs/1000831
Linux runs in non-secure mode on highbank, so we need secure monitor calls
to enable and disable the PL310.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'arch/arm/mach-highbank/highbank.c')
-rw-r--r-- | arch/arm/mach-highbank/highbank.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 410a112bb52..0ab6b34ba03 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -85,10 +85,25 @@ const static struct of_device_id irq_match[] = { {} }; +#ifdef CONFIG_CACHE_L2X0 +static void highbank_l2x0_disable(void) +{ + /* Disable PL310 L2 Cache controller */ + highbank_smc1(0x102, 0x0); +} +#endif + + static void __init highbank_init_irq(void) { of_irq_init(irq_match); + +#ifdef CONFIG_CACHE_L2X0 + /* Enable PL310 L2 Cache controller */ + highbank_smc1(0x102, 0x1); l2x0_of_init(0, ~0UL); + outer_cache.disable = highbank_l2x0_disable; +#endif } static void __init highbank_timer_init(void) |