aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv310/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s5pv310/cpu.c')
-rw-r--r--arch/arm/mach-s5pv310/cpu.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
index 4add39853ff9..82ce4aa6d61a 100644
--- a/arch/arm/mach-s5pv310/cpu.c
+++ b/arch/arm/mach-s5pv310/cpu.c
@@ -15,10 +15,12 @@
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>
21#include <plat/s5pv310.h> 22#include <plat/s5pv310.h>
23#include <plat/sdhci.h>
22 24
23#include <mach/regs-irq.h> 25#include <mach/regs-irq.h>
24 26
@@ -56,15 +58,30 @@ static struct map_desc s5pv310_iodesc[] __initdata = {
56 .length = SZ_4K, 58 .length = SZ_4K,
57 .type = MT_DEVICE, 59 .type = MT_DEVICE,
58 }, { 60 }, {
59 .virtual = (unsigned long)S5P_VA_GPIO, 61 .virtual = (unsigned long)S5P_VA_GPIO1,
60 .pfn = __phys_to_pfn(S5PV310_PA_GPIO1), 62 .pfn = __phys_to_pfn(S5PV310_PA_GPIO1),
61 .length = SZ_4K, 63 .length = SZ_4K,
62 .type = MT_DEVICE, 64 .type = MT_DEVICE,
63 }, { 65 }, {
66 .virtual = (unsigned long)S5P_VA_GPIO2,
67 .pfn = __phys_to_pfn(S5PV310_PA_GPIO2),
68 .length = SZ_4K,
69 .type = MT_DEVICE,
70 }, {
71 .virtual = (unsigned long)S5P_VA_GPIO3,
72 .pfn = __phys_to_pfn(S5PV310_PA_GPIO3),
73 .length = SZ_256,
74 .type = MT_DEVICE,
75 }, {
64 .virtual = (unsigned long)S3C_VA_UART, 76 .virtual = (unsigned long)S3C_VA_UART,
65 .pfn = __phys_to_pfn(S3C_PA_UART), 77 .pfn = __phys_to_pfn(S3C_PA_UART),
66 .length = SZ_512K, 78 .length = SZ_512K,
67 .type = MT_DEVICE, 79 .type = MT_DEVICE,
80 }, {
81 .virtual = (unsigned long)S5P_VA_SROMC,
82 .pfn = __phys_to_pfn(S5PV310_PA_SROMC),
83 .length = SZ_4K,
84 .type = MT_DEVICE,
68 }, 85 },
69}; 86};
70 87
@@ -83,6 +100,12 @@ static void s5pv310_idle(void)
83void __init s5pv310_map_io(void) 100void __init s5pv310_map_io(void)
84{ 101{
85 iotable_init(s5pv310_iodesc, ARRAY_SIZE(s5pv310_iodesc)); 102 iotable_init(s5pv310_iodesc, ARRAY_SIZE(s5pv310_iodesc));
103
104 /* initialize device information early */
105 s5pv310_default_sdhci0();
106 s5pv310_default_sdhci1();
107 s5pv310_default_sdhci2();
108 s5pv310_default_sdhci3();
86} 109}
87 110
88void __init s5pv310_init_clocks(int xtal) 111void __init s5pv310_init_clocks(int xtal)
@@ -131,6 +154,28 @@ static int __init s5pv310_core_init(void)
131 154
132core_initcall(s5pv310_core_init); 155core_initcall(s5pv310_core_init);
133 156
157#ifdef CONFIG_CACHE_L2X0
158static int __init s5pv310_l2x0_cache_init(void)
159{
160 /* TAG, Data Latency Control: 2cycle */
161 __raw_writel(0x110, S5P_VA_L2CC + L2X0_TAG_LATENCY_CTRL);
162 __raw_writel(0x110, S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL);
163
164 /* L2X0 Prefetch Control */
165 __raw_writel(0x30000007, S5P_VA_L2CC + L2X0_PREFETCH_CTRL);
166
167 /* L2X0 Power Control */
168 __raw_writel(L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN,
169 S5P_VA_L2CC + L2X0_POWER_CTRL);
170
171 l2x0_init(S5P_VA_L2CC, 0x7C070001, 0xC200ffff);
172
173 return 0;
174}
175
176early_initcall(s5pv310_l2x0_cache_init);
177#endif
178
134int __init s5pv310_init(void) 179int __init s5pv310_init(void)
135{ 180{
136 printk(KERN_INFO "S5PV310: Initializing architecture\n"); 181 printk(KERN_INFO "S5PV310: Initializing architecture\n");