diff options
author | Heiko Stuebner <heiko@sntech.de> | 2012-02-29 23:23:32 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-02-29 23:23:32 -0500 |
commit | c1ba544f81544ed9613ad5d058968533dbcef4b2 (patch) | |
tree | 4c2990910818ad4b1dc112b2eb05cf859cacbfd5 | |
parent | c65d8ef2e7158ba521e9cb1ce10ff468b8ddcb6a (diff) |
ARM: S3C24XX: Fix restart on S3C2442
Commit b27b072791dc (ARM: 7265/1: restart: S3C24XX: use new restart hook)
introduced the new restart hook also for the S3C244x cpus, but it
was only defined in the S3C2440 scope, i.e. when CPU_S3C2440 was
selected. Devices using the S3C2442 like the GTA02 normally don't select
this CPU which leads to compilation errors like:
LD .tmp_vmlinux1
arch/arm/mach-s3c2440/built-in.o:(.arch.info.init+0x3c): undefined reference
to `s3c2440_restart'
make: *** [.tmp_vmlinux1] Error 1
Therefore move the s3c2440_restart function to s3c244x.c which is
common to both cpus and also fix the naming to reflect this.
Reported-and-tested-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | arch/arm/mach-s3c2440/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-anubis.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-at2440evb.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-gta02.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-mini2440.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-nexcoder.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-osiris.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-rx1950.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-rx3715.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-smdk2440.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/s3c2440.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/s3c244x.c | 11 |
12 files changed, 21 insertions, 23 deletions
diff --git a/arch/arm/mach-s3c2440/common.h b/arch/arm/mach-s3c2440/common.h index db8a98ac68c5..0c1eb1dfc534 100644 --- a/arch/arm/mach-s3c2440/common.h +++ b/arch/arm/mach-s3c2440/common.h | |||
@@ -12,6 +12,6 @@ | |||
12 | #ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H |
13 | #define __ARCH_ARM_MACH_S3C2440_COMMON_H | 13 | #define __ARCH_ARM_MACH_S3C2440_COMMON_H |
14 | 14 | ||
15 | void s3c2440_restart(char mode, const char *cmd); | 15 | void s3c244x_restart(char mode, const char *cmd); |
16 | 16 | ||
17 | #endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */ | 17 | #endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */ |
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index 24569550de1a..19b577bc09b8 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c | |||
@@ -487,5 +487,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis") | |||
487 | .init_machine = anubis_init, | 487 | .init_machine = anubis_init, |
488 | .init_irq = s3c24xx_init_irq, | 488 | .init_irq = s3c24xx_init_irq, |
489 | .timer = &s3c24xx_timer, | 489 | .timer = &s3c24xx_timer, |
490 | .restart = s3c2440_restart, | 490 | .restart = s3c244x_restart, |
491 | MACHINE_END | 491 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-at2440evb.c b/arch/arm/mach-s3c2440/mach-at2440evb.c index d6a9763110cd..d7ae49c90118 100644 --- a/arch/arm/mach-s3c2440/mach-at2440evb.c +++ b/arch/arm/mach-s3c2440/mach-at2440evb.c | |||
@@ -222,5 +222,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB") | |||
222 | .init_machine = at2440evb_init, | 222 | .init_machine = at2440evb_init, |
223 | .init_irq = s3c24xx_init_irq, | 223 | .init_irq = s3c24xx_init_irq, |
224 | .timer = &s3c24xx_timer, | 224 | .timer = &s3c24xx_timer, |
225 | .restart = s3c2440_restart, | 225 | .restart = s3c244x_restart, |
226 | MACHINE_END | 226 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 5859e609d28c..9a4a5bc008e6 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c | |||
@@ -601,5 +601,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02") | |||
601 | .init_irq = s3c24xx_init_irq, | 601 | .init_irq = s3c24xx_init_irq, |
602 | .init_machine = gta02_machine_init, | 602 | .init_machine = gta02_machine_init, |
603 | .timer = &s3c24xx_timer, | 603 | .timer = &s3c24xx_timer, |
604 | .restart = s3c2440_restart, | 604 | .restart = s3c244x_restart, |
605 | MACHINE_END | 605 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c index adbbb85bc4cd..5d66fb218a41 100644 --- a/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/arch/arm/mach-s3c2440/mach-mini2440.c | |||
@@ -701,5 +701,5 @@ MACHINE_START(MINI2440, "MINI2440") | |||
701 | .init_machine = mini2440_init, | 701 | .init_machine = mini2440_init, |
702 | .init_irq = s3c24xx_init_irq, | 702 | .init_irq = s3c24xx_init_irq, |
703 | .timer = &s3c24xx_timer, | 703 | .timer = &s3c24xx_timer, |
704 | .restart = s3c2440_restart, | 704 | .restart = s3c244x_restart, |
705 | MACHINE_END | 705 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-nexcoder.c b/arch/arm/mach-s3c2440/mach-nexcoder.c index 40eaf844bc1f..5198e3e1c5be 100644 --- a/arch/arm/mach-s3c2440/mach-nexcoder.c +++ b/arch/arm/mach-s3c2440/mach-nexcoder.c | |||
@@ -158,5 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") | |||
158 | .init_machine = nexcoder_init, | 158 | .init_machine = nexcoder_init, |
159 | .init_irq = s3c24xx_init_irq, | 159 | .init_irq = s3c24xx_init_irq, |
160 | .timer = &s3c24xx_timer, | 160 | .timer = &s3c24xx_timer, |
161 | .restart = s3c2440_restart, | 161 | .restart = s3c244x_restart, |
162 | MACHINE_END | 162 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 4c480ef734f6..c5daeb612a88 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
@@ -436,5 +436,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") | |||
436 | .init_irq = s3c24xx_init_irq, | 436 | .init_irq = s3c24xx_init_irq, |
437 | .init_machine = osiris_init, | 437 | .init_machine = osiris_init, |
438 | .timer = &s3c24xx_timer, | 438 | .timer = &s3c24xx_timer, |
439 | .restart = s3c2440_restart, | 439 | .restart = s3c244x_restart, |
440 | MACHINE_END | 440 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c index 80077f6472ee..6f68abf44fab 100644 --- a/arch/arm/mach-s3c2440/mach-rx1950.c +++ b/arch/arm/mach-s3c2440/mach-rx1950.c | |||
@@ -822,5 +822,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950") | |||
822 | .init_irq = s3c24xx_init_irq, | 822 | .init_irq = s3c24xx_init_irq, |
823 | .init_machine = rx1950_init_machine, | 823 | .init_machine = rx1950_init_machine, |
824 | .timer = &s3c24xx_timer, | 824 | .timer = &s3c24xx_timer, |
825 | .restart = s3c2440_restart, | 825 | .restart = s3c244x_restart, |
826 | MACHINE_END | 826 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c index 20103bafbd4b..56af35447598 100644 --- a/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/arch/arm/mach-s3c2440/mach-rx3715.c | |||
@@ -213,5 +213,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715") | |||
213 | .init_irq = rx3715_init_irq, | 213 | .init_irq = rx3715_init_irq, |
214 | .init_machine = rx3715_init_machine, | 214 | .init_machine = rx3715_init_machine, |
215 | .timer = &s3c24xx_timer, | 215 | .timer = &s3c24xx_timer, |
216 | .restart = s3c2440_restart, | 216 | .restart = s3c244x_restart, |
217 | MACHINE_END | 217 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c index 1deb60d12a60..83a1036d7dcb 100644 --- a/arch/arm/mach-s3c2440/mach-smdk2440.c +++ b/arch/arm/mach-s3c2440/mach-smdk2440.c | |||
@@ -183,5 +183,5 @@ MACHINE_START(S3C2440, "SMDK2440") | |||
183 | .map_io = smdk2440_map_io, | 183 | .map_io = smdk2440_map_io, |
184 | .init_machine = smdk2440_machine_init, | 184 | .init_machine = smdk2440_machine_init, |
185 | .timer = &s3c24xx_timer, | 185 | .timer = &s3c24xx_timer, |
186 | .restart = s3c2440_restart, | 186 | .restart = s3c244x_restart, |
187 | MACHINE_END | 187 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c index 517623a09fc5..2b3dddb49af7 100644 --- a/arch/arm/mach-s3c2440/s3c2440.c +++ b/arch/arm/mach-s3c2440/s3c2440.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <plat/cpu.h> | 35 | #include <plat/cpu.h> |
36 | #include <plat/s3c244x.h> | 36 | #include <plat/s3c244x.h> |
37 | #include <plat/pm.h> | 37 | #include <plat/pm.h> |
38 | #include <plat/watchdog-reset.h> | ||
39 | 38 | ||
40 | #include <plat/gpio-core.h> | 39 | #include <plat/gpio-core.h> |
41 | #include <plat/gpio-cfg.h> | 40 | #include <plat/gpio-cfg.h> |
@@ -74,15 +73,3 @@ void __init s3c2440_map_io(void) | |||
74 | s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; | 73 | s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; |
75 | s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; | 74 | s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; |
76 | } | 75 | } |
77 | |||
78 | void s3c2440_restart(char mode, const char *cmd) | ||
79 | { | ||
80 | if (mode == 's') { | ||
81 | soft_restart(0); | ||
82 | } | ||
83 | |||
84 | arch_wdt_reset(); | ||
85 | |||
86 | /* we'll take a jump through zero as a poor second */ | ||
87 | soft_restart(0); | ||
88 | } | ||
diff --git a/arch/arm/mach-s3c2440/s3c244x.c b/arch/arm/mach-s3c2440/s3c244x.c index 36bc60f61d0a..744930a870eb 100644 --- a/arch/arm/mach-s3c2440/s3c244x.c +++ b/arch/arm/mach-s3c2440/s3c244x.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <plat/pm.h> | 46 | #include <plat/pm.h> |
47 | #include <plat/pll.h> | 47 | #include <plat/pll.h> |
48 | #include <plat/nand-core.h> | 48 | #include <plat/nand-core.h> |
49 | #include <plat/watchdog-reset.h> | ||
49 | 50 | ||
50 | static struct map_desc s3c244x_iodesc[] __initdata = { | 51 | static struct map_desc s3c244x_iodesc[] __initdata = { |
51 | IODESC_ENT(CLKPWR), | 52 | IODESC_ENT(CLKPWR), |
@@ -196,3 +197,13 @@ struct syscore_ops s3c244x_pm_syscore_ops = { | |||
196 | .suspend = s3c244x_suspend, | 197 | .suspend = s3c244x_suspend, |
197 | .resume = s3c244x_resume, | 198 | .resume = s3c244x_resume, |
198 | }; | 199 | }; |
200 | |||
201 | void s3c244x_restart(char mode, const char *cmd) | ||
202 | { | ||
203 | if (mode == 's') | ||
204 | soft_restart(0); | ||
205 | |||
206 | arch_wdt_reset(); | ||
207 | |||
208 | /* we'll take a jump through zero as a poor second */ | ||
209 | soft_restart(0); | ||