aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap4-common.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 22:13:58 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 22:13:58 -0500
commit01539ba2a706ab7d35fc0667dff919ade7f87d63 (patch)
tree5a4bd0cf78007d06690fe4ac06bbd49a5a70bc47 /arch/arm/mach-omap2/omap4-common.c
parent9e9bc9736756f25d6c47b4eba0ebf25b20a6f153 (diff)
parentdc69d1af9e8d9cbbabff88bb35a6782187a22229 (diff)
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (243 commits) omap2: Make OMAP2PLUS select OMAP_DM_TIMER OMAP4: hwmod data: Fix alignment and end of line in structurefields OMAP4: hwmod data: Move the DMA structures OMAP4: hwmod data: Move the smartreflex structures OMAP4: hwmod data: Fix missing SIDLE_SMART_WKUP in smartreflexsysc arm: omap: tusb6010: add name for MUSB IRQ arm: omap: craneboard: Add USB EHCI support omap2+: Initialize serial port for dynamic remuxing for n8x0 omap2+: Add struct omap_board_data and use it for platform level serial init omap2+: Allow hwmod state changes to mux pads based on the state changes omap2+: Add support for hwmod specific muxing of devices omap2+: Add omap_mux_get_by_name OMAP2: PM: fix compile error when !CONFIG_SUSPEND MAINTAINERS: OMAP: hwmod: update hwmod code, data maintainership OMAP4: Smartreflex framework extensions OMAP4: hwmod: Add inital data for smartreflex modules. OMAP4: PM: Program correct init voltages for scalable VDDs OMAP4: Adding voltage driver support OMAP4: Register voltage PMIC parameters with the voltage layer OMAP3: PM: Program correct init voltages for VDD1 and VDD2 ... Fix up trivial conflict in arch/arm/plat-omap/Kconfig
Diffstat (limited to 'arch/arm/mach-omap2/omap4-common.c')
-rw-r--r--arch/arm/mach-omap2/omap4-common.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 666e852988d5..19268647ce36 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -54,6 +54,8 @@ static void omap4_l2x0_disable(void)
54 54
55static int __init omap_l2_cache_init(void) 55static int __init omap_l2_cache_init(void)
56{ 56{
57 u32 aux_ctrl = 0;
58
57 /* 59 /*
58 * To avoid code running on other OMAPs in 60 * To avoid code running on other OMAPs in
59 * multi-omap builds 61 * multi-omap builds
@@ -65,18 +67,32 @@ static int __init omap_l2_cache_init(void)
65 l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K); 67 l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K);
66 BUG_ON(!l2cache_base); 68 BUG_ON(!l2cache_base);
67 69
68 /* Enable PL310 L2 Cache controller */
69 omap_smc1(0x102, 0x1);
70
71 /* 70 /*
72 * 16-way associativity, parity disabled 71 * 16-way associativity, parity disabled
73 * Way size - 32KB (es1.0) 72 * Way size - 32KB (es1.0)
74 * Way size - 64KB (es2.0 +) 73 * Way size - 64KB (es2.0 +)
75 */ 74 */
76 if (omap_rev() == OMAP4430_REV_ES1_0) 75 aux_ctrl = ((1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
77 l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff); 76 (0x1 << 25) |
78 else 77 (0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
79 l2x0_init(l2cache_base, 0x0e070000, 0xc0000fff); 78 (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT));
79
80 if (omap_rev() == OMAP4430_REV_ES1_0) {
81 aux_ctrl |= 0x2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT;
82 } else {
83 aux_ctrl |= ((0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
84 (1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
85 (1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
86 (1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
87 (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT));
88 }
89 if (omap_rev() != OMAP4430_REV_ES1_0)
90 omap_smc1(0x109, aux_ctrl);
91
92 /* Enable PL310 L2 Cache controller */
93 omap_smc1(0x102, 0x1);
94
95 l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);
80 96
81 /* 97 /*
82 * Override default outer_cache.disable with a OMAP4 98 * Override default outer_cache.disable with a OMAP4