1 /* linux/arch/arm/mach-s5pc100/cpu.c
3 * Copyright 2009 Samsung Electronics Co.
4 * Byungho Min <bhmin@samsung.com>
6 * Based on mach-s3c6410/cpu.c
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/kernel.h>
14 #include <linux/types.h>
15 #include <linux/interrupt.h>
16 #include <linux/list.h>
17 #include <linux/timer.h>
18 #include <linux/init.h>
19 #include <linux/clk.h>
21 #include <linux/sysdev.h>
22 #include <linux/serial_core.h>
23 #include <linux/platform_device.h>
25 #include <asm/proc-fns.h>
27 #include <asm/mach/arch.h>
28 #include <asm/mach/map.h>
29 #include <asm/mach/irq.h>
31 #include <mach/hardware.h>
35 #include <plat/cpu-freq.h>
36 #include <plat/regs-serial.h>
37 #include <plat/regs-power.h>
40 #include <plat/devs.h>
41 #include <plat/clock.h>
42 #include <plat/sdhci.h>
43 #include <plat/iic-core.h>
44 #include <plat/s5pc100.h>
46 /* Initial IO mappings */
48 static struct map_desc s5pc100_iodesc
[] __initdata
= {
51 static void s5pc100_idle(void)
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
);
61 tmp
= __raw_readl(S5PC100_OTHERS
);
62 tmp
|= S5PC100_PMU_INT_DISABLE
;
63 __raw_writel(tmp
, S5PC100_OTHERS
);
70 * register the standard cpu IO areas
73 void __init
s5pc100_map_io(void)
75 iotable_init(s5pc100_iodesc
, ARRAY_SIZE(s5pc100_iodesc
));
77 /* initialise device information early */
78 s5pc100_default_sdhci0();
79 s5pc100_default_sdhci1();
80 s5pc100_default_sdhci2();
82 /* the i2c devices are directly compatible with s3c2440 */
83 s3c_i2c0_setname("s3c2440-i2c");
84 s3c_i2c1_setname("s3c2440-i2c");
87 void __init
s5pc100_init_clocks(int xtal
)
89 printk(KERN_DEBUG
"%s: initialising clocks\n", __func__
);
90 s3c24xx_register_baseclocks(xtal
);
91 s5pc1xx_register_clocks();
92 s5pc100_register_clocks();
93 s5pc100_setup_clocks();
96 void __init
s5pc100_init_irq(void)
98 u32 vic_valid
[] = {~0, ~0, ~0};
100 /* VIC0, VIC1, and VIC2 are fully populated. */
101 s5pc1xx_init_irq(vic_valid
, ARRAY_SIZE(vic_valid
));
104 struct sysdev_class s5pc100_sysclass
= {
105 .name
= "s5pc100-core",
108 static struct sys_device s5pc100_sysdev
= {
109 .cls
= &s5pc100_sysclass
,
112 static int __init
s5pc100_core_init(void)
114 return sysdev_class_register(&s5pc100_sysclass
);
117 core_initcall(s5pc100_core_init
);
119 int __init
s5pc100_init(void)
121 printk(KERN_DEBUG
"S5PC100: Initialising architecture\n");
123 s5pc1xx_idle
= s5pc100_idle
;
125 return sysdev_register(&s5pc100_sysdev
);