GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / mach-s5p6442 / cpu.c
blob70ac681af72bc7a1a9ce5434c164e5b86e1fdf55
1 /* linux/arch/arm/mach-s5p6442/cpu.c
3 * Copyright (c) 2010 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.
9 */
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>
18 #include <linux/io.h>
19 #include <linux/sysdev.h>
20 #include <linux/serial_core.h>
21 #include <linux/platform_device.h>
22 #include <linux/sched.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/map.h>
26 #include <asm/mach/irq.h>
28 #include <asm/proc-fns.h>
30 #include <mach/hardware.h>
31 #include <mach/map.h>
32 #include <asm/irq.h>
34 #include <plat/regs-serial.h>
35 #include <mach/regs-clock.h>
37 #include <plat/cpu.h>
38 #include <plat/devs.h>
39 #include <plat/clock.h>
40 #include <plat/s5p6442.h>
42 /* Initial IO mappings */
44 static struct map_desc s5p6442_iodesc[] __initdata = {
46 .virtual = (unsigned long)S5P_VA_SYSTIMER,
47 .pfn = __phys_to_pfn(S5P6442_PA_SYSTIMER),
48 .length = SZ_16K,
49 .type = MT_DEVICE,
50 }, {
51 .virtual = (unsigned long)VA_VIC2,
52 .pfn = __phys_to_pfn(S5P6442_PA_VIC2),
53 .length = SZ_16K,
54 .type = MT_DEVICE,
58 static void s5p6442_idle(void)
60 if (!need_resched())
61 cpu_do_idle();
63 local_irq_enable();
66 /* s5p6442_map_io
68 * register the standard cpu IO areas
71 void __init s5p6442_map_io(void)
73 iotable_init(s5p6442_iodesc, ARRAY_SIZE(s5p6442_iodesc));
76 void __init s5p6442_init_clocks(int xtal)
78 printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
80 s3c24xx_register_baseclocks(xtal);
81 s5p_register_clocks(xtal);
82 s5p6442_register_clocks();
83 s5p6442_setup_clocks();
86 void __init s5p6442_init_irq(void)
88 /* S5P6442 supports 3 VIC */
89 u32 vic[3];
91 /* VIC0, VIC1, and VIC2: some interrupt reserved */
92 vic[0] = 0x7fefffff;
93 vic[1] = 0X7f389c81;
94 vic[2] = 0X1bbbcfff;
96 s5p_init_irq(vic, ARRAY_SIZE(vic));
99 struct sysdev_class s5p6442_sysclass = {
100 .name = "s5p6442-core",
103 static struct sys_device s5p6442_sysdev = {
104 .cls = &s5p6442_sysclass,
107 static int __init s5p6442_core_init(void)
109 return sysdev_class_register(&s5p6442_sysclass);
112 core_initcall(s5p6442_core_init);
114 int __init s5p6442_init(void)
116 printk(KERN_INFO "S5P6442: Initializing architecture\n");
118 /* set idle function */
119 pm_idle = s5p6442_idle;
121 return sysdev_register(&s5p6442_sysdev);