diff options
Diffstat (limited to 'arch/arm/mach-s5pc100/cpu.c')
-rw-r--r-- | arch/arm/mach-s5pc100/cpu.c | 60 |
1 files changed, 36 insertions, 24 deletions
diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c index d79e7574a852..7b5bdbc9a5df 100644 --- a/arch/arm/mach-s5pc100/cpu.c +++ b/arch/arm/mach-s5pc100/cpu.c | |||
@@ -22,47 +22,55 @@ | |||
22 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | 24 | ||
25 | #include <asm/proc-fns.h> | ||
26 | |||
27 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
29 | #include <asm/mach/irq.h> | 27 | #include <asm/mach/irq.h> |
30 | 28 | ||
29 | #include <asm/proc-fns.h> | ||
30 | |||
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | #include <mach/map.h> | 32 | #include <mach/map.h> |
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | 34 | ||
35 | #include <plat/cpu-freq.h> | ||
36 | #include <plat/regs-serial.h> | 35 | #include <plat/regs-serial.h> |
37 | #include <plat/regs-power.h> | 36 | #include <mach/regs-clock.h> |
38 | 37 | ||
39 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
40 | #include <plat/devs.h> | 39 | #include <plat/devs.h> |
41 | #include <plat/clock.h> | 40 | #include <plat/clock.h> |
42 | #include <plat/sdhci.h> | ||
43 | #include <plat/iic-core.h> | 41 | #include <plat/iic-core.h> |
42 | #include <plat/sdhci.h> | ||
43 | #include <plat/onenand-core.h> | ||
44 | |||
44 | #include <plat/s5pc100.h> | 45 | #include <plat/s5pc100.h> |
45 | 46 | ||
46 | /* Initial IO mappings */ | 47 | /* Initial IO mappings */ |
47 | 48 | ||
48 | static struct map_desc s5pc100_iodesc[] __initdata = { | 49 | static struct map_desc s5pc100_iodesc[] __initdata = { |
50 | { | ||
51 | .virtual = (unsigned long)S5P_VA_SYSTIMER, | ||
52 | .pfn = __phys_to_pfn(S5PC100_PA_SYSTIMER), | ||
53 | .length = SZ_16K, | ||
54 | .type = MT_DEVICE, | ||
55 | }, { | ||
56 | .virtual = (unsigned long)VA_VIC2, | ||
57 | .pfn = __phys_to_pfn(S5P_PA_VIC2), | ||
58 | .length = SZ_16K, | ||
59 | .type = MT_DEVICE, | ||
60 | }, { | ||
61 | .virtual = (unsigned long)S5PC100_VA_OTHERS, | ||
62 | .pfn = __phys_to_pfn(S5PC100_PA_OTHERS), | ||
63 | .length = SZ_4K, | ||
64 | .type = MT_DEVICE, | ||
65 | } | ||
49 | }; | 66 | }; |
50 | 67 | ||
51 | static void s5pc100_idle(void) | 68 | static void s5pc100_idle(void) |
52 | { | 69 | { |
53 | unsigned long tmp; | 70 | if (!need_resched()) |
54 | 71 | cpu_do_idle(); | |
55 | tmp = __raw_readl(S5PC100_PWR_CFG); | ||
56 | tmp &= ~S5PC100_PWRCFG_CFG_DEEP_IDLE; | ||
57 | tmp &= ~S5PC100_PWRCFG_CFG_WFI_MASK; | ||
58 | tmp |= S5PC100_PWRCFG_CFG_WFI_DEEP_IDLE; | ||
59 | __raw_writel(tmp, S5PC100_PWR_CFG); | ||
60 | |||
61 | tmp = __raw_readl(S5PC100_OTHERS); | ||
62 | tmp |= S5PC100_PMU_INT_DISABLE; | ||
63 | __raw_writel(tmp, S5PC100_OTHERS); | ||
64 | 72 | ||
65 | cpu_do_idle(); | 73 | local_irq_enable(); |
66 | } | 74 | } |
67 | 75 | ||
68 | /* s5pc100_map_io | 76 | /* s5pc100_map_io |
@@ -82,26 +90,29 @@ void __init s5pc100_map_io(void) | |||
82 | /* the i2c devices are directly compatible with s3c2440 */ | 90 | /* the i2c devices are directly compatible with s3c2440 */ |
83 | s3c_i2c0_setname("s3c2440-i2c"); | 91 | s3c_i2c0_setname("s3c2440-i2c"); |
84 | s3c_i2c1_setname("s3c2440-i2c"); | 92 | s3c_i2c1_setname("s3c2440-i2c"); |
93 | |||
94 | s3c_onenand_setname("s5pc100-onenand"); | ||
85 | } | 95 | } |
86 | 96 | ||
87 | void __init s5pc100_init_clocks(int xtal) | 97 | void __init s5pc100_init_clocks(int xtal) |
88 | { | 98 | { |
89 | printk(KERN_DEBUG "%s: initialising clocks\n", __func__); | 99 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); |
100 | |||
90 | s3c24xx_register_baseclocks(xtal); | 101 | s3c24xx_register_baseclocks(xtal); |
91 | s5pc1xx_register_clocks(); | 102 | s5p_register_clocks(xtal); |
92 | s5pc100_register_clocks(); | 103 | s5pc100_register_clocks(); |
93 | s5pc100_setup_clocks(); | 104 | s5pc100_setup_clocks(); |
94 | } | 105 | } |
95 | 106 | ||
96 | void __init s5pc100_init_irq(void) | 107 | void __init s5pc100_init_irq(void) |
97 | { | 108 | { |
98 | u32 vic_valid[] = {~0, ~0, ~0}; | 109 | u32 vic[] = {~0, ~0, ~0}; |
99 | 110 | ||
100 | /* VIC0, VIC1, and VIC2 are fully populated. */ | 111 | /* VIC0, VIC1, and VIC2 are fully populated. */ |
101 | s5pc1xx_init_irq(vic_valid, ARRAY_SIZE(vic_valid)); | 112 | s5p_init_irq(vic, ARRAY_SIZE(vic)); |
102 | } | 113 | } |
103 | 114 | ||
104 | struct sysdev_class s5pc100_sysclass = { | 115 | static struct sysdev_class s5pc100_sysclass = { |
105 | .name = "s5pc100-core", | 116 | .name = "s5pc100-core", |
106 | }; | 117 | }; |
107 | 118 | ||
@@ -118,9 +129,10 @@ core_initcall(s5pc100_core_init); | |||
118 | 129 | ||
119 | int __init s5pc100_init(void) | 130 | int __init s5pc100_init(void) |
120 | { | 131 | { |
121 | printk(KERN_DEBUG "S5PC100: Initialising architecture\n"); | 132 | printk(KERN_INFO "S5PC100: Initializing architecture\n"); |
122 | 133 | ||
123 | s5pc1xx_idle = s5pc100_idle; | 134 | /* set idle function */ |
135 | pm_idle = s5pc100_idle; | ||
124 | 136 | ||
125 | return sysdev_register(&s5pc100_sysdev); | 137 | return sysdev_register(&s5pc100_sysdev); |
126 | } | 138 | } |