aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2416/s3c2416.c')
-rw-r--r--arch/arm/mach-s3c2416/s3c2416.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c
index 494ce913dc95..5287d2808d3e 100644
--- a/arch/arm/mach-s3c2416/s3c2416.c
+++ b/arch/arm/mach-s3c2416/s3c2416.c
@@ -31,7 +31,7 @@
31#include <linux/gpio.h> 31#include <linux/gpio.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/serial_core.h> 33#include <linux/serial_core.h>
34#include <linux/sysdev.h> 34#include <linux/device.h>
35#include <linux/syscore_ops.h> 35#include <linux/syscore_ops.h>
36#include <linux/clk.h> 36#include <linux/clk.h>
37#include <linux/io.h> 37#include <linux/io.h>
@@ -44,7 +44,6 @@
44#include <asm/proc-fns.h> 44#include <asm/proc-fns.h>
45#include <asm/irq.h> 45#include <asm/irq.h>
46 46
47#include <mach/reset.h>
48#include <mach/idle.h> 47#include <mach/idle.h>
49#include <mach/regs-s3c2443-clock.h> 48#include <mach/regs-s3c2443-clock.h>
50 49
@@ -60,6 +59,7 @@
60#include <plat/iic-core.h> 59#include <plat/iic-core.h>
61#include <plat/fb-core.h> 60#include <plat/fb-core.h>
62#include <plat/nand-core.h> 61#include <plat/nand-core.h>
62#include <plat/adc-core.h>
63 63
64static struct map_desc s3c2416_iodesc[] __initdata = { 64static struct map_desc s3c2416_iodesc[] __initdata = {
65 IODESC_ENT(WATCHDOG), 65 IODESC_ENT(WATCHDOG),
@@ -67,16 +67,20 @@ static struct map_desc s3c2416_iodesc[] __initdata = {
67 IODESC_ENT(TIMER), 67 IODESC_ENT(TIMER),
68}; 68};
69 69
70struct sysdev_class s3c2416_sysclass = { 70struct bus_type s3c2416_subsys = {
71 .name = "s3c2416-core", 71 .name = "s3c2416-core",
72 .dev_name = "s3c2416-core",
72}; 73};
73 74
74static struct sys_device s3c2416_sysdev = { 75static struct device s3c2416_dev = {
75 .cls = &s3c2416_sysclass, 76 .bus = &s3c2416_subsys,
76}; 77};
77 78
78static void s3c2416_hard_reset(void) 79void s3c2416_restart(char mode, const char *cmd)
79{ 80{
81 if (mode == 's')
82 soft_restart(0);
83
80 __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); 84 __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
81} 85}
82 86
@@ -84,7 +88,6 @@ int __init s3c2416_init(void)
84{ 88{
85 printk(KERN_INFO "S3C2416: Initializing architecture\n"); 89 printk(KERN_INFO "S3C2416: Initializing architecture\n");
86 90
87 s3c24xx_reset_hook = s3c2416_hard_reset;
88 /* s3c24xx_idle = s3c2416_idle; */ 91 /* s3c24xx_idle = s3c2416_idle; */
89 92
90 /* change WDT IRQ number */ 93 /* change WDT IRQ number */
@@ -97,10 +100,14 @@ int __init s3c2416_init(void)
97 100
98 s3c_fb_setname("s3c2443-fb"); 101 s3c_fb_setname("s3c2443-fb");
99 102
103 s3c_adc_setname("s3c2416-adc");
104
105#ifdef CONFIG_PM
100 register_syscore_ops(&s3c2416_pm_syscore_ops); 106 register_syscore_ops(&s3c2416_pm_syscore_ops);
107#endif
101 register_syscore_ops(&s3c24xx_irq_syscore_ops); 108 register_syscore_ops(&s3c24xx_irq_syscore_ops);
102 109
103 return sysdev_register(&s3c2416_sysdev); 110 return device_register(&s3c2416_dev);
104} 111}
105 112
106void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) 113void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no)
@@ -118,8 +125,8 @@ void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no)
118 125
119void __init s3c2416_map_io(void) 126void __init s3c2416_map_io(void)
120{ 127{
121 s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_updown; 128 s3c24xx_gpiocfg_default.set_pull = samsung_gpio_setpull_updown;
122 s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_updown; 129 s3c24xx_gpiocfg_default.get_pull = samsung_gpio_getpull_updown;
123 130
124 /* initialize device information early */ 131 /* initialize device information early */
125 s3c2416_default_sdhci0(); 132 s3c2416_default_sdhci0();
@@ -128,7 +135,7 @@ void __init s3c2416_map_io(void)
128 iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); 135 iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc));
129} 136}
130 137
131/* need to register class before we actually register the device, and 138/* need to register the subsystem before we actually register the device, and
132 * we also need to ensure that it has been initialised before any of the 139 * we also need to ensure that it has been initialised before any of the
133 * drivers even try to use it (even if not on an s3c2416 based system) 140 * drivers even try to use it (even if not on an s3c2416 based system)
134 * as a driver which may support both 2443 and 2440 may try and use it. 141 * as a driver which may support both 2443 and 2440 may try and use it.
@@ -136,7 +143,7 @@ void __init s3c2416_map_io(void)
136 143
137static int __init s3c2416_core_init(void) 144static int __init s3c2416_core_init(void)
138{ 145{
139 return sysdev_class_register(&s3c2416_sysclass); 146 return subsys_system_register(&s3c2416_subsys, NULL);
140} 147}
141 148
142core_initcall(s3c2416_core_init); 149core_initcall(s3c2416_core_init);