summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap4-common.c
diff options
context:
space:
mode:
authorSantosh Shilimkar2010-09-16 15:14:47 +0200
committerSantosh Shilimkar2010-09-24 08:00:18 +0200
commita777b7277ef9b04481d4ceaac353bb4bd82e2f1e (patch)
treefc155c8b74e7f47f0aa2409cf2e1aeab6d389039 /arch/arm/mach-omap2/omap4-common.c
parentomap4: Update id.c and cpu.h for es2.0 (diff)
downloadkernel-qcow2-linux-a777b7277ef9b04481d4ceaac353bb4bd82e2f1e.tar.gz
kernel-qcow2-linux-a777b7277ef9b04481d4ceaac353bb4bd82e2f1e.tar.xz
kernel-qcow2-linux-a777b7277ef9b04481d4ceaac353bb4bd82e2f1e.zip
omap4: l2x0: Fix init parameter for es2.0
On ES2.0 the L2 cache init parameter ineeds to be changed to take care of cache size. The cache size is 1MB on ES2.0 vs 512KB on ES1.0 This patch fixes the init parameter to update the same using dynamic cpu version check Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap4-common.c')
-rw-r--r--arch/arm/mach-omap2/omap4-common.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 13dc9794dcc2..923f9f5f91ce 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -61,10 +61,14 @@ static int __init omap_l2_cache_init(void)
omap_smc1(0x102, 0x1);
/*
- * 32KB way size, 16-way associativity,
- * parity disabled
+ * 16-way associativity, parity disabled
+ * Way size - 32KB (es1.0)
+ * Way size - 64KB (es2.0 +)
*/
- l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
+ if (omap_rev() == OMAP4430_REV_ES1_0)
+ l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
+ else
+ l2x0_init(l2cache_base, 0x0e070000, 0xc0000fff);
return 0;
}