dm writecache: fix incorrect flush sequence when doing SSD mode commit
[linux/fpc-iii.git] / arch / arm / mach-s3c24xx / s3c2410.c
blob21fd5404bc98834971d0448de6e17914ff8072ab
1 // SPDX-License-Identifier: GPL-2.0
2 //
3 // Copyright (c) 2003-2005 Simtec Electronics
4 // Ben Dooks <ben@simtec.co.uk>
5 //
6 // http://www.simtec.co.uk/products/EB2410ITX/
8 #include <linux/kernel.h>
9 #include <linux/types.h>
10 #include <linux/interrupt.h>
11 #include <linux/list.h>
12 #include <linux/timer.h>
13 #include <linux/init.h>
14 #include <linux/gpio.h>
15 #include <linux/clk.h>
16 #include <linux/device.h>
17 #include <linux/syscore_ops.h>
18 #include <linux/serial_core.h>
19 #include <linux/serial_s3c.h>
20 #include <linux/platform_device.h>
21 #include <linux/reboot.h>
22 #include <linux/io.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/map.h>
26 #include <asm/mach/irq.h>
28 #include <mach/hardware.h>
29 #include <mach/gpio-samsung.h>
30 #include <asm/irq.h>
31 #include <asm/system_misc.h>
33 #include <plat/cpu-freq.h>
35 #include <mach/regs-clock.h>
37 #include <plat/cpu.h>
38 #include <plat/devs.h>
39 #include <plat/pm.h>
41 #include <plat/gpio-core.h>
42 #include <plat/gpio-cfg.h>
43 #include <plat/gpio-cfg-helpers.h>
45 #include "common.h"
47 /* Initial IO mappings */
49 static struct map_desc s3c2410_iodesc[] __initdata = {
50 IODESC_ENT(CLKPWR),
51 IODESC_ENT(TIMER),
52 IODESC_ENT(WATCHDOG),
55 /* our uart devices */
57 /* uart registration process */
59 void __init s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no)
61 s3c24xx_init_uartdevs("s3c2410-uart", s3c2410_uart_resources, cfg, no);
64 /* s3c2410_map_io
66 * register the standard cpu IO areas, and any passed in from the
67 * machine specific initialisation.
70 void __init s3c2410_map_io(void)
72 s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up;
73 s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up;
75 iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc));
78 struct bus_type s3c2410_subsys = {
79 .name = "s3c2410-core",
80 .dev_name = "s3c2410-core",
83 /* Note, we would have liked to name this s3c2410-core, but we cannot
84 * register two subsystems with the same name.
86 struct bus_type s3c2410a_subsys = {
87 .name = "s3c2410a-core",
88 .dev_name = "s3c2410a-core",
91 static struct device s3c2410_dev = {
92 .bus = &s3c2410_subsys,
95 /* need to register the subsystem before we actually register the device, and
96 * we also need to ensure that it has been initialised before any of the
97 * drivers even try to use it (even if not on an s3c2410 based system)
98 * as a driver which may support both 2410 and 2440 may try and use it.
101 static int __init s3c2410_core_init(void)
103 return subsys_system_register(&s3c2410_subsys, NULL);
106 core_initcall(s3c2410_core_init);
108 static int __init s3c2410a_core_init(void)
110 return subsys_system_register(&s3c2410a_subsys, NULL);
113 core_initcall(s3c2410a_core_init);
115 int __init s3c2410_init(void)
117 printk("S3C2410: Initialising architecture\n");
119 #ifdef CONFIG_PM_SLEEP
120 register_syscore_ops(&s3c2410_pm_syscore_ops);
121 register_syscore_ops(&s3c24xx_irq_syscore_ops);
122 #endif
124 return device_register(&s3c2410_dev);
127 int __init s3c2410a_init(void)
129 s3c2410_dev.bus = &s3c2410a_subsys;
130 return s3c2410_init();