diff options
Diffstat (limited to 'arch/arm/mach-mx3/mm.c')
-rw-r--r-- | arch/arm/mach-mx3/mm.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c index 20e48c0195c4..b4ffc531a82c 100644 --- a/arch/arm/mach-mx3/mm.c +++ b/arch/arm/mach-mx3/mm.c | |||
@@ -110,6 +110,24 @@ void __init mx35_init_irq(void) | |||
110 | static int mxc_init_l2x0(void) | 110 | static int mxc_init_l2x0(void) |
111 | { | 111 | { |
112 | void __iomem *l2x0_base; | 112 | void __iomem *l2x0_base; |
113 | void __iomem *clkctl_base; | ||
114 | /* | ||
115 | * First of all, we must repair broken chip settings. There are some | ||
116 | * i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These | ||
117 | * misconfigured CPUs will run amok immediately when the L2 cache gets enabled. | ||
118 | * Workaraound is to setup the correct register setting prior enabling the | ||
119 | * L2 cache. This should not hurt already working CPUs, as they are using the | ||
120 | * same value | ||
121 | */ | ||
122 | #define L2_MEM_VAL 0x10 | ||
123 | |||
124 | clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096); | ||
125 | if (clkctl_base != NULL) { | ||
126 | writel(0x00000515, clkctl_base + L2_MEM_VAL); | ||
127 | iounmap(clkctl_base); | ||
128 | } else { | ||
129 | pr_err("L2 cache: Cannot fix timing. Trying to continue without\n"); | ||
130 | } | ||
113 | 131 | ||
114 | l2x0_base = ioremap(L2CC_BASE_ADDR, 4096); | 132 | l2x0_base = ioremap(L2CC_BASE_ADDR, 4096); |
115 | if (IS_ERR(l2x0_base)) { | 133 | if (IS_ERR(l2x0_base)) { |