diff options
author | Heiko Stuebner <heiko@sntech.de> | 2011-12-22 17:37:44 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-05 07:57:18 -0500 |
commit | 57538975917d4b0c467dbdd21328337f059bc027 (patch) | |
tree | e7fbdeacc9d55950f8092edf53603ec557edd667 /arch/arm | |
parent | e11e909df5d1ae876502f9e5f714852aa6548b58 (diff) |
ARM: 7254/1: restart: S3C24XX: move SWRST based S3C platforms to
S3C2412/S3C2416/S3C2443 use a special register to signal the reset to
the processor and used therefore the s3c24xx_reset_hook mechanism in the
s3c24xx-specific arch reset.
This patch introduces restart functions for these architectures,
moves the board files to them and removes the s3c24xx_reset_hook
infrastructure, as all users are gone.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/reset.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/system-reset.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/system.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-jive.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-smdk2413.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-vstms.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/s3c2412.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-s3c2416/mach-smdk2416.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c2416/s3c2416.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-s3c2443/mach-smdk2443.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c2443/s3c2443.c | 8 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/s3c2412.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/s3c2416.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/s3c2443.h | 2 |
14 files changed, 27 insertions, 42 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/reset.h b/arch/arm/mach-s3c2410/include/mach/reset.h deleted file mode 100644 index f8c9387b049d..000000000000 --- a/arch/arm/mach-s3c2410/include/mach/reset.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/reset.h | ||
2 | * | ||
3 | * Copyright (c) 2007 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * S3C2410 CPU reset controls | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_RESET_H | ||
15 | #define __ASM_ARCH_RESET_H __FILE__ | ||
16 | |||
17 | /* This allows the over-ride of the default reset code | ||
18 | */ | ||
19 | |||
20 | extern void (*s3c24xx_reset_hook)(void); | ||
21 | |||
22 | #endif /* __ASM_ARCH_RESET_H */ | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h index 913893d44650..1e495f35ddd2 100644 --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h | |||
@@ -13,8 +13,6 @@ | |||
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | #include <plat/watchdog-reset.h> | 14 | #include <plat/watchdog-reset.h> |
15 | 15 | ||
16 | extern void (*s3c24xx_reset_hook)(void); | ||
17 | |||
18 | static void | 16 | static void |
19 | arch_reset(char mode, const char *cmd) | 17 | arch_reset(char mode, const char *cmd) |
20 | { | 18 | { |
@@ -22,9 +20,6 @@ arch_reset(char mode, const char *cmd) | |||
22 | soft_restart(0); | 20 | soft_restart(0); |
23 | } | 21 | } |
24 | 22 | ||
25 | if (s3c24xx_reset_hook) | ||
26 | s3c24xx_reset_hook(); | ||
27 | |||
28 | arch_wdt_reset(); | 23 | arch_wdt_reset(); |
29 | 24 | ||
30 | /* we'll take a jump through zero as a poor second */ | 25 | /* we'll take a jump through zero as a poor second */ |
diff --git a/arch/arm/mach-s3c2410/include/mach/system.h b/arch/arm/mach-s3c2410/include/mach/system.h index a8cbca6701e5..eef8f24628e3 100644 --- a/arch/arm/mach-s3c2410/include/mach/system.h +++ b/arch/arm/mach-s3c2410/include/mach/system.h | |||
@@ -15,12 +15,10 @@ | |||
15 | 15 | ||
16 | #include <mach/map.h> | 16 | #include <mach/map.h> |
17 | #include <mach/idle.h> | 17 | #include <mach/idle.h> |
18 | #include <mach/reset.h> | ||
19 | 18 | ||
20 | #include <mach/regs-clock.h> | 19 | #include <mach/regs-clock.h> |
21 | 20 | ||
22 | void (*s3c24xx_idle)(void); | 21 | void (*s3c24xx_idle)(void); |
23 | void (*s3c24xx_reset_hook)(void); | ||
24 | 22 | ||
25 | void s3c24xx_default_idle(void) | 23 | void s3c24xx_default_idle(void) |
26 | { | 24 | { |
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 286ef1738c61..ae73ba34ecc6 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/mtd/nand_ecc.h> | 48 | #include <linux/mtd/nand_ecc.h> |
49 | #include <linux/mtd/partitions.h> | 49 | #include <linux/mtd/partitions.h> |
50 | 50 | ||
51 | #include <plat/s3c2412.h> | ||
51 | #include <plat/gpio-cfg.h> | 52 | #include <plat/gpio-cfg.h> |
52 | #include <plat/clock.h> | 53 | #include <plat/clock.h> |
53 | #include <plat/devs.h> | 54 | #include <plat/devs.h> |
@@ -661,4 +662,5 @@ MACHINE_START(JIVE, "JIVE") | |||
661 | .map_io = jive_map_io, | 662 | .map_io = jive_map_io, |
662 | .init_machine = jive_machine_init, | 663 | .init_machine = jive_machine_init, |
663 | .timer = &s3c24xx_timer, | 664 | .timer = &s3c24xx_timer, |
665 | .restart = s3c2412_restart, | ||
664 | MACHINE_END | 666 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c index f1eec1b54932..b11451b853d8 100644 --- a/arch/arm/mach-s3c2412/mach-smdk2413.c +++ b/arch/arm/mach-s3c2412/mach-smdk2413.c | |||
@@ -134,6 +134,7 @@ MACHINE_START(S3C2413, "S3C2413") | |||
134 | .map_io = smdk2413_map_io, | 134 | .map_io = smdk2413_map_io, |
135 | .init_machine = smdk2413_machine_init, | 135 | .init_machine = smdk2413_machine_init, |
136 | .timer = &s3c24xx_timer, | 136 | .timer = &s3c24xx_timer, |
137 | .restart = s3c2412_restart, | ||
137 | MACHINE_END | 138 | MACHINE_END |
138 | 139 | ||
139 | MACHINE_START(SMDK2412, "SMDK2412") | 140 | MACHINE_START(SMDK2412, "SMDK2412") |
@@ -145,6 +146,7 @@ MACHINE_START(SMDK2412, "SMDK2412") | |||
145 | .map_io = smdk2413_map_io, | 146 | .map_io = smdk2413_map_io, |
146 | .init_machine = smdk2413_machine_init, | 147 | .init_machine = smdk2413_machine_init, |
147 | .timer = &s3c24xx_timer, | 148 | .timer = &s3c24xx_timer, |
149 | .restart = s3c2412_restart, | ||
148 | MACHINE_END | 150 | MACHINE_END |
149 | 151 | ||
150 | MACHINE_START(SMDK2413, "SMDK2413") | 152 | MACHINE_START(SMDK2413, "SMDK2413") |
@@ -156,4 +158,5 @@ MACHINE_START(SMDK2413, "SMDK2413") | |||
156 | .map_io = smdk2413_map_io, | 158 | .map_io = smdk2413_map_io, |
157 | .init_machine = smdk2413_machine_init, | 159 | .init_machine = smdk2413_machine_init, |
158 | .timer = &s3c24xx_timer, | 160 | .timer = &s3c24xx_timer, |
161 | .restart = s3c2412_restart, | ||
159 | MACHINE_END | 162 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2412/mach-vstms.c b/arch/arm/mach-s3c2412/mach-vstms.c index 1bbb1ef5f4ff..94bfaa1fb148 100644 --- a/arch/arm/mach-s3c2412/mach-vstms.c +++ b/arch/arm/mach-s3c2412/mach-vstms.c | |||
@@ -162,4 +162,5 @@ MACHINE_START(VSTMS, "VSTMS") | |||
162 | .init_machine = vstms_init, | 162 | .init_machine = vstms_init, |
163 | .map_io = vstms_map_io, | 163 | .map_io = vstms_map_io, |
164 | .timer = &s3c24xx_timer, | 164 | .timer = &s3c24xx_timer, |
165 | .restart = s3c2412_restart, | ||
165 | MACHINE_END | 166 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c index 57a1e01e4e50..867ce2e269f6 100644 --- a/arch/arm/mach-s3c2412/s3c2412.c +++ b/arch/arm/mach-s3c2412/s3c2412.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/proc-fns.h> | 32 | #include <asm/proc-fns.h> |
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | 34 | ||
35 | #include <mach/reset.h> | ||
36 | #include <mach/idle.h> | 35 | #include <mach/idle.h> |
37 | 36 | ||
38 | #include <plat/cpu-freq.h> | 37 | #include <plat/cpu-freq.h> |
@@ -131,8 +130,11 @@ static void s3c2412_idle(void) | |||
131 | cpu_do_idle(); | 130 | cpu_do_idle(); |
132 | } | 131 | } |
133 | 132 | ||
134 | static void s3c2412_hard_reset(void) | 133 | void s3c2412_restart(char mode, const char *cmd) |
135 | { | 134 | { |
135 | if (mode == 's') | ||
136 | soft_restart(0); | ||
137 | |||
136 | /* errata "Watch-dog/Software Reset Problem" specifies that | 138 | /* errata "Watch-dog/Software Reset Problem" specifies that |
137 | * this reset must be done with the SYSCLK sourced from | 139 | * this reset must be done with the SYSCLK sourced from |
138 | * EXTCLK instead of FOUT to avoid a glitch in the reset | 140 | * EXTCLK instead of FOUT to avoid a glitch in the reset |
@@ -164,10 +166,6 @@ void __init s3c2412_map_io(void) | |||
164 | 166 | ||
165 | s3c24xx_idle = s3c2412_idle; | 167 | s3c24xx_idle = s3c2412_idle; |
166 | 168 | ||
167 | /* set custom reset hook */ | ||
168 | |||
169 | s3c24xx_reset_hook = s3c2412_hard_reset; | ||
170 | |||
171 | /* register our io-tables */ | 169 | /* register our io-tables */ |
172 | 170 | ||
173 | iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); | 171 | iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); |
diff --git a/arch/arm/mach-s3c2416/mach-smdk2416.c b/arch/arm/mach-s3c2416/mach-smdk2416.c index a9eee531ca76..66b71736609c 100644 --- a/arch/arm/mach-s3c2416/mach-smdk2416.c +++ b/arch/arm/mach-s3c2416/mach-smdk2416.c | |||
@@ -251,4 +251,5 @@ MACHINE_START(SMDK2416, "SMDK2416") | |||
251 | .map_io = smdk2416_map_io, | 251 | .map_io = smdk2416_map_io, |
252 | .init_machine = smdk2416_machine_init, | 252 | .init_machine = smdk2416_machine_init, |
253 | .timer = &s3c24xx_timer, | 253 | .timer = &s3c24xx_timer, |
254 | .restart = s3c2416_restart, | ||
254 | MACHINE_END | 255 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c index ee214bc83c83..46062232bbc7 100644 --- a/arch/arm/mach-s3c2416/s3c2416.c +++ b/arch/arm/mach-s3c2416/s3c2416.c | |||
@@ -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 | ||
@@ -76,8 +75,11 @@ static struct sys_device s3c2416_sysdev = { | |||
76 | .cls = &s3c2416_sysclass, | 75 | .cls = &s3c2416_sysclass, |
77 | }; | 76 | }; |
78 | 77 | ||
79 | static void s3c2416_hard_reset(void) | 78 | void s3c2416_restart(char mode, const char *cmd) |
80 | { | 79 | { |
80 | if (mode == 's') | ||
81 | soft_restart(0); | ||
82 | |||
81 | __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); | 83 | __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); |
82 | } | 84 | } |
83 | 85 | ||
@@ -85,7 +87,6 @@ int __init s3c2416_init(void) | |||
85 | { | 87 | { |
86 | printk(KERN_INFO "S3C2416: Initializing architecture\n"); | 88 | printk(KERN_INFO "S3C2416: Initializing architecture\n"); |
87 | 89 | ||
88 | s3c24xx_reset_hook = s3c2416_hard_reset; | ||
89 | /* s3c24xx_idle = s3c2416_idle; */ | 90 | /* s3c24xx_idle = s3c2416_idle; */ |
90 | 91 | ||
91 | /* change WDT IRQ number */ | 92 | /* change WDT IRQ number */ |
diff --git a/arch/arm/mach-s3c2443/mach-smdk2443.c b/arch/arm/mach-s3c2443/mach-smdk2443.c index bec107e00441..209236956222 100644 --- a/arch/arm/mach-s3c2443/mach-smdk2443.c +++ b/arch/arm/mach-s3c2443/mach-smdk2443.c | |||
@@ -145,4 +145,5 @@ MACHINE_START(SMDK2443, "SMDK2443") | |||
145 | .map_io = smdk2443_map_io, | 145 | .map_io = smdk2443_map_io, |
146 | .init_machine = smdk2443_machine_init, | 146 | .init_machine = smdk2443_machine_init, |
147 | .timer = &s3c24xx_timer, | 147 | .timer = &s3c24xx_timer, |
148 | .restart = s3c2443_restart, | ||
148 | MACHINE_END | 149 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c index a22b771b0f36..4568ded338d0 100644 --- a/arch/arm/mach-s3c2443/s3c2443.c +++ b/arch/arm/mach-s3c2443/s3c2443.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
32 | 32 | ||
33 | #include <mach/regs-s3c2443-clock.h> | 33 | #include <mach/regs-s3c2443-clock.h> |
34 | #include <mach/reset.h> | ||
35 | 34 | ||
36 | #include <plat/gpio-core.h> | 35 | #include <plat/gpio-core.h> |
37 | #include <plat/gpio-cfg.h> | 36 | #include <plat/gpio-cfg.h> |
@@ -57,8 +56,11 @@ static struct sys_device s3c2443_sysdev = { | |||
57 | .cls = &s3c2443_sysclass, | 56 | .cls = &s3c2443_sysclass, |
58 | }; | 57 | }; |
59 | 58 | ||
60 | static void s3c2443_hard_reset(void) | 59 | void s3c2443_restart(char mode, const char *cmd) |
61 | { | 60 | { |
61 | if (mode == 's') | ||
62 | soft_restart(0); | ||
63 | |||
62 | __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); | 64 | __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); |
63 | } | 65 | } |
64 | 66 | ||
@@ -66,8 +68,6 @@ int __init s3c2443_init(void) | |||
66 | { | 68 | { |
67 | printk("S3C2443: Initialising architecture\n"); | 69 | printk("S3C2443: Initialising architecture\n"); |
68 | 70 | ||
69 | s3c24xx_reset_hook = s3c2443_hard_reset; | ||
70 | |||
71 | s3c_nand_setname("s3c2412-nand"); | 71 | s3c_nand_setname("s3c2412-nand"); |
72 | s3c_fb_setname("s3c2443-fb"); | 72 | s3c_fb_setname("s3c2443-fb"); |
73 | 73 | ||
diff --git a/arch/arm/plat-samsung/include/plat/s3c2412.h b/arch/arm/plat-samsung/include/plat/s3c2412.h index 5bcfd143ba16..cbae50ddacc8 100644 --- a/arch/arm/plat-samsung/include/plat/s3c2412.h +++ b/arch/arm/plat-samsung/include/plat/s3c2412.h | |||
@@ -21,9 +21,12 @@ extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); | |||
21 | extern void s3c2412_init_clocks(int xtal); | 21 | extern void s3c2412_init_clocks(int xtal); |
22 | 22 | ||
23 | extern int s3c2412_baseclk_add(void); | 23 | extern int s3c2412_baseclk_add(void); |
24 | |||
25 | extern void s3c2412_restart(char mode, const char *cmd); | ||
24 | #else | 26 | #else |
25 | #define s3c2412_init_clocks NULL | 27 | #define s3c2412_init_clocks NULL |
26 | #define s3c2412_init_uarts NULL | 28 | #define s3c2412_init_uarts NULL |
27 | #define s3c2412_map_io NULL | 29 | #define s3c2412_map_io NULL |
28 | #define s3c2412_init NULL | 30 | #define s3c2412_init NULL |
31 | #define s3c2412_restart NULL | ||
29 | #endif | 32 | #endif |
diff --git a/arch/arm/plat-samsung/include/plat/s3c2416.h b/arch/arm/plat-samsung/include/plat/s3c2416.h index a764f8503f52..de2b5bdc5ebd 100644 --- a/arch/arm/plat-samsung/include/plat/s3c2416.h +++ b/arch/arm/plat-samsung/include/plat/s3c2416.h | |||
@@ -23,9 +23,11 @@ extern void s3c2416_init_clocks(int xtal); | |||
23 | 23 | ||
24 | extern int s3c2416_baseclk_add(void); | 24 | extern int s3c2416_baseclk_add(void); |
25 | 25 | ||
26 | extern void s3c2416_restart(char mode, const char *cmd); | ||
26 | #else | 27 | #else |
27 | #define s3c2416_init_clocks NULL | 28 | #define s3c2416_init_clocks NULL |
28 | #define s3c2416_init_uarts NULL | 29 | #define s3c2416_init_uarts NULL |
29 | #define s3c2416_map_io NULL | 30 | #define s3c2416_map_io NULL |
30 | #define s3c2416_init NULL | 31 | #define s3c2416_init NULL |
32 | #define s3c2416_restart NULL | ||
31 | #endif | 33 | #endif |
diff --git a/arch/arm/plat-samsung/include/plat/s3c2443.h b/arch/arm/plat-samsung/include/plat/s3c2443.h index 7fae1a050694..dce05b43d51c 100644 --- a/arch/arm/plat-samsung/include/plat/s3c2443.h +++ b/arch/arm/plat-samsung/include/plat/s3c2443.h | |||
@@ -24,11 +24,13 @@ extern void s3c2443_init_clocks(int xtal); | |||
24 | 24 | ||
25 | extern int s3c2443_baseclk_add(void); | 25 | extern int s3c2443_baseclk_add(void); |
26 | 26 | ||
27 | extern void s3c2443_restart(char mode, const char *cmd); | ||
27 | #else | 28 | #else |
28 | #define s3c2443_init_clocks NULL | 29 | #define s3c2443_init_clocks NULL |
29 | #define s3c2443_init_uarts NULL | 30 | #define s3c2443_init_uarts NULL |
30 | #define s3c2443_map_io NULL | 31 | #define s3c2443_map_io NULL |
31 | #define s3c2443_init NULL | 32 | #define s3c2443_init NULL |
33 | #define s3c2443_restart NULL | ||
32 | #endif | 34 | #endif |
33 | 35 | ||
34 | /* common code used by s3c2443 and others. | 36 | /* common code used by s3c2443 and others. |