Skip to content

Commit

Permalink
ARM: OMAP4: Add L2 Cache Controller in Device Tree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Santosh Shilimkar authored and Benoit Cousson committed Sep 7, 2012
1 parent 11c2706 commit 926fd45
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions arch/arm/boot/dts/omap4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,21 @@
cpus {
cpu@0 {
compatible = "arm,cortex-a9";
next-level-cache = <&L2>;
};
cpu@1 {
compatible = "arm,cortex-a9";
next-level-cache = <&L2>;
};
};

L2: l2-cache-controller@48242000 {
compatible = "arm,pl310-cache";
reg = <0x48242000 0x1000>;
cache-unified;
cache-level = <2>;
};

/*
* The soc node represents the soc top level view. It is uses for IPs
* that are not memory mapped in the MPU view or for the MPU itself.
Expand Down
6 changes: 5 additions & 1 deletion arch/arm/mach-omap2/omap4-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 926fd45

Please sign in to comment.