aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pc100/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s5pc100/cpu.c')
-rw-r--r--arch/arm/mach-s5pc100/cpu.c56
1 files changed, 32 insertions, 24 deletions
diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c
index d79e7574a852..d424a9fda034 100644
--- a/arch/arm/mach-s5pc100/cpu.c
+++ b/arch/arm/mach-s5pc100/cpu.c
@@ -22,47 +22,53 @@
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>
44#include <plat/s5pc100.h> 43#include <plat/s5pc100.h>
45 44
46/* Initial IO mappings */ 45/* Initial IO mappings */
47 46
48static struct map_desc s5pc100_iodesc[] __initdata = { 47static struct map_desc s5pc100_iodesc[] __initdata = {
48 {
49 .virtual = (unsigned long)S5P_VA_SYSTIMER,
50 .pfn = __phys_to_pfn(S5PC100_PA_SYSTIMER),
51 .length = SZ_16K,
52 .type = MT_DEVICE,
53 }, {
54 .virtual = (unsigned long)VA_VIC2,
55 .pfn = __phys_to_pfn(S5PC100_PA_VIC2),
56 .length = SZ_16K,
57 .type = MT_DEVICE,
58 }, {
59 .virtual = (unsigned long)S5PC100_VA_OTHERS,
60 .pfn = __phys_to_pfn(S5PC100_PA_OTHERS),
61 .length = SZ_4K,
62 .type = MT_DEVICE,
63 }
49}; 64};
50 65
51static void s5pc100_idle(void) 66static void s5pc100_idle(void)
52{ 67{
53 unsigned long tmp; 68 if (!need_resched())
54 69 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 70
61 tmp = __raw_readl(S5PC100_OTHERS); 71 local_irq_enable();
62 tmp |= S5PC100_PMU_INT_DISABLE;
63 __raw_writel(tmp, S5PC100_OTHERS);
64
65 cpu_do_idle();
66} 72}
67 73
68/* s5pc100_map_io 74/* s5pc100_map_io
@@ -86,22 +92,23 @@ void __init s5pc100_map_io(void)
86 92
87void __init s5pc100_init_clocks(int xtal) 93void __init s5pc100_init_clocks(int xtal)
88{ 94{
89 printk(KERN_DEBUG "%s: initialising clocks\n", __func__); 95 printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
96
90 s3c24xx_register_baseclocks(xtal); 97 s3c24xx_register_baseclocks(xtal);
91 s5pc1xx_register_clocks(); 98 s5p_register_clocks(xtal);
92 s5pc100_register_clocks(); 99 s5pc100_register_clocks();
93 s5pc100_setup_clocks(); 100 s5pc100_setup_clocks();
94} 101}
95 102
96void __init s5pc100_init_irq(void) 103void __init s5pc100_init_irq(void)
97{ 104{
98 u32 vic_valid[] = {~0, ~0, ~0}; 105 u32 vic[] = {~0, ~0, ~0};
99 106
100 /* VIC0, VIC1, and VIC2 are fully populated. */ 107 /* VIC0, VIC1, and VIC2 are fully populated. */
101 s5pc1xx_init_irq(vic_valid, ARRAY_SIZE(vic_valid)); 108 s5p_init_irq(vic, ARRAY_SIZE(vic));
102} 109}
103 110
104struct sysdev_class s5pc100_sysclass = { 111static struct sysdev_class s5pc100_sysclass = {
105 .name = "s5pc100-core", 112 .name = "s5pc100-core",
106}; 113};
107 114
@@ -118,9 +125,10 @@ core_initcall(s5pc100_core_init);
118 125
119int __init s5pc100_init(void) 126int __init s5pc100_init(void)
120{ 127{
121 printk(KERN_DEBUG "S5PC100: Initialising architecture\n"); 128 printk(KERN_INFO "S5PC100: Initializing architecture\n");
122 129
123 s5pc1xx_idle = s5pc100_idle; 130 /* set idle function */
131 pm_idle = s5pc100_idle;
124 132
125 return sysdev_register(&s5pc100_sysdev); 133 return sysdev_register(&s5pc100_sysdev);
126} 134}