diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-06-07 00:20:10 +0200 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-06-08 07:39:43 +0200 |
commit | 8e56130dcbcc0608c2531c61f93175e36a300e58 (patch) | |
tree | bbeccbf47c6f4fc0f727b14b6954b536aa00f47b /arch/arm/mach-highbank/highbank.c | |
parent | Merge branch 'imx/fixes' of git://git.pengutronix.de/git/imx/linux-2.6 into f... (diff) | |
download | linux-8e56130dcbcc0608c2531c61f93175e36a300e58.tar.xz linux-8e56130dcbcc0608c2531c61f93175e36a300e58.zip |
ARM: highbank: Add smc calls to enable/disable the L2
Linux runs in non-secure mode on highbank, so we need secure monitor calls
to enable and disable the PL310. Rather than invent new smc calls, the same
calling convention used by OMAP is used here.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-highbank/highbank.c')
-rw-r--r-- | arch/arm/mach-highbank/highbank.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 410a112bb52e..8777612b1a42 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -85,10 +85,24 @@ 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) |