diff options
author | Kyungmin Park <kyungmin.park@samsung.com> | 2010-10-21 02:22:36 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-25 03:11:16 -0400 |
commit | 1cf0eb799759b24199374955976fee8469835203 (patch) | |
tree | 744cd0ca71a58f1e0dc9807c44e648ede6f70fe2 /arch/arm/mach-s5pv310/cpu.c | |
parent | 57c1f8713605489b3d4914f68a96564858d7c91d (diff) |
ARM: S5PV310: Add L2 cache init function in cpu.c
This patch adds L2 cache initialization code in cpu.c of ARCH_S5PV310.
It includes TAG and Data latency, Prefetch, and Power configurations.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv310/cpu.c')
-rw-r--r-- | arch/arm/mach-s5pv310/cpu.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c index 5b9790054421..4e3f5be264ef 100644 --- a/arch/arm/mach-s5pv310/cpu.c +++ b/arch/arm/mach-s5pv310/cpu.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/mach/irq.h> | 15 | #include <asm/mach/irq.h> |
16 | 16 | ||
17 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
18 | #include <asm/hardware/cache-l2x0.h> | ||
18 | 19 | ||
19 | #include <plat/cpu.h> | 20 | #include <plat/cpu.h> |
20 | #include <plat/clock.h> | 21 | #include <plat/clock.h> |
@@ -148,6 +149,28 @@ static int __init s5pv310_core_init(void) | |||
148 | 149 | ||
149 | core_initcall(s5pv310_core_init); | 150 | core_initcall(s5pv310_core_init); |
150 | 151 | ||
152 | #ifdef CONFIG_CACHE_L2X0 | ||
153 | static int __init s5pv310_l2x0_cache_init(void) | ||
154 | { | ||
155 | /* TAG, Data Latency Control: 2cycle */ | ||
156 | __raw_writel(0x110, S5P_VA_L2CC + L2X0_TAG_LATENCY_CTRL); | ||
157 | __raw_writel(0x110, S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL); | ||
158 | |||
159 | /* L2X0 Prefetch Control */ | ||
160 | __raw_writel(0x30000007, S5P_VA_L2CC + L2X0_PREFETCH_CTRL); | ||
161 | |||
162 | /* L2X0 Power Control */ | ||
163 | __raw_writel(L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN, | ||
164 | S5P_VA_L2CC + L2X0_POWER_CTRL); | ||
165 | |||
166 | l2x0_init(S5P_VA_L2CC, 0x7C070001, 0xC200ffff); | ||
167 | |||
168 | return 0; | ||
169 | } | ||
170 | |||
171 | early_initcall(s5pv310_l2x0_cache_init); | ||
172 | #endif | ||
173 | |||
151 | int __init s5pv310_init(void) | 174 | int __init s5pv310_init(void) |
152 | { | 175 | { |
153 | printk(KERN_INFO "S5PV310: Initializing architecture\n"); | 176 | printk(KERN_INFO "S5PV310: Initializing architecture\n"); |