1 /* linux/arch/arm/mach-s5p6440/cpu.c
3 * Copyright (c) 2009 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #include <linux/kernel.h>
12 #include <linux/types.h>
13 #include <linux/interrupt.h>
14 #include <linux/list.h>
15 #include <linux/timer.h>
16 #include <linux/init.h>
17 #include <linux/clk.h>
19 #include <linux/sysdev.h>
20 #include <linux/serial_core.h>
21 #include <linux/platform_device.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach/map.h>
25 #include <asm/mach/irq.h>
27 #include <asm/proc-fns.h>
29 #include <mach/hardware.h>
33 #include <plat/regs-serial.h>
34 #include <mach/regs-clock.h>
37 #include <plat/devs.h>
38 #include <plat/clock.h>
39 #include <plat/s5p6440.h>
40 #include <plat/adc-core.h>
42 static void s5p6440_idle(void)
46 if (!need_resched()) {
47 val = __raw_readl(S5P_PWR_CFG);
50 __raw_writel(val, S5P_PWR_CFG);
59 * register the standard cpu IO areas
62 void __init s5p6440_map_io(void)
64 /* initialize any device information early */
65 s3c_adc_setname("s3c64xx-adc");
68 void __init s5p6440_init_clocks(int xtal)
70 printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
72 s3c24xx_register_baseclocks(xtal);
73 s5p_register_clocks(xtal);
74 s5p6440_register_clocks();
75 s5p6440_setup_clocks();
78 void __init s5p6440_init_irq(void)
80 /* S5P6440 supports only 2 VIC */
84 * VIC0 is missing IRQ_VIC0[3, 4, 8, 10, (12-22)]
85 * VIC1 is missing IRQ VIC1[1, 3, 4, 10, 11, 12, 14, 15, 22]
90 s5p_init_irq(vic, ARRAY_SIZE(vic));
93 struct sysdev_class s5p6440_sysclass = {
94 .name = "s5p6440-core",
97 static struct sys_device s5p6440_sysdev = {
98 .cls = &s5p6440_sysclass,
101 static int __init s5p6440_core_init(void)
103 return sysdev_class_register(&s5p6440_sysclass);
106 core_initcall(s5p6440_core_init);
108 int __init s5p6440_init(void)
110 printk(KERN_INFO "S5P6440: Initializing architecture\n");
112 /* set idle function */
113 pm_idle = s5p6440_idle;
115 return sysdev_register(&s5p6440_sysdev);