summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch
new file mode 100644
index 00000000..32e3a48f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0120-ARM-7397-1-l2x0-only-apply-workaround-for-erratum-75.patch
@@ -0,0 +1,62 @@
1From 8d2876b00b257ea48fddbccfb531ad618d83ed0b Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Fri, 20 Apr 2012 17:21:08 +0100
4Subject: [PATCH 120/165] ARM: 7397/1: l2x0: only apply workaround for erratum
5 #753970 on PL310
6
7commit f154fe9b806574437b47f08e924ad10c0e240b23 upstream.
8
9The workaround for PL310 erratum #753970 can lead to deadlock on systems
10with an L220 cache controller.
11
12This patch makes the workaround effective only when the cache controller
13is identified as a PL310 at probe time.
14
15Signed-off-by: Will Deacon <will.deacon@arm.com>
16Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17[bwh: Backported to 3.2: adjust context]
18Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
19---
20 arch/arm/mm/cache-l2x0.c | 12 ++++++------
21 1 files changed, 6 insertions(+), 6 deletions(-)
22
23diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
24index b1e192b..971d527 100644
25--- a/arch/arm/mm/cache-l2x0.c
26+++ b/arch/arm/mm/cache-l2x0.c
27@@ -32,6 +32,7 @@ static void __iomem *l2x0_base;
28 static DEFINE_RAW_SPINLOCK(l2x0_lock);
29 static uint32_t l2x0_way_mask; /* Bitmask of active ways */
30 static uint32_t l2x0_size;
31+static unsigned long sync_reg_offset = L2X0_CACHE_SYNC;
32
33 struct l2x0_regs l2x0_saved_regs;
34
35@@ -61,12 +62,7 @@ static inline void cache_sync(void)
36 {
37 void __iomem *base = l2x0_base;
38
39-#ifdef CONFIG_PL310_ERRATA_753970
40- /* write to an unmmapped register */
41- writel_relaxed(0, base + L2X0_DUMMY_REG);
42-#else
43- writel_relaxed(0, base + L2X0_CACHE_SYNC);
44-#endif
45+ writel_relaxed(0, base + sync_reg_offset);
46 cache_wait(base + L2X0_CACHE_SYNC, 1);
47 }
48
49@@ -331,6 +327,10 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
50 else
51 ways = 8;
52 type = "L310";
53+#ifdef CONFIG_PL310_ERRATA_753970
54+ /* Unmapped register. */
55+ sync_reg_offset = L2X0_DUMMY_REG;
56+#endif
57 break;
58 case L2X0_CACHE_ID_PART_L210:
59 ways = (aux >> 13) & 0xf;
60--
611.7.7.6
62