summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/omap4-common.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2012-07-04 17:57:34 +0530
committerBenoit Cousson <b-cousson@ti.com>2012-09-07 19:18:41 +0200
commit926fd45ba9eeb4c3d0454b934161ee884dd82a22 (patch)
treecc72dae1f1078300d513e4f6dd76d094c8ba22d9 /arch/arm/mach-omap2/omap4-common.c
parent11c27069cf963f7445a7b515bcb703d90ae0c162 (diff)
downloadlwn-926fd45ba9eeb4c3d0454b934161ee884dd82a22.tar.gz
lwn-926fd45ba9eeb4c3d0454b934161ee884dd82a22.zip
ARM: OMAP4: Add L2 Cache Controller in Device Tree
Provide PL310 Level 2 Cache Controller Device Tree support for OMAP4 based devices. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap4-common.c')
-rw-r--r--arch/arm/mach-omap2/omap4-common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index c29dee998a79..6f95992f37c6 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -16,6 +16,7 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/memblock.h>
+#include <linux/of.h>
#include <asm/hardware/gic.h>
#include <asm/hardware/cache-l2x0.h>
@@ -171,7 +172,10 @@ static int __init omap_l2_cache_init(void)
/* Enable PL310 L2 Cache controller */
omap_smc1(0x102, 0x1);
- l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);
+ if (of_have_populated_dt())
+ l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
+ else
+ l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);
/*
* Override default outer_cache.disable with a OMAP4