aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/hardware/cache-l2x0.h
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2011-08-03 13:12:05 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-10-17 04:11:30 -0400
commit8c369264b6de3b2ab796f330a4d85770a6b8b033 (patch)
treed0982a16d310ce24858107db2847c7ff326d5b1d /arch/arm/include/asm/hardware/cache-l2x0.h
parentd0a77454c70d0449a5f87087deb8f0cb15145e90 (diff)
ARM: 7009/1: l2x0: Add OF based initialization
This adds probing for ARM L2x0 cache controllers via device tree. Support includes the L210, L220, and PL310 controllers. The binding allows setting up cache RAM latencies and filter addresses (PL310 only). Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/hardware/cache-l2x0.h')
-rw-r--r--arch/arm/include/asm/hardware/cache-l2x0.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h
index 99a6ed7e1bf..c48cb1e1c46 100644
--- a/arch/arm/include/asm/hardware/cache-l2x0.h
+++ b/arch/arm/include/asm/hardware/cache-l2x0.h
@@ -52,6 +52,8 @@
52#define L2X0_LOCKDOWN_WAY_D_BASE 0x900 52#define L2X0_LOCKDOWN_WAY_D_BASE 0x900
53#define L2X0_LOCKDOWN_WAY_I_BASE 0x904 53#define L2X0_LOCKDOWN_WAY_I_BASE 0x904
54#define L2X0_LOCKDOWN_STRIDE 0x08 54#define L2X0_LOCKDOWN_STRIDE 0x08
55#define L2X0_ADDR_FILTER_START 0xC00
56#define L2X0_ADDR_FILTER_END 0xC04
55#define L2X0_TEST_OPERATION 0xF00 57#define L2X0_TEST_OPERATION 0xF00
56#define L2X0_LINE_DATA 0xF10 58#define L2X0_LINE_DATA 0xF10
57#define L2X0_LINE_TAG 0xF30 59#define L2X0_LINE_TAG 0xF30
@@ -67,6 +69,14 @@
67#define L2X0_CACHE_ID_PART_L310 (3 << 6) 69#define L2X0_CACHE_ID_PART_L310 (3 << 6)
68 70
69#define L2X0_AUX_CTRL_MASK 0xc0000fff 71#define L2X0_AUX_CTRL_MASK 0xc0000fff
72#define L2X0_AUX_CTRL_DATA_RD_LATENCY_SHIFT 0
73#define L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK 0x7
74#define L2X0_AUX_CTRL_DATA_WR_LATENCY_SHIFT 3
75#define L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK (0x7 << 3)
76#define L2X0_AUX_CTRL_TAG_LATENCY_SHIFT 6
77#define L2X0_AUX_CTRL_TAG_LATENCY_MASK (0x7 << 6)
78#define L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT 9
79#define L2X0_AUX_CTRL_DIRTY_LATENCY_MASK (0x7 << 9)
70#define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 80#define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16
71#define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 81#define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17
72#define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17) 82#define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17)
@@ -77,8 +87,15 @@
77#define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT 29 87#define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT 29
78#define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT 30 88#define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT 30
79 89
90#define L2X0_LATENCY_CTRL_SETUP_SHIFT 0
91#define L2X0_LATENCY_CTRL_RD_SHIFT 4
92#define L2X0_LATENCY_CTRL_WR_SHIFT 8
93
94#define L2X0_ADDR_FILTER_EN 1
95
80#ifndef __ASSEMBLY__ 96#ifndef __ASSEMBLY__
81extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask); 97extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask);
98extern int l2x0_of_init(__u32 aux_val, __u32 aux_mask);
82#endif 99#endif
83 100
84#endif 101#endif