summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch
new file mode 100644
index 00000000..ffd9e263
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.17/0121-ARM-7398-1-l2x0-only-write-to-debug-registers-on-PL3.patch
@@ -0,0 +1,69 @@
1From a927ce0f8dd30f05ced7a71a5523ca5d82eab5d6 Mon Sep 17 00:00:00 2001
2From: Will Deacon <will.deacon@arm.com>
3Date: Fri, 20 Apr 2012 17:22:11 +0100
4Subject: [PATCH 121/165] ARM: 7398/1: l2x0: only write to debug registers on
5 PL310
6
7commit ab4d536890853ab6675ede65db40e2c0980cb0ea upstream.
8
9PL310 errata #588369 and #727915 require writes to the debug registers
10of the cache controller to work around known problems. Writing these
11registers on L220 may cause deadlock, so ensure that we only perform
12this operation when we identify a PL310 at probe time.
13
14Signed-off-by: Will Deacon <will.deacon@arm.com>
15Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 arch/arm/mm/cache-l2x0.c | 13 ++++++++-----
19 1 files changed, 8 insertions(+), 5 deletions(-)
20
21diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
22index 971d527..db7bcc0 100644
23--- a/arch/arm/mm/cache-l2x0.c
24+++ b/arch/arm/mm/cache-l2x0.c
25@@ -81,10 +81,13 @@ static inline void l2x0_inv_line(unsigned long addr)
26 }
27
28 #if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915)
29+static inline void debug_writel(unsigned long val)
30+{
31+ if (outer_cache.set_debug)
32+ outer_cache.set_debug(val);
33+}
34
35-#define debug_writel(val) outer_cache.set_debug(val)
36-
37-static void l2x0_set_debug(unsigned long val)
38+static void pl310_set_debug(unsigned long val)
39 {
40 writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL);
41 }
42@@ -94,7 +97,7 @@ static inline void debug_writel(unsigned long val)
43 {
44 }
45
46-#define l2x0_set_debug NULL
47+#define pl310_set_debug NULL
48 #endif
49
50 #ifdef CONFIG_PL310_ERRATA_588369
51@@ -331,6 +334,7 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
52 /* Unmapped register. */
53 sync_reg_offset = L2X0_DUMMY_REG;
54 #endif
55+ outer_cache.set_debug = pl310_set_debug;
56 break;
57 case L2X0_CACHE_ID_PART_L210:
58 ways = (aux >> 13) & 0xf;
59@@ -379,7 +383,6 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
60 outer_cache.flush_all = l2x0_flush_all;
61 outer_cache.inv_all = l2x0_inv_all;
62 outer_cache.disable = l2x0_disable;
63- outer_cache.set_debug = l2x0_set_debug;
64
65 printk(KERN_INFO "%s cache controller enabled\n", type);
66 printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n",
67--
681.7.7.6
69