* [PATCH 04/75] ARM: l2c: omap2: remove ES1.0 support
[not found] <20140328151249.GJ7528@n2100.arm.linux.org.uk>
@ 2014-03-28 15:14 ` Russell King
2014-03-28 15:54 ` Tony Lindgren
2014-03-28 15:18 ` [PATCH 42/75] ARM: l2c: omap2: implement new write_sec method Russell King
` (4 subsequent siblings)
5 siblings, 1 reply; 20+ messages in thread
From: Russell King @ 2014-03-28 15:14 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Tony Lindgren, linux-omap
Santosh says:
> But we should kill all of that since we long back decided to remove
> ES1.0 related code. The mach-omap code alreasy has removed the ES1.0
> compatibility so feel free to remove any specific ES1.0
> related stuff. That silicon is long dead.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-omap2/omap4-common.c | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 6cd3f3772ecf..9f8d506f511d 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -181,7 +181,7 @@ static void omap4_l2x0_set_debug(unsigned long val)
static int __init omap_l2_cache_init(void)
{
- u32 aux_ctrl = 0;
+ u32 aux_ctrl;
/*
* To avoid code running on other OMAPs in
@@ -195,27 +195,18 @@ static int __init omap_l2_cache_init(void)
if (WARN_ON(!l2cache_base))
return -ENOMEM;
- /*
- * 16-way associativity, parity disabled
- * Way size - 32KB (es1.0)
- * Way size - 64KB (es2.0 +)
- */
- aux_ctrl = ((1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
+ /* 16-way associativity, parity disabled, way size - 64KB (es2.0 +) */
+ aux_ctrl = (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
(0x1 << 25) |
(0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
- (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT));
-
- if (omap_rev() == OMAP4430_REV_ES1_0) {
- aux_ctrl |= 0x2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT;
- } else {
- aux_ctrl |= ((0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
+ (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT)) |
+ (0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
(1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
(1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
(1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
- (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT));
- }
- if (omap_rev() != OMAP4430_REV_ES1_0)
- omap_smc1(0x109, aux_ctrl);
+ (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT);
+
+ omap_smc1(0x109, aux_ctrl);
/* Enable PL310 L2 Cache controller */
omap_smc1(0x102, 0x1);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 42/75] ARM: l2c: omap2: implement new write_sec method
[not found] <20140328151249.GJ7528@n2100.arm.linux.org.uk>
2014-03-28 15:14 ` [PATCH 04/75] ARM: l2c: omap2: remove ES1.0 support Russell King
@ 2014-03-28 15:18 ` Russell King
2014-03-28 15:56 ` Tony Lindgren
2014-03-28 15:18 ` [PATCH 43/75] ARM: l2c: omap2: remove explicit SMI calls to enable L2 cache Russell King
` (3 subsequent siblings)
5 siblings, 1 reply; 20+ messages in thread
From: Russell King @ 2014-03-28 15:18 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Tony Lindgren, linux-omap
With the write_sec method, we no longer need to override the default
L2C disable method, and we no longer need the L2C set_debug method.
Both of these can be handled via the write_sec method.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-omap2/omap4-common.c | 42 +++++++++++++++++++++++---------------
1 file changed, 26 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 9f8d506f511d..7abc1eb15bf9 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -166,17 +166,33 @@ void __iomem *omap4_get_l2cache_base(void)
return l2cache_base;
}
-static void omap4_l2x0_disable(void)
+static void omap4_l2c310_write_sec(unsigned long val, unsigned reg)
{
- outer_flush_all();
- /* Disable PL310 L2 Cache controller */
- omap_smc1(0x102, 0x0);
-}
+ unsigned smc_op;
-static void omap4_l2x0_set_debug(unsigned long val)
-{
- /* Program PL310 L2 Cache controller debug register */
- omap_smc1(0x100, val);
+ switch (reg) {
+ case L2X0_CTRL:
+ smc_op = OMAP4_MON_L2X0_CTRL_INDEX;
+ break;
+
+ case L2X0_AUX_CTRL:
+ smc_op = OMAP4_MON_L2X0_AUXCTRL_INDEX;
+ break;
+
+ case L2X0_DEBUG_CTRL:
+ smc_op = OMAP4_MON_L2X0_DBG_CTRL_INDEX;
+ break;
+
+ case L310_PREFETCH_CTRL:
+ smc_op = OMAP4_MON_L2X0_PREFETCH_INDEX;
+ break;
+
+ default:
+ WARN_ONCE(1, "OMAP L2C310: ignoring write to reg 0x%x\n", reg);
+ return;
+ }
+
+ omap_smc1(smc_op, val);
}
static int __init omap_l2_cache_init(void)
@@ -211,18 +227,12 @@ static int __init omap_l2_cache_init(void)
/* Enable PL310 L2 Cache controller */
omap_smc1(0x102, 0x1);
+ outer_cache.write_sec = omap4_l2c310_write_sec;
if (of_have_populated_dt())
l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
else
l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);
- /*
- * Override default outer_cache.disable with a OMAP4
- * specific one
- */
- outer_cache.disable = omap4_l2x0_disable;
- outer_cache.set_debug = omap4_l2x0_set_debug;
-
return 0;
}
omap_early_initcall(omap_l2_cache_init);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 43/75] ARM: l2c: omap2: remove explicit SMI calls to enable L2 cache
[not found] <20140328151249.GJ7528@n2100.arm.linux.org.uk>
2014-03-28 15:14 ` [PATCH 04/75] ARM: l2c: omap2: remove ES1.0 support Russell King
2014-03-28 15:18 ` [PATCH 42/75] ARM: l2c: omap2: implement new write_sec method Russell King
@ 2014-03-28 15:18 ` Russell King
2014-03-28 15:56 ` Tony Lindgren
2014-03-28 15:18 ` [PATCH 49/75] ARM: l2c: fix register naming Russell King
` (2 subsequent siblings)
5 siblings, 1 reply; 20+ messages in thread
From: Russell King @ 2014-03-28 15:18 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Tony Lindgren, linux-omap
Now that OMAP2 uses the write_sec method, we don't need to enable the L2
cache in OMAP2 specific code; this can be done via the normal mechanisms
in the L2C code. Remove the OMAP2 specific code.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-omap2/omap4-common.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 7abc1eb15bf9..343c354ae6f5 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -222,11 +222,6 @@ static int __init omap_l2_cache_init(void)
(1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
(1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT);
- omap_smc1(0x109, aux_ctrl);
-
- /* Enable PL310 L2 Cache controller */
- omap_smc1(0x102, 0x1);
-
outer_cache.write_sec = omap4_l2c310_write_sec;
if (of_have_populated_dt())
l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 49/75] ARM: l2c: fix register naming
[not found] <20140328151249.GJ7528@n2100.arm.linux.org.uk>
` (2 preceding siblings ...)
2014-03-28 15:18 ` [PATCH 43/75] ARM: l2c: omap2: remove explicit SMI calls to enable L2 cache Russell King
@ 2014-03-28 15:18 ` Russell King
2014-03-28 16:00 ` Tony Lindgren
` (3 more replies)
2014-03-28 15:18 ` [PATCH 51/75] ARM: l2c: remove platforms/SoCs setting early BRESP Russell King
2014-03-28 15:19 ` [PATCH 58/75] ARM: l2c: omap2: remove cache size override Russell King
5 siblings, 4 replies; 20+ messages in thread
From: Russell King @ 2014-03-28 15:18 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Anton Vorontsov, Shawn Guo, Sascha Hauer, Tony Lindgren,
Barry Song, Viresh Kumar, Shiraz Hashim, Srinivas Kandagatla,
Stuart Menefy, Stephen Warren, Thierry Reding, Linus Walleij,
Ben Dooks, Kukjin Kim, linux-omap, spear-devel, kernel,
linux-tegra, linux-samsung-soc
We have a mixture of different devices with different register layouts,
but we group all the bits together in an opaque mess. Split them out
into those which are L2C-310 specific and ones which refer to earlier
devices. Provide full auxiliary control register definitions.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/include/asm/hardware/cache-l2x0.h | 73 ++++++++++++++++++++----------
arch/arm/mach-cns3xxx/core.c | 8 ++--
arch/arm/mach-imx/system.c | 8 ++--
arch/arm/mach-omap2/omap-mpuss-lowpower.c | 2 +-
arch/arm/mach-omap2/omap4-common.c | 18 ++++----
arch/arm/mach-prima2/l2x0.c | 5 +-
arch/arm/mach-realview/realview_pbx.c | 4 +-
arch/arm/mach-spear/spear13xx.c | 6 +--
arch/arm/mach-sti/board-dt.c | 8 ++--
arch/arm/mach-tegra/sleep.h | 8 ++--
arch/arm/mach-ux500/cache-l2x0.c | 4 +-
arch/arm/mach-vexpress/ct-ca9x4.c | 4 +-
arch/arm/mm/cache-l2x0.c | 57 +++++++++++------------
arch/arm/plat-samsung/s5p-sleep.S | 8 ++--
14 files changed, 118 insertions(+), 95 deletions(-)
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h
index 94fbcec216ae..e52584539743 100644
--- a/arch/arm/include/asm/hardware/cache-l2x0.h
+++ b/arch/arm/include/asm/hardware/cache-l2x0.h
@@ -26,8 +26,8 @@
#define L2X0_CACHE_TYPE 0x004
#define L2X0_CTRL 0x100
#define L2X0_AUX_CTRL 0x104
-#define L2X0_TAG_LATENCY_CTRL 0x108
-#define L2X0_DATA_LATENCY_CTRL 0x10C
+#define L310_TAG_LATENCY_CTRL 0x108
+#define L310_DATA_LATENCY_CTRL 0x10C
#define L2X0_EVENT_CNT_CTRL 0x200
#define L2X0_EVENT_CNT1_CFG 0x204
#define L2X0_EVENT_CNT0_CFG 0x208
@@ -54,16 +54,16 @@
#define L2X0_LOCKDOWN_WAY_D_BASE 0x900
#define L2X0_LOCKDOWN_WAY_I_BASE 0x904
#define L2X0_LOCKDOWN_STRIDE 0x08
-#define L2X0_ADDR_FILTER_START 0xC00
-#define L2X0_ADDR_FILTER_END 0xC04
+#define L310_ADDR_FILTER_START 0xC00
+#define L310_ADDR_FILTER_END 0xC04
#define L2X0_TEST_OPERATION 0xF00
#define L2X0_LINE_DATA 0xF10
#define L2X0_LINE_TAG 0xF30
#define L2X0_DEBUG_CTRL 0xF40
-#define L2X0_PREFETCH_CTRL 0xF60
-#define L2X0_POWER_CTRL 0xF80
-#define L2X0_DYNAMIC_CLK_GATING_EN (1 << 1)
-#define L2X0_STNDBY_MODE_EN (1 << 0)
+#define L310_PREFETCH_CTRL 0xF60
+#define L310_POWER_CTRL 0xF80
+#define L310_DYNAMIC_CLK_GATING_EN (1 << 1)
+#define L310_STNDBY_MODE_EN (1 << 0)
/* Registers shifts and masks */
#define L2X0_CACHE_ID_PART_MASK (0xf << 6)
@@ -88,29 +88,52 @@
#define L310_CACHE_ID_RTL_R3P3 0x09
#define L2X0_AUX_CTRL_MASK 0xc0000fff
+/* L2C auxiliary control register - bits common to L2C-210/220/310 */
+#define L2C_AUX_CTRL_WAY_SIZE_SHIFT 17
+#define L2C_AUX_CTRL_WAY_SIZE_MASK (7 << 17)
+#define L2C_AUX_CTRL_WAY_SIZE(n) ((n) << 17)
+#define L2C_AUX_CTRL_EVTMON_ENABLE BIT(20)
+#define L2C_AUX_CTRL_PARITY_ENABLE BIT(21)
+#define L2C_AUX_CTRL_SHARED_OVERRIDE BIT(22)
+/* L2C-210/220 common bits */
#define L2X0_AUX_CTRL_DATA_RD_LATENCY_SHIFT 0
-#define L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK 0x7
+#define L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK (7 << 0)
#define L2X0_AUX_CTRL_DATA_WR_LATENCY_SHIFT 3
-#define L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK (0x7 << 3)
+#define L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK (7 << 3)
#define L2X0_AUX_CTRL_TAG_LATENCY_SHIFT 6
-#define L2X0_AUX_CTRL_TAG_LATENCY_MASK (0x7 << 6)
+#define L2X0_AUX_CTRL_TAG_LATENCY_MASK (7 << 6)
#define L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT 9
-#define L2X0_AUX_CTRL_DIRTY_LATENCY_MASK (0x7 << 9)
-#define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16
-#define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17
-#define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17)
-#define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22
-#define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26
-#define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27
-#define L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT 28
-#define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT 29
-#define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT 30
+#define L2X0_AUX_CTRL_DIRTY_LATENCY_MASK (7 << 9)
+#define L2X0_AUX_CTRL_ASSOC_SHIFT 13
+#define L2X0_AUX_CTRL_ASSOC_MASK (15 << 13)
+/* L2C-210 specific bits */
+#define L210_AUX_CTRL_WRAP_DISABLE BIT(12)
+#define L210_AUX_CTRL_WA_OVERRIDE BIT(23)
+#define L210_AUX_CTRL_EXCLUSIVE_ABORT BIT(24)
+/* L2C-220 specific bits */
+#define L220_AUX_CTRL_EXCLUSIVE_CACHE BIT(12)
+#define L220_AUX_CTRL_FWA_SHIFT 23
+#define L220_AUX_CTRL_FWA_MASK (3 << 23)
+#define L220_AUX_CTRL_NS_LOCKDOWN BIT(26)
+#define L220_AUX_CTRL_NS_INT_CTRL BIT(27)
+/* L2C-310 specific bits */
+#define L310_AUX_CTRL_FULL_LINE_ZERO BIT(0) /* R2P0+ */
+#define L310_AUX_CTRL_HIGHPRIO_SO_DEV BIT(10) /* R2P0+ */
+#define L310_AUX_CTRL_STORE_LIMITATION BIT(11) /* R2P0+ */
+#define L310_AUX_CTRL_EXCLUSIVE_CACHE BIT(12)
+#define L310_AUX_CTRL_ASSOCIATIVITY_16 BIT(16)
+#define L310_AUX_CTRL_CACHE_REPLACE_RR BIT(25) /* R2P0+ */
+#define L310_AUX_CTRL_NS_LOCKDOWN BIT(26)
+#define L310_AUX_CTRL_NS_INT_CTRL BIT(27)
+#define L310_AUX_CTRL_DATA_PREFETCH BIT(28)
+#define L310_AUX_CTRL_INSTR_PREFETCH BIT(29)
+#define L310_AUX_CTRL_EARLY_BRESP BIT(30) /* R2P0+ */
-#define L2X0_LATENCY_CTRL_SETUP_SHIFT 0
-#define L2X0_LATENCY_CTRL_RD_SHIFT 4
-#define L2X0_LATENCY_CTRL_WR_SHIFT 8
+#define L310_LATENCY_CTRL_SETUP(n) ((n) << 0)
+#define L310_LATENCY_CTRL_RD(n) ((n) << 4)
+#define L310_LATENCY_CTRL_WR(n) ((n) << 8)
-#define L2X0_ADDR_FILTER_EN 1
+#define L310_ADDR_FILTER_EN 1
#define L2X0_CTRL_EN 1
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c
index e38b279f402c..dd2b9926a76c 100644
--- a/arch/arm/mach-cns3xxx/core.c
+++ b/arch/arm/mach-cns3xxx/core.c
@@ -240,9 +240,9 @@ void __init cns3xxx_l2x0_init(void)
*
* 1 cycle of latency for setup, read and write accesses
*/
- val = readl(base + L2X0_TAG_LATENCY_CTRL);
+ val = readl(base + L310_TAG_LATENCY_CTRL);
val &= 0xfffff888;
- writel(val, base + L2X0_TAG_LATENCY_CTRL);
+ writel(val, base + L310_TAG_LATENCY_CTRL);
/*
* Data RAM Control register
@@ -253,9 +253,9 @@ void __init cns3xxx_l2x0_init(void)
*
* 1 cycle of latency for setup, read and write accesses
*/
- val = readl(base + L2X0_DATA_LATENCY_CTRL);
+ val = readl(base + L310_DATA_LATENCY_CTRL);
val &= 0xfffff888;
- writel(val, base + L2X0_DATA_LATENCY_CTRL);
+ writel(val, base + L310_DATA_LATENCY_CTRL);
/* 32 KiB, 8-way, parity disable */
l2x0_init(base, 0x00540000, 0xfe000fff);
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index c6571f1de9fd..59013a81107b 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -124,7 +124,7 @@ void __init imx_init_l2cache(void)
}
/* Configure the L2 PREFETCH and POWER registers */
- val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL);
+ val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
val |= 0x70800000;
/*
* The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0
@@ -137,9 +137,9 @@ void __init imx_init_l2cache(void)
*/
if (cpu_is_imx6q())
val &= ~(1 << 30 | 1 << 23);
- writel_relaxed(val, l2x0_base + L2X0_PREFETCH_CTRL);
- val = L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN;
- writel_relaxed(val, l2x0_base + L2X0_POWER_CTRL);
+ writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
+ val = L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN;
+ writel_relaxed(val, l2x0_base + L310_POWER_CTRL);
iounmap(l2x0_base);
of_node_put(np);
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index 667915d236f3..ba43f49fbb59 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -194,7 +194,7 @@ static void save_l2x0_context(void)
if (l2x0_base) {
val = __raw_readl(l2x0_base + L2X0_AUX_CTRL);
__raw_writel(val, sar_base + L2X0_AUXCTRL_OFFSET);
- val = __raw_readl(l2x0_base + L2X0_PREFETCH_CTRL);
+ val = __raw_readl(l2x0_base + L310_PREFETCH_CTRL);
__raw_writel(val, sar_base + L2X0_PREFETCH_CTRL_OFFSET);
}
}
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 343c354ae6f5..84e097f5fdf4 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -212,15 +212,15 @@ static int __init omap_l2_cache_init(void)
return -ENOMEM;
/* 16-way associativity, parity disabled, way size - 64KB (es2.0 +) */
- aux_ctrl = (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
- (0x1 << 25) |
- (0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
- (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT)) |
- (0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
- (1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
- (1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
- (1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
- (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT);
+ aux_ctrl = L310_AUX_CTRL_ASSOCIATIVITY_16 |
+ L310_AUX_CTRL_CACHE_REPLACE_RR |
+ L310_AUX_CTRL_NS_LOCKDOWN |
+ L310_AUX_CTRL_NS_INT_CTRL |
+ L2C_AUX_CTRL_WAY_SIZE(3) |
+ L2C_AUX_CTRL_SHARED_OVERRIDE |
+ L310_AUX_CTRL_DATA_PREFETCH |
+ L310_AUX_CTRL_INSTR_PREFETCH |
+ L310_AUX_CTRL_EARLY_BRESP;
outer_cache.write_sec = omap4_l2c310_write_sec;
if (of_have_populated_dt())
diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-prima2/l2x0.c
index cbcbe9cb094c..3a4eda45171e 100644
--- a/arch/arm/mach-prima2/l2x0.c
+++ b/arch/arm/mach-prima2/l2x0.c
@@ -18,13 +18,12 @@ struct l2x0_aux
};
static struct l2x0_aux prima2_l2x0_aux __initconst = {
- .val = 2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT,
+ .val = L2C_AUX_CTRL_WAY_SIZE(2),
.mask = 0,
};
static struct l2x0_aux marco_l2x0_aux __initconst = {
- .val = (2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
- (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT),
+ .val = L2C_AUX_CTRL_WAY_SIZE(2) | L310_AUX_CTRL_ASSOCIATIVITY_16,
.mask = L2X0_AUX_CTRL_MASK,
};
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 9d75493e3f0c..f0cfd7e7e569 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -370,8 +370,8 @@ static void __init realview_pbx_init(void)
__io_address(REALVIEW_PBX_TILE_L220_BASE);
/* set RAM latencies to 1 cycle for eASIC */
- writel(0, l2x0_base + L2X0_TAG_LATENCY_CTRL);
- writel(0, l2x0_base + L2X0_DATA_LATENCY_CTRL);
+ writel(0, l2x0_base + L310_TAG_LATENCY_CTRL);
+ writel(0, l2x0_base + L310_DATA_LATENCY_CTRL);
/* 16KB way size, 8-way associativity, parity disabled
* Bits: .. 0 0 0 0 1 00 1 0 1 001 0 000 0 .... .... .... */
diff --git a/arch/arm/mach-spear/spear13xx.c b/arch/arm/mach-spear/spear13xx.c
index 7aa6e8cf830f..92860fa01668 100644
--- a/arch/arm/mach-spear/spear13xx.c
+++ b/arch/arm/mach-spear/spear13xx.c
@@ -38,14 +38,14 @@ void __init spear13xx_l2x0_init(void)
if (!IS_ENABLED(CONFIG_CACHE_L2X0))
return;
- writel_relaxed(0x06, VA_L2CC_BASE + L2X0_PREFETCH_CTRL);
+ writel_relaxed(0x06, VA_L2CC_BASE + L310_PREFETCH_CTRL);
/*
* Program following latencies in order to make
* SPEAr1340 work at 600 MHz
*/
- writel_relaxed(0x221, VA_L2CC_BASE + L2X0_TAG_LATENCY_CTRL);
- writel_relaxed(0x441, VA_L2CC_BASE + L2X0_DATA_LATENCY_CTRL);
+ writel_relaxed(0x221, VA_L2CC_BASE + L310_TAG_LATENCY_CTRL);
+ writel_relaxed(0x441, VA_L2CC_BASE + L310_DATA_LATENCY_CTRL);
l2x0_init(VA_L2CC_BASE, 0x70A60001, 0xfe00ffff);
}
diff --git a/arch/arm/mach-sti/board-dt.c b/arch/arm/mach-sti/board-dt.c
index 1217fb598cfd..dc8669efc12d 100644
--- a/arch/arm/mach-sti/board-dt.c
+++ b/arch/arm/mach-sti/board-dt.c
@@ -19,10 +19,10 @@ void __init stih41x_l2x0_init(void)
u32 way_size = 0x4;
u32 aux_ctrl;
/* may be this can be encoded in macros like BIT*() */
- aux_ctrl = (0x1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
- (0x1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
- (0x1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
- (way_size << L2X0_AUX_CTRL_WAY_SIZE_SHIFT);
+ aux_ctrl = L2C_AUX_CTRL_SHARED_OVERRIDE |
+ L310_AUX_CTRL_DATA_PREFETCH |
+ L310_AUX_CTRL_INSTR_PREFETCH |
+ L2C_AUX_CTRL_WAY_SIZE(way_size);
l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
}
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h
index a4edbb3abd3d..a032820d2fac 100644
--- a/arch/arm/mach-tegra/sleep.h
+++ b/arch/arm/mach-tegra/sleep.h
@@ -134,13 +134,13 @@
tst \tmp3, #L2X0_CTRL_EN
bne exit_l2_resume
ldr \tmp3, [\tmp1, #L2X0_R_TAG_LATENCY]
- str \tmp3, [\tmp2, #L2X0_TAG_LATENCY_CTRL]
+ str \tmp3, [\tmp2, #L310_TAG_LATENCY_CTRL]
ldr \tmp3, [\tmp1, #L2X0_R_DATA_LATENCY]
- str \tmp3, [\tmp2, #L2X0_DATA_LATENCY_CTRL]
+ str \tmp3, [\tmp2, #L310_DATA_LATENCY_CTRL]
ldr \tmp3, [\tmp1, #L2X0_R_PREFETCH_CTRL]
- str \tmp3, [\tmp2, #L2X0_PREFETCH_CTRL]
+ str \tmp3, [\tmp2, #L310_PREFETCH_CTRL]
ldr \tmp3, [\tmp1, #L2X0_R_PWR_CTRL]
- str \tmp3, [\tmp2, #L2X0_POWER_CTRL]
+ str \tmp3, [\tmp2, #L310_POWER_CTRL]
ldr \tmp3, [\tmp1, #L2X0_R_AUX_CTRL]
str \tmp3, [\tmp2, #L2X0_AUX_CTRL]
mov \tmp3, #L2X0_CTRL_EN
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c
index 5cc7e3625d8c..067c37a054fb 100644
--- a/arch/arm/mach-ux500/cache-l2x0.c
+++ b/arch/arm/mach-ux500/cache-l2x0.c
@@ -59,10 +59,10 @@ static int __init ux500_l2x0_init(void)
/* DBx540's L2 has 128KB way size */
if (cpu_is_ux540_family())
/* 128KB way size */
- aux_val |= (0x4 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT);
+ aux_val |= L2C_AUX_CTRL_WAY_SIZE(4);
else
/* 64KB way size */
- aux_val |= (0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT);
+ aux_val |= L2C_AUX_CTRL_WAY_SIZE(3);
outer_cache.write_sec = ux500_l2c310_write_sec;
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index 6f34497a4245..6c4ffb6c5ad8 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -145,8 +145,8 @@ static void __init ct_ca9x4_init(void)
void __iomem *l2x0_base = ioremap(CT_CA9X4_L2CC, SZ_4K);
/* set RAM latencies to 1 cycle for this core tile. */
- writel(0, l2x0_base + L2X0_TAG_LATENCY_CTRL);
- writel(0, l2x0_base + L2X0_DATA_LATENCY_CTRL);
+ writel(0, l2x0_base + L310_TAG_LATENCY_CTRL);
+ writel(0, l2x0_base + L310_DATA_LATENCY_CTRL);
l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff);
#endif
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 54ad15ea24eb..cfea0f2aecd6 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -569,13 +569,13 @@ static void __init l2c310_save(void __iomem *base)
unsigned revision;
l2x0_saved_regs.tag_latency = readl_relaxed(base +
- L2X0_TAG_LATENCY_CTRL);
+ L310_TAG_LATENCY_CTRL);
l2x0_saved_regs.data_latency = readl_relaxed(base +
- L2X0_DATA_LATENCY_CTRL);
+ L310_DATA_LATENCY_CTRL);
l2x0_saved_regs.filter_end = readl_relaxed(base +
- L2X0_ADDR_FILTER_END);
+ L310_ADDR_FILTER_END);
l2x0_saved_regs.filter_start = readl_relaxed(base +
- L2X0_ADDR_FILTER_START);
+ L310_ADDR_FILTER_START);
revision = readl_relaxed(base + L2X0_CACHE_ID) &
L2X0_CACHE_ID_RTL_MASK;
@@ -583,12 +583,12 @@ static void __init l2c310_save(void __iomem *base)
/* From r2p0, there is Prefetch offset/control register */
if (revision >= L310_CACHE_ID_RTL_R2P0)
l2x0_saved_regs.prefetch_ctrl = readl_relaxed(base +
- L2X0_PREFETCH_CTRL);
+ L310_PREFETCH_CTRL);
/* From r3p0, there is Power control register */
if (revision >= L310_CACHE_ID_RTL_R3P0)
l2x0_saved_regs.pwr_ctrl = readl_relaxed(base +
- L2X0_POWER_CTRL);
+ L310_POWER_CTRL);
}
static void l2c310_resume(void)
@@ -600,23 +600,23 @@ static void l2c310_resume(void)
/* restore pl310 setup */
writel_relaxed(l2x0_saved_regs.tag_latency,
- base + L2X0_TAG_LATENCY_CTRL);
+ base + L310_TAG_LATENCY_CTRL);
writel_relaxed(l2x0_saved_regs.data_latency,
- base + L2X0_DATA_LATENCY_CTRL);
+ base + L310_DATA_LATENCY_CTRL);
writel_relaxed(l2x0_saved_regs.filter_end,
- base + L2X0_ADDR_FILTER_END);
+ base + L310_ADDR_FILTER_END);
writel_relaxed(l2x0_saved_regs.filter_start,
- base + L2X0_ADDR_FILTER_START);
+ base + L310_ADDR_FILTER_START);
revision = readl_relaxed(base + L2X0_CACHE_ID) &
L2X0_CACHE_ID_RTL_MASK;
if (revision >= L310_CACHE_ID_RTL_R2P0)
l2c_write_sec(l2x0_saved_regs.prefetch_ctrl, base,
- L2X0_PREFETCH_CTRL);
+ L310_PREFETCH_CTRL);
if (revision >= L310_CACHE_ID_RTL_R3P0)
l2c_write_sec(l2x0_saved_regs.pwr_ctrl, base,
- L2X0_POWER_CTRL);
+ L310_POWER_CTRL);
l2c_enable(base, l2x0_saved_regs.aux_ctrl, 8);
}
@@ -647,11 +647,11 @@ static void __init l2c310_fixup(void __iomem *base, u32 cache_id,
if (revision >= L310_CACHE_ID_RTL_R3P0 &&
revision < L310_CACHE_ID_RTL_R3P2) {
- u32 val = readl_relaxed(base + L2X0_PREFETCH_CTRL);
+ u32 val = readl_relaxed(base + L310_PREFETCH_CTRL);
/* I don't think bit23 is required here... but iMX6 does so */
if (val & (BIT(30) | BIT(23))) {
val &= ~(BIT(30) | BIT(23));
- l2c_write_sec(val, base, L2X0_PREFETCH_CTRL);
+ l2c_write_sec(val, base, L310_PREFETCH_CTRL);
errata[n++] = "752271";
}
}
@@ -747,7 +747,8 @@ static void __init __l2c_init(const struct l2c_init_data *data,
*
* L2 cache size = number of ways * way size.
*/
- way_size_bits = (aux & L2X0_AUX_CTRL_WAY_SIZE_MASK) >> 17;
+ way_size_bits = (aux & L2C_AUX_CTRL_WAY_SIZE_MASK) >>
+ L2C_AUX_CTRL_WAY_SIZE_SHIFT;
l2x0_size = ways * (data->way_size_0 << way_size_bits);
fns = data->outer_cache;
@@ -888,27 +889,27 @@ static void __init l2c310_of_parse(const struct device_node *np,
of_property_read_u32_array(np, "arm,tag-latency", tag, ARRAY_SIZE(tag));
if (tag[0] && tag[1] && tag[2])
writel_relaxed(
- ((tag[0] - 1) << L2X0_LATENCY_CTRL_RD_SHIFT) |
- ((tag[1] - 1) << L2X0_LATENCY_CTRL_WR_SHIFT) |
- ((tag[2] - 1) << L2X0_LATENCY_CTRL_SETUP_SHIFT),
- l2x0_base + L2X0_TAG_LATENCY_CTRL);
+ L310_LATENCY_CTRL_RD(tag[0] - 1) |
+ L310_LATENCY_CTRL_WR(tag[1] - 1) |
+ L310_LATENCY_CTRL_SETUP(tag[2] - 1),
+ l2x0_base + L310_TAG_LATENCY_CTRL);
of_property_read_u32_array(np, "arm,data-latency",
data, ARRAY_SIZE(data));
if (data[0] && data[1] && data[2])
writel_relaxed(
- ((data[0] - 1) << L2X0_LATENCY_CTRL_RD_SHIFT) |
- ((data[1] - 1) << L2X0_LATENCY_CTRL_WR_SHIFT) |
- ((data[2] - 1) << L2X0_LATENCY_CTRL_SETUP_SHIFT),
- l2x0_base + L2X0_DATA_LATENCY_CTRL);
+ L310_LATENCY_CTRL_RD(data[0] - 1) |
+ L310_LATENCY_CTRL_WR(data[1] - 1) |
+ L310_LATENCY_CTRL_SETUP(data[2] - 1),
+ l2x0_base + L310_DATA_LATENCY_CTRL);
of_property_read_u32_array(np, "arm,filter-ranges",
filter, ARRAY_SIZE(filter));
if (filter[1]) {
writel_relaxed(ALIGN(filter[0] + filter[1], SZ_1M),
- l2x0_base + L2X0_ADDR_FILTER_END);
- writel_relaxed((filter[0] & ~(SZ_1M - 1)) | L2X0_ADDR_FILTER_EN,
- l2x0_base + L2X0_ADDR_FILTER_START);
+ l2x0_base + L310_ADDR_FILTER_END);
+ writel_relaxed((filter[0] & ~(SZ_1M - 1)) | L310_ADDR_FILTER_EN,
+ l2x0_base + L310_ADDR_FILTER_START);
}
}
@@ -1283,7 +1284,7 @@ static void __init tauros3_save(void __iomem *base)
l2x0_saved_regs.aux2_ctrl =
readl_relaxed(base + TAUROS3_AUX2_CTRL);
l2x0_saved_regs.prefetch_ctrl =
- readl_relaxed(base + L2X0_PREFETCH_CTRL);
+ readl_relaxed(base + L310_PREFETCH_CTRL);
}
static void tauros3_resume(void)
@@ -1294,7 +1295,7 @@ static void tauros3_resume(void)
writel_relaxed(l2x0_saved_regs.aux2_ctrl,
base + TAUROS3_AUX2_CTRL);
writel_relaxed(l2x0_saved_regs.prefetch_ctrl,
- base + L2X0_PREFETCH_CTRL);
+ base + L310_PREFETCH_CTRL);
l2c_enable(base, l2x0_saved_regs.aux_ctrl, 8);
}
diff --git a/arch/arm/plat-samsung/s5p-sleep.S b/arch/arm/plat-samsung/s5p-sleep.S
index a030e7301da8..497301944090 100644
--- a/arch/arm/plat-samsung/s5p-sleep.S
+++ b/arch/arm/plat-samsung/s5p-sleep.S
@@ -69,13 +69,13 @@ ENTRY(s3c_cpu_resume)
ldr r2, [r0, #L2X0_R_AUX_CTRL]
str r2, [r1, #L2X0_AUX_CTRL]
ldr r2, [r0, #L2X0_R_TAG_LATENCY]
- str r2, [r1, #L2X0_TAG_LATENCY_CTRL]
+ str r2, [r1, #L310_TAG_LATENCY_CTRL]
ldr r2, [r0, #L2X0_R_DATA_LATENCY]
- str r2, [r1, #L2X0_DATA_LATENCY_CTRL]
+ str r2, [r1, #L310_DATA_LATENCY_CTRL]
ldr r2, [r0, #L2X0_R_PREFETCH_CTRL]
- str r2, [r1, #L2X0_PREFETCH_CTRL]
+ str r2, [r1, #L310_PREFETCH_CTRL]
ldr r2, [r0, #L2X0_R_PWR_CTRL]
- str r2, [r1, #L2X0_POWER_CTRL]
+ str r2, [r1, #L310_POWER_CTRL]
mov r2, #1
str r2, [r1, #L2X0_CTRL]
resume_l2on:
--
1.8.3.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 51/75] ARM: l2c: remove platforms/SoCs setting early BRESP
[not found] <20140328151249.GJ7528@n2100.arm.linux.org.uk>
` (3 preceding siblings ...)
2014-03-28 15:18 ` [PATCH 49/75] ARM: l2c: fix register naming Russell King
@ 2014-03-28 15:18 ` Russell King
2014-03-28 16:02 ` Tony Lindgren
2014-03-28 15:19 ` [PATCH 58/75] ARM: l2c: omap2: remove cache size override Russell King
5 siblings, 1 reply; 20+ messages in thread
From: Russell King @ 2014-03-28 15:18 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Sebastian Hesselbarth, Kukjin Kim, Tony Lindgren, Simon Horman,
Magnus Damm, Viresh Kumar, Shiraz Hashim, Stephen Warren,
Thierry Reding, linux-samsung-soc, linux-omap, linux-sh,
spear-devel, linux-tegra
Since we now automatically enable early BRESP in core L2C-310 code when
we detect a Cortex-A9, we don't need platforms/SoCs to set this bit
explicitly. Instead, they should seek to preserve the value of bit 30
in the auxiliary control register.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-berlin/berlin.c | 2 +-
arch/arm/mach-exynos/common.c | 4 ++--
arch/arm/mach-omap2/omap4-common.c | 3 +--
arch/arm/mach-shmobile/board-armadillo800eva-reference.c | 4 ++--
arch/arm/mach-shmobile/board-armadillo800eva.c | 4 ++--
arch/arm/mach-shmobile/board-kzm9g-reference.c | 4 ++--
arch/arm/mach-shmobile/board-kzm9g.c | 4 ++--
arch/arm/mach-shmobile/setup-r8a7778.c | 4 ++--
arch/arm/mach-shmobile/setup-r8a7779.c | 4 ++--
arch/arm/mach-spear/spear13xx.c | 2 +-
arch/arm/mach-tegra/tegra.c | 4 ++--
11 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c
index 025bcb5473eb..6709d2a6bec8 100644
--- a/arch/arm/mach-berlin/berlin.c
+++ b/arch/arm/mach-berlin/berlin.c
@@ -24,7 +24,7 @@ static void __init berlin_init_machine(void)
* with DT probing for L2CCs, berlin_init_machine can be removed.
* Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc
*/
- l2x0_of_init(0x70c00000, 0xfeffffff);
+ l2x0_of_init(0x30c00000, 0xfeffffff);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index f18be40e5b21..cd53b72449a0 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -45,8 +45,8 @@
#include "common.h"
#include "regs-pmu.h"
-#define L2_AUX_VAL 0x7C470001
-#define L2_AUX_MASK 0xC200ffff
+#define L2_AUX_VAL 0x3c470001
+#define L2_AUX_MASK 0xc200ffff
static const char name_exynos4210[] = "EXYNOS4210";
static const char name_exynos4212[] = "EXYNOS4212";
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 84e097f5fdf4..ce2fad84a43c 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -219,8 +219,7 @@ static int __init omap_l2_cache_init(void)
L2C_AUX_CTRL_WAY_SIZE(3) |
L2C_AUX_CTRL_SHARED_OVERRIDE |
L310_AUX_CTRL_DATA_PREFETCH |
- L310_AUX_CTRL_INSTR_PREFETCH |
- L310_AUX_CTRL_EARLY_BRESP;
+ L310_AUX_CTRL_INSTR_PREFETCH;
outer_cache.write_sec = omap4_l2c310_write_sec;
if (of_have_populated_dt())
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
index 57d1a78367b6..34e7f3c17dd2 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
@@ -164,8 +164,8 @@ static void __init eva_init(void)
r8a7740_meram_workaround();
#ifdef CONFIG_CACHE_L2X0
- /* Early BRESP enable, Shared attribute override enable, 32K*8way */
- l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
+ /* Shared attribute override enable, 32K*8way */
+ l2x0_init(IOMEM(0xf0002000), 0x00440000, 0xc2000fff);
#endif
r8a7740_add_standard_devices_dt();
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 93533e2710a8..69ec71038ec7 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -1270,8 +1270,8 @@ static void __init eva_init(void)
#ifdef CONFIG_CACHE_L2X0
- /* Early BRESP enable, Shared attribute override enable, 32K*8way */
- l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
+ /* Shared attribute override enable, 32K*8way */
+ l2x0_init(IOMEM(0xf0002000), 0x00440000, 0xc2000fff);
#endif
i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
index 598e32488410..85873f186d77 100644
--- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
@@ -36,8 +36,8 @@ static void __init kzm_init(void)
sh73a0_add_standard_devices_dt();
#ifdef CONFIG_CACHE_L2X0
- /* Early BRESP enable, Shared attribute override enable, 64K*8way */
- l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);
+ /* Shared attribute override enable, 64K*8way */
+ l2x0_init(IOMEM(0xf0100000), 0x00460000, 0xc2000fff);
#endif
}
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index bc40b853ffd3..bd9931f223ae 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -878,8 +878,8 @@ static void __init kzm_init(void)
gpio_request_one(223, GPIOF_IN, NULL); /* IRQ8 */
#ifdef CONFIG_CACHE_L2X0
- /* Early BRESP enable, Shared attribute override enable, 64K*8way */
- l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);
+ /* Shared attribute override enable, 64K*8way */
+ l2x0_init(IOMEM(0xf0100000), 0x00460000, 0xc2000fff);
#endif
i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 6d694526e4ca..3a8e5316671e 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -298,10 +298,10 @@ void __init r8a7778_add_dt_devices(void)
void __iomem *base = ioremap_nocache(0xf0100000, 0x1000);
if (base) {
/*
- * Early BRESP enable, Shared attribute override enable, 64K*16way
+ * Shared attribute override enable, 64K*16way
* don't call iounmap(base)
*/
- l2x0_init(base, 0x40470000, 0x82000fff);
+ l2x0_init(base, 0x00470000, 0xc2000fff);
}
#endif
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 8e860b36997a..91c90bf0ae83 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -700,8 +700,8 @@ static struct platform_device *r8a7779_standard_devices[] __initdata = {
void __init r8a7779_add_standard_devices(void)
{
#ifdef CONFIG_CACHE_L2X0
- /* Early BRESP enable, Shared attribute override enable, 64K*16way */
- l2x0_init(IOMEM(0xf0100000), 0x40470000, 0x82000fff);
+ /* Shared attribute override enable, 64K*16way */
+ l2x0_init(IOMEM(0xf0100000), 0x00470000, 0xc2000fff);
#endif
r8a7779_pm_init();
diff --git a/arch/arm/mach-spear/spear13xx.c b/arch/arm/mach-spear/spear13xx.c
index 92860fa01668..dcb300443b66 100644
--- a/arch/arm/mach-spear/spear13xx.c
+++ b/arch/arm/mach-spear/spear13xx.c
@@ -46,7 +46,7 @@ void __init spear13xx_l2x0_init(void)
*/
writel_relaxed(0x221, VA_L2CC_BASE + L310_TAG_LATENCY_CTRL);
writel_relaxed(0x441, VA_L2CC_BASE + L310_DATA_LATENCY_CTRL);
- l2x0_init(VA_L2CC_BASE, 0x70A60001, 0xfe00ffff);
+ l2x0_init(VA_L2CC_BASE, 0x30a60001, 0xfe00ffff);
}
/*
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c
index 6191603379e1..ecbb5411a104 100644
--- a/arch/arm/mach-tegra/tegra.c
+++ b/arch/arm/mach-tegra/tegra.c
@@ -89,9 +89,9 @@ static void __init tegra_init_cache(void)
cache_type = readl(p + L2X0_CACHE_TYPE);
aux_ctrl = (cache_type & 0x700) << (17-8);
- aux_ctrl |= 0x7C400001;
+ aux_ctrl |= 0x3c400001;
- ret = l2x0_of_init(aux_ctrl, 0x8200c3fe);
+ ret = l2x0_of_init(aux_ctrl, 0xc200c3fe);
if (!ret)
l2x0_saved_regs_addr = virt_to_phys(&l2x0_saved_regs);
#endif
--
1.8.3.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 58/75] ARM: l2c: omap2: remove cache size override
[not found] <20140328151249.GJ7528@n2100.arm.linux.org.uk>
` (4 preceding siblings ...)
2014-03-28 15:18 ` [PATCH 51/75] ARM: l2c: remove platforms/SoCs setting early BRESP Russell King
@ 2014-03-28 15:19 ` Russell King
2014-03-28 16:03 ` Tony Lindgren
5 siblings, 1 reply; 20+ messages in thread
From: Russell King @ 2014-03-28 15:19 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Tony Lindgren, linux-omap
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-omap2/omap4-common.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index ce2fad84a43c..c0f9a81a2d32 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -212,20 +212,18 @@ static int __init omap_l2_cache_init(void)
return -ENOMEM;
/* 16-way associativity, parity disabled, way size - 64KB (es2.0 +) */
- aux_ctrl = L310_AUX_CTRL_ASSOCIATIVITY_16 |
- L310_AUX_CTRL_CACHE_REPLACE_RR |
+ aux_ctrl = L310_AUX_CTRL_CACHE_REPLACE_RR |
L310_AUX_CTRL_NS_LOCKDOWN |
L310_AUX_CTRL_NS_INT_CTRL |
- L2C_AUX_CTRL_WAY_SIZE(3) |
L2C_AUX_CTRL_SHARED_OVERRIDE |
L310_AUX_CTRL_DATA_PREFETCH |
L310_AUX_CTRL_INSTR_PREFETCH;
outer_cache.write_sec = omap4_l2c310_write_sec;
if (of_have_populated_dt())
- l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
+ l2x0_of_init(aux_ctrl, 0xc19fffff);
else
- l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);
+ l2x0_init(l2cache_base, aux_ctrl, 0xc19fffff);
return 0;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 04/75] ARM: l2c: omap2: remove ES1.0 support
2014-03-28 15:14 ` [PATCH 04/75] ARM: l2c: omap2: remove ES1.0 support Russell King
@ 2014-03-28 15:54 ` Tony Lindgren
0 siblings, 0 replies; 20+ messages in thread
From: Tony Lindgren @ 2014-03-28 15:54 UTC (permalink / raw)
To: Russell King; +Cc: linux-arm-kernel, linux-omap
* Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:18]:
> Santosh says:
> > But we should kill all of that since we long back decided to remove
> > ES1.0 related code. The mach-omap code alreasy has removed the ES1.0
> > compatibility so feel free to remove any specific ES1.0
> > related stuff. That silicon is long dead.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Makes sense to me to make the handling generic:
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 42/75] ARM: l2c: omap2: implement new write_sec method
2014-03-28 15:18 ` [PATCH 42/75] ARM: l2c: omap2: implement new write_sec method Russell King
@ 2014-03-28 15:56 ` Tony Lindgren
0 siblings, 0 replies; 20+ messages in thread
From: Tony Lindgren @ 2014-03-28 15:56 UTC (permalink / raw)
To: Russell King; +Cc: linux-arm-kernel, linux-omap
* Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:21]:
> With the write_sec method, we no longer need to override the default
> L2C disable method, and we no longer need the L2C set_debug method.
> Both of these can be handled via the write_sec method.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 43/75] ARM: l2c: omap2: remove explicit SMI calls to enable L2 cache
2014-03-28 15:18 ` [PATCH 43/75] ARM: l2c: omap2: remove explicit SMI calls to enable L2 cache Russell King
@ 2014-03-28 15:56 ` Tony Lindgren
0 siblings, 0 replies; 20+ messages in thread
From: Tony Lindgren @ 2014-03-28 15:56 UTC (permalink / raw)
To: Russell King; +Cc: linux-arm-kernel, linux-omap
* Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:21]:
> Now that OMAP2 uses the write_sec method, we don't need to enable the L2
> cache in OMAP2 specific code; this can be done via the normal mechanisms
> in the L2C code. Remove the OMAP2 specific code.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Tony Lindgren <tony@atomide.com>
> arch/arm/mach-omap2/omap4-common.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
> index 7abc1eb15bf9..343c354ae6f5 100644
> --- a/arch/arm/mach-omap2/omap4-common.c
> +++ b/arch/arm/mach-omap2/omap4-common.c
> @@ -222,11 +222,6 @@ static int __init omap_l2_cache_init(void)
> (1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
> (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT);
>
> - omap_smc1(0x109, aux_ctrl);
> -
> - /* Enable PL310 L2 Cache controller */
> - omap_smc1(0x102, 0x1);
> -
> outer_cache.write_sec = omap4_l2c310_write_sec;
> if (of_have_populated_dt())
> l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 49/75] ARM: l2c: fix register naming
2014-03-28 15:18 ` [PATCH 49/75] ARM: l2c: fix register naming Russell King
@ 2014-03-28 16:00 ` Tony Lindgren
2014-03-28 21:02 ` Russell King - ARM Linux
2014-03-28 16:01 ` Tony Lindgren
` (2 subsequent siblings)
3 siblings, 1 reply; 20+ messages in thread
From: Tony Lindgren @ 2014-03-28 16:00 UTC (permalink / raw)
To: Russell King
Cc: linux-arm-kernel, Anton Vorontsov, Shawn Guo, Sascha Hauer,
Barry Song, Viresh Kumar, Shiraz Hashim, Srinivas Kandagatla,
Stuart Menefy, Stephen Warren, Thierry Reding, Linus Walleij,
Ben Dooks, Kukjin Kim, linux-omap, spear-devel, kernel,
linux-tegra, linux-samsung-soc
* Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:22]:
> We have a mixture of different devices with different register layouts,
> but we group all the bits together in an opaque mess. Split them out
> into those which are L2C-310 specific and ones which refer to earlier
> devices. Provide full auxiliary control register definitions.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Tony Lindgren <tony@atomide.com>
> --- a/arch/arm/mach-omap2/omap4-common.c
> +++ b/arch/arm/mach-omap2/omap4-common.c
> @@ -212,15 +212,15 @@ static int __init omap_l2_cache_init(void)
> return -ENOMEM;
>
> /* 16-way associativity, parity disabled, way size - 64KB (es2.0 +) */
> - aux_ctrl = (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
> - (0x1 << 25) |
> - (0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
> - (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT)) |
> - (0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
> - (1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
> - (1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
> - (1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
> - (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT);
> + aux_ctrl = L310_AUX_CTRL_ASSOCIATIVITY_16 |
> + L310_AUX_CTRL_CACHE_REPLACE_RR |
> + L310_AUX_CTRL_NS_LOCKDOWN |
> + L310_AUX_CTRL_NS_INT_CTRL |
> + L2C_AUX_CTRL_WAY_SIZE(3) |
> + L2C_AUX_CTRL_SHARED_OVERRIDE |
> + L310_AUX_CTRL_DATA_PREFETCH |
> + L310_AUX_CTRL_INSTR_PREFETCH |
> + L310_AUX_CTRL_EARLY_BRESP;
I guess eventually we can set up some common configuration mask
define for these kind of things?
Regards,
Tony
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 49/75] ARM: l2c: fix register naming
2014-03-28 15:18 ` [PATCH 49/75] ARM: l2c: fix register naming Russell King
2014-03-28 16:00 ` Tony Lindgren
@ 2014-03-28 16:01 ` Tony Lindgren
2014-03-28 18:51 ` [STLinux Kernel] " Maxime Coquelin
[not found] ` <E1WTYYH-0007GB-3M-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
3 siblings, 0 replies; 20+ messages in thread
From: Tony Lindgren @ 2014-03-28 16:01 UTC (permalink / raw)
To: Russell King
Cc: linux-arm-kernel, Anton Vorontsov, Shawn Guo, Sascha Hauer,
Barry Song, Viresh Kumar, Shiraz Hashim, Srinivas Kandagatla,
Stuart Menefy, Stephen Warren, Thierry Reding, Linus Walleij,
Ben Dooks, Kukjin Kim, linux-omap, spear-devel, kernel,
linux-tegra, linux-samsung-soc
* Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:22]:
> We have a mixture of different devices with different register layouts,
> but we group all the bits together in an opaque mess. Split them out
> into those which are L2C-310 specific and ones which refer to earlier
> devices. Provide full auxiliary control register definitions.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 51/75] ARM: l2c: remove platforms/SoCs setting early BRESP
2014-03-28 15:18 ` [PATCH 51/75] ARM: l2c: remove platforms/SoCs setting early BRESP Russell King
@ 2014-03-28 16:02 ` Tony Lindgren
0 siblings, 0 replies; 20+ messages in thread
From: Tony Lindgren @ 2014-03-28 16:02 UTC (permalink / raw)
To: Russell King
Cc: linux-arm-kernel, Sebastian Hesselbarth, Kukjin Kim, Simon Horman,
Magnus Damm, Viresh Kumar, Shiraz Hashim, Stephen Warren,
Thierry Reding, linux-samsung-soc, linux-omap, linux-sh,
spear-devel, linux-tegra
* Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:22]:
> Since we now automatically enable early BRESP in core L2C-310 code when
> we detect a Cortex-A9, we don't need platforms/SoCs to set this bit
> explicitly. Instead, they should seek to preserve the value of bit 30
> in the auxiliary control register.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 58/75] ARM: l2c: omap2: remove cache size override
2014-03-28 15:19 ` [PATCH 58/75] ARM: l2c: omap2: remove cache size override Russell King
@ 2014-03-28 16:03 ` Tony Lindgren
2014-03-28 21:09 ` Russell King - ARM Linux
0 siblings, 1 reply; 20+ messages in thread
From: Tony Lindgren @ 2014-03-28 16:03 UTC (permalink / raw)
To: Russell King; +Cc: linux-arm-kernel, linux-omap
* Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:22]:
Missing description?
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/mach-omap2/omap4-common.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
> index ce2fad84a43c..c0f9a81a2d32 100644
> --- a/arch/arm/mach-omap2/omap4-common.c
> +++ b/arch/arm/mach-omap2/omap4-common.c
> @@ -212,20 +212,18 @@ static int __init omap_l2_cache_init(void)
> return -ENOMEM;
>
> /* 16-way associativity, parity disabled, way size - 64KB (es2.0 +) */
> - aux_ctrl = L310_AUX_CTRL_ASSOCIATIVITY_16 |
> - L310_AUX_CTRL_CACHE_REPLACE_RR |
> + aux_ctrl = L310_AUX_CTRL_CACHE_REPLACE_RR |
> L310_AUX_CTRL_NS_LOCKDOWN |
> L310_AUX_CTRL_NS_INT_CTRL |
> - L2C_AUX_CTRL_WAY_SIZE(3) |
> L2C_AUX_CTRL_SHARED_OVERRIDE |
> L310_AUX_CTRL_DATA_PREFETCH |
> L310_AUX_CTRL_INSTR_PREFETCH;
>
> outer_cache.write_sec = omap4_l2c310_write_sec;
> if (of_have_populated_dt())
> - l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
> + l2x0_of_init(aux_ctrl, 0xc19fffff);
> else
> - l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);
> + l2x0_init(l2cache_base, aux_ctrl, 0xc19fffff);
>
> return 0;
> }
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [STLinux Kernel] [PATCH 49/75] ARM: l2c: fix register naming
2014-03-28 15:18 ` [PATCH 49/75] ARM: l2c: fix register naming Russell King
2014-03-28 16:00 ` Tony Lindgren
2014-03-28 16:01 ` Tony Lindgren
@ 2014-03-28 18:51 ` Maxime Coquelin
[not found] ` <E1WTYYH-0007GB-3M-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
3 siblings, 0 replies; 20+ messages in thread
From: Maxime Coquelin @ 2014-03-28 18:51 UTC (permalink / raw)
To: Russell King, linux-arm-kernel
Cc: Barry Song, Kukjin Kim, Anton Vorontsov, Stephen Warren,
Tony Lindgren, Linus Walleij, Srinivas Kandagatla, spear-devel,
Shawn Guo, Shiraz Hashim, Thierry Reding, Viresh Kumar, Ben Dooks,
linux-tegra, linux-omap, Sascha Hauer, linux-samsung-soc, kernel
Thanks Russel,
On 03/28/2014 04:18 PM, Russell King wrote:
> We have a mixture of different devices with different register layouts,
> but we group all the bits together in an opaque mess. Split them out
> into those which are L2C-310 specific and ones which refer to earlier
> devices. Provide full auxiliary control register definitions.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/include/asm/hardware/cache-l2x0.h | 73 ++++++++++++++++++++----------
> arch/arm/mach-cns3xxx/core.c | 8 ++--
> arch/arm/mach-imx/system.c | 8 ++--
> arch/arm/mach-omap2/omap-mpuss-lowpower.c | 2 +-
> arch/arm/mach-omap2/omap4-common.c | 18 ++++----
> arch/arm/mach-prima2/l2x0.c | 5 +-
> arch/arm/mach-realview/realview_pbx.c | 4 +-
> arch/arm/mach-spear/spear13xx.c | 6 +--
> arch/arm/mach-sti/board-dt.c | 8 ++--
> arch/arm/mach-tegra/sleep.h | 8 ++--
> arch/arm/mach-ux500/cache-l2x0.c | 4 +-
> arch/arm/mach-vexpress/ct-ca9x4.c | 4 +-
> arch/arm/mm/cache-l2x0.c | 57 +++++++++++------------
> arch/arm/plat-samsung/s5p-sleep.S | 8 ++--
> 14 files changed, 118 insertions(+), 95 deletions(-)
>
For the mach-sti part:
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 49/75] ARM: l2c: fix register naming
[not found] ` <E1WTYYH-0007GB-3M-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
@ 2014-03-28 19:01 ` Linus Walleij
0 siblings, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2014-03-28 19:01 UTC (permalink / raw)
To: Russell King
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Anton Vorontsov, Shawn Guo, Sascha Hauer, Tony Lindgren,
Barry Song, Viresh Kumar, Shiraz Hashim, Srinivas Kandagatla,
Stuart Menefy, Stephen Warren, Thierry Reding, Ben Dooks,
Kukjin Kim, Linux-OMAP, spear-devel,
kernel-F5mvAk5X5gdBDgjK7y7TUQ,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-samsung-soc
On Fri, Mar 28, 2014 at 4:18 PM, Russell King
<rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org> wrote:
> We have a mixture of different devices with different register layouts,
> but we group all the bits together in an opaque mess. Split them out
> into those which are L2C-310 specific and ones which refer to earlier
> devices. Provide full auxiliary control register definitions.
>
> Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
For ux500.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 49/75] ARM: l2c: fix register naming
2014-03-28 16:00 ` Tony Lindgren
@ 2014-03-28 21:02 ` Russell King - ARM Linux
2014-03-28 22:15 ` Tony Lindgren
0 siblings, 1 reply; 20+ messages in thread
From: Russell King - ARM Linux @ 2014-03-28 21:02 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-arm-kernel, Anton Vorontsov, Shawn Guo, Sascha Hauer,
Barry Song, Viresh Kumar, Shiraz Hashim, Srinivas Kandagatla,
Stuart Menefy, Stephen Warren, Thierry Reding, Linus Walleij,
Ben Dooks, Kukjin Kim, linux-omap, spear-devel, kernel,
linux-tegra, linux-samsung-soc
On Fri, Mar 28, 2014 at 09:00:48AM -0700, Tony Lindgren wrote:
> * Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:22]:
> > We have a mixture of different devices with different register layouts,
> > but we group all the bits together in an opaque mess. Split them out
> > into those which are L2C-310 specific and ones which refer to earlier
> > devices. Provide full auxiliary control register definitions.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>
> Acked-by: Tony Lindgren <tony@atomide.com>
>
> > --- a/arch/arm/mach-omap2/omap4-common.c
> > +++ b/arch/arm/mach-omap2/omap4-common.c
> > @@ -212,15 +212,15 @@ static int __init omap_l2_cache_init(void)
> > return -ENOMEM;
> >
> > /* 16-way associativity, parity disabled, way size - 64KB (es2.0 +) */
> > - aux_ctrl = (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
> > - (0x1 << 25) |
> > - (0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
> > - (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT)) |
> > - (0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
> > - (1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
> > - (1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
> > - (1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
> > - (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT);
> > + aux_ctrl = L310_AUX_CTRL_ASSOCIATIVITY_16 |
> > + L310_AUX_CTRL_CACHE_REPLACE_RR |
> > + L310_AUX_CTRL_NS_LOCKDOWN |
> > + L310_AUX_CTRL_NS_INT_CTRL |
> > + L2C_AUX_CTRL_WAY_SIZE(3) |
> > + L2C_AUX_CTRL_SHARED_OVERRIDE |
> > + L310_AUX_CTRL_DATA_PREFETCH |
> > + L310_AUX_CTRL_INSTR_PREFETCH |
> > + L310_AUX_CTRL_EARLY_BRESP;
>
> I guess eventually we can set up some common configuration mask
> define for these kind of things?
The idea is that eventually platforms should just specify no changes to
the auxctl configuration. You will notice later patches remove a number
of the above flags.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 58/75] ARM: l2c: omap2: remove cache size override
2014-03-28 16:03 ` Tony Lindgren
@ 2014-03-28 21:09 ` Russell King - ARM Linux
2014-03-28 22:21 ` Tony Lindgren
0 siblings, 1 reply; 20+ messages in thread
From: Russell King - ARM Linux @ 2014-03-28 21:09 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-arm-kernel, linux-omap
On Fri, Mar 28, 2014 at 09:03:59AM -0700, Tony Lindgren wrote:
> * Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:22]:
>
> Missing description?
No, I just got sick and tired of trying to write descriptions for these
patches. Many of these I regard as totally unnecessary patches that
should never have been required had platform folk not invested in
cargo cult programming.
Given the number of patches I'm presently dealing with in my tree right
now, I don't actually have time to even follow the mailing lists at the
moment. If I were to properly describe all of these patches, I'd
probably be at this for another few weeks.
So, I'm at the point of "what you see is what you've got" as far as the
descriptions go... it's going to cause me a /lot/ of pain to just add
all the acks I'm going to need to these patches.
And... don't expect me to send the series out again any time soon to
LAKML - it's taken four to five hours for all these patches to filter
through the lists.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 49/75] ARM: l2c: fix register naming
2014-03-28 21:02 ` Russell King - ARM Linux
@ 2014-03-28 22:15 ` Tony Lindgren
0 siblings, 0 replies; 20+ messages in thread
From: Tony Lindgren @ 2014-03-28 22:15 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Barry Song, Kukjin Kim, linux-omap, Ben Dooks, Stephen Warren,
Srinivas Kandagatla, Linus Walleij, Anton Vorontsov, spear-devel,
Shiraz Hashim, Stuart Menefy, Thierry Reding, Viresh Kumar,
linux-samsung-soc, Sascha Hauer, linux-tegra, Shawn Guo,
linux-arm-kernel, kernel
* Russell King - ARM Linux <linux@arm.linux.org.uk> [140328 14:06]:
> On Fri, Mar 28, 2014 at 09:00:48AM -0700, Tony Lindgren wrote:
> > * Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:22]:
> > > We have a mixture of different devices with different register layouts,
> > > but we group all the bits together in an opaque mess. Split them out
> > > into those which are L2C-310 specific and ones which refer to earlier
> > > devices. Provide full auxiliary control register definitions.
> > >
> > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> >
> > Acked-by: Tony Lindgren <tony@atomide.com>
> >
> > > --- a/arch/arm/mach-omap2/omap4-common.c
> > > +++ b/arch/arm/mach-omap2/omap4-common.c
> > > @@ -212,15 +212,15 @@ static int __init omap_l2_cache_init(void)
> > > return -ENOMEM;
> > >
> > > /* 16-way associativity, parity disabled, way size - 64KB (es2.0 +) */
> > > - aux_ctrl = (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
> > > - (0x1 << 25) |
> > > - (0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
> > > - (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT)) |
> > > - (0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
> > > - (1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
> > > - (1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
> > > - (1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
> > > - (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT);
> > > + aux_ctrl = L310_AUX_CTRL_ASSOCIATIVITY_16 |
> > > + L310_AUX_CTRL_CACHE_REPLACE_RR |
> > > + L310_AUX_CTRL_NS_LOCKDOWN |
> > > + L310_AUX_CTRL_NS_INT_CTRL |
> > > + L2C_AUX_CTRL_WAY_SIZE(3) |
> > > + L2C_AUX_CTRL_SHARED_OVERRIDE |
> > > + L310_AUX_CTRL_DATA_PREFETCH |
> > > + L310_AUX_CTRL_INSTR_PREFETCH |
> > > + L310_AUX_CTRL_EARLY_BRESP;
> >
> > I guess eventually we can set up some common configuration mask
> > define for these kind of things?
>
> The idea is that eventually platforms should just specify no changes to
> the auxctl configuration. You will notice later patches remove a number
> of the above flags.
OK thanks great!
Tony
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 58/75] ARM: l2c: omap2: remove cache size override
2014-03-28 21:09 ` Russell King - ARM Linux
@ 2014-03-28 22:21 ` Tony Lindgren
2014-03-31 10:55 ` Russell King - ARM Linux
0 siblings, 1 reply; 20+ messages in thread
From: Tony Lindgren @ 2014-03-28 22:21 UTC (permalink / raw)
To: Russell King - ARM Linux; +Cc: linux-omap, linux-arm-kernel
* Russell King - ARM Linux <linux@arm.linux.org.uk> [140328 14:13]:
> On Fri, Mar 28, 2014 at 09:03:59AM -0700, Tony Lindgren wrote:
> > * Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:22]:
> >
> > Missing description?
>
> No, I just got sick and tired of trying to write descriptions for these
> patches. Many of these I regard as totally unnecessary patches that
> should never have been required had platform folk not invested in
> cargo cult programming.
>
> Given the number of patches I'm presently dealing with in my tree right
> now, I don't actually have time to even follow the mailing lists at the
> moment. If I were to properly describe all of these patches, I'd
> probably be at this for another few weeks.
Heh well I have a feeling you'll add some generic description anyways :)
> So, I'm at the point of "what you see is what you've got" as far as the
> descriptions go... it's going to cause me a /lot/ of pain to just add
> all the acks I'm going to need to these patches.
In that case here's one more painful ack for this patch:
Acked-by: Tony Lindgren <tony@atomide.com>
> And... don't expect me to send the series out again any time soon to
> LAKML - it's taken four to five hours for all these patches to filter
> through the lists.
No need to repost on my part.
Tony
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 58/75] ARM: l2c: omap2: remove cache size override
2014-03-28 22:21 ` Tony Lindgren
@ 2014-03-31 10:55 ` Russell King - ARM Linux
0 siblings, 0 replies; 20+ messages in thread
From: Russell King - ARM Linux @ 2014-03-31 10:55 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-arm-kernel, linux-omap
On Fri, Mar 28, 2014 at 03:21:59PM -0700, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [140328 14:13]:
> > On Fri, Mar 28, 2014 at 09:03:59AM -0700, Tony Lindgren wrote:
> > > * Russell King <rmk+kernel@arm.linux.org.uk> [140328 08:22]:
> > >
> > > Missing description?
> >
> > No, I just got sick and tired of trying to write descriptions for these
> > patches. Many of these I regard as totally unnecessary patches that
> > should never have been required had platform folk not invested in
> > cargo cult programming.
> >
> > Given the number of patches I'm presently dealing with in my tree right
> > now, I don't actually have time to even follow the mailing lists at the
> > moment. If I were to properly describe all of these patches, I'd
> > probably be at this for another few weeks.
>
> Heh well I have a feeling you'll add some generic description anyways :)
If I end up merging each of these patches removingthe cache override
together into one commit touching many of the SoCs, then yes.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2014-03-31 10:56 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20140328151249.GJ7528@n2100.arm.linux.org.uk>
2014-03-28 15:14 ` [PATCH 04/75] ARM: l2c: omap2: remove ES1.0 support Russell King
2014-03-28 15:54 ` Tony Lindgren
2014-03-28 15:18 ` [PATCH 42/75] ARM: l2c: omap2: implement new write_sec method Russell King
2014-03-28 15:56 ` Tony Lindgren
2014-03-28 15:18 ` [PATCH 43/75] ARM: l2c: omap2: remove explicit SMI calls to enable L2 cache Russell King
2014-03-28 15:56 ` Tony Lindgren
2014-03-28 15:18 ` [PATCH 49/75] ARM: l2c: fix register naming Russell King
2014-03-28 16:00 ` Tony Lindgren
2014-03-28 21:02 ` Russell King - ARM Linux
2014-03-28 22:15 ` Tony Lindgren
2014-03-28 16:01 ` Tony Lindgren
2014-03-28 18:51 ` [STLinux Kernel] " Maxime Coquelin
[not found] ` <E1WTYYH-0007GB-3M-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2014-03-28 19:01 ` Linus Walleij
2014-03-28 15:18 ` [PATCH 51/75] ARM: l2c: remove platforms/SoCs setting early BRESP Russell King
2014-03-28 16:02 ` Tony Lindgren
2014-03-28 15:19 ` [PATCH 58/75] ARM: l2c: omap2: remove cache size override Russell King
2014-03-28 16:03 ` Tony Lindgren
2014-03-28 21:09 ` Russell King - ARM Linux
2014-03-28 22:21 ` Tony Lindgren
2014-03-31 10:55 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).