diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2012-01-03 08:02:03 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-05 07:57:18 -0500 |
commit | b27b072791dc83324f180007b03ac0b5a8455a2d (patch) | |
tree | 82a5a03cc0a76399f5a3d86be8db67de998ac6be /arch/arm | |
parent | 57538975917d4b0c467dbdd21328337f059bc027 (diff) |
ARM: 7265/1: restart: S3C24XX: use new restart hook
Hook these platforms restart code into the new restart hook rather
than using arch_reset().
And adds local header file, common.h in arch/arm/mach-s3c2410/ and
arch/arm/mach-s3c2440/ directories.
Cc: Ben Dooks <ben-linux@fluff.org>
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')
23 files changed, 113 insertions, 17 deletions
diff --git a/arch/arm/mach-s3c2410/common.h b/arch/arm/mach-s3c2410/common.h new file mode 100644 index 000000000000..f65dc8062961 --- /dev/null +++ b/arch/arm/mach-s3c2410/common.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * Common Header for S3C2410 machines | ||
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 | |||
12 | #ifndef __ARCH_ARM_MACH_S3C2410_COMMON_H | ||
13 | #define __ARCH_ARM_MACH_S3C2410_COMMON_H | ||
14 | |||
15 | void s3c2410_restart(char mode, const char *cmd); | ||
16 | |||
17 | #endif /* __ARCH_ARM_MACH_S3C2410_COMMON_H */ | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h index 1e495f35ddd2..e71dc5fdd3e3 100644 --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h | |||
@@ -10,18 +10,6 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <mach/hardware.h> | 13 | static void arch_reset(char mode, const char *cmd) |
14 | #include <plat/watchdog-reset.h> | ||
15 | |||
16 | static void | ||
17 | arch_reset(char mode, const char *cmd) | ||
18 | { | 14 | { |
19 | if (mode == 's') { | ||
20 | soft_restart(0); | ||
21 | } | ||
22 | |||
23 | arch_wdt_reset(); | ||
24 | |||
25 | /* we'll take a jump through zero as a poor second */ | ||
26 | soft_restart(0); | ||
27 | } | 15 | } |
diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c index 79838942b0ac..4220cc60de3c 100644 --- a/arch/arm/mach-s3c2410/mach-amlm5900.c +++ b/arch/arm/mach-s3c2410/mach-amlm5900.c | |||
@@ -63,6 +63,8 @@ | |||
63 | #include <linux/mtd/map.h> | 63 | #include <linux/mtd/map.h> |
64 | #include <linux/mtd/physmap.h> | 64 | #include <linux/mtd/physmap.h> |
65 | 65 | ||
66 | #include "common.h" | ||
67 | |||
66 | static struct resource amlm5900_nor_resource = { | 68 | static struct resource amlm5900_nor_resource = { |
67 | .start = 0x00000000, | 69 | .start = 0x00000000, |
68 | .end = 0x01000000 - 1, | 70 | .end = 0x01000000 - 1, |
@@ -241,4 +243,5 @@ MACHINE_START(AML_M5900, "AML_M5900") | |||
241 | .init_irq = s3c24xx_init_irq, | 243 | .init_irq = s3c24xx_init_irq, |
242 | .init_machine = amlm5900_init, | 244 | .init_machine = amlm5900_init, |
243 | .timer = &s3c24xx_timer, | 245 | .timer = &s3c24xx_timer, |
246 | .restart = s3c2410_restart, | ||
244 | MACHINE_END | 247 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index a20ae1ad4062..c6133c6ec18f 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -66,6 +66,7 @@ | |||
66 | 66 | ||
67 | #include "usb-simtec.h" | 67 | #include "usb-simtec.h" |
68 | #include "nor-simtec.h" | 68 | #include "nor-simtec.h" |
69 | #include "common.h" | ||
69 | 70 | ||
70 | #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics" | 71 | #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics" |
71 | 72 | ||
@@ -662,4 +663,5 @@ MACHINE_START(BAST, "Simtec-BAST") | |||
662 | .init_irq = s3c24xx_init_irq, | 663 | .init_irq = s3c24xx_init_irq, |
663 | .init_machine = bast_init, | 664 | .init_machine = bast_init, |
664 | .timer = &s3c24xx_timer, | 665 | .timer = &s3c24xx_timer, |
666 | .restart = s3c2410_restart, | ||
665 | MACHINE_END | 667 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 05a7d16e59f5..ad9d865651d7 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -70,6 +70,8 @@ | |||
70 | 70 | ||
71 | #include <sound/uda1380.h> | 71 | #include <sound/uda1380.h> |
72 | 72 | ||
73 | #include "common.h" | ||
74 | |||
73 | #define H1940_LATCH ((void __force __iomem *)0xF8000000) | 75 | #define H1940_LATCH ((void __force __iomem *)0xF8000000) |
74 | 76 | ||
75 | #define H1940_PA_LATCH S3C2410_CS2 | 77 | #define H1940_PA_LATCH S3C2410_CS2 |
@@ -751,4 +753,5 @@ MACHINE_START(H1940, "IPAQ-H1940") | |||
751 | .init_irq = h1940_init_irq, | 753 | .init_irq = h1940_init_irq, |
752 | .init_machine = h1940_init, | 754 | .init_machine = h1940_init, |
753 | .timer = &s3c24xx_timer, | 755 | .timer = &s3c24xx_timer, |
756 | .restart = s3c2410_restart, | ||
754 | MACHINE_END | 757 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 1dc3e3234417..383d00ca8f60 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
@@ -51,6 +51,8 @@ | |||
51 | #include <plat/s3c2410.h> | 51 | #include <plat/s3c2410.h> |
52 | #include <plat/udc.h> | 52 | #include <plat/udc.h> |
53 | 53 | ||
54 | #include "common.h" | ||
55 | |||
54 | static struct map_desc n30_iodesc[] __initdata = { | 56 | static struct map_desc n30_iodesc[] __initdata = { |
55 | /* nothing here yet */ | 57 | /* nothing here yet */ |
56 | }; | 58 | }; |
@@ -591,6 +593,7 @@ MACHINE_START(N30, "Acer-N30") | |||
591 | .init_machine = n30_init, | 593 | .init_machine = n30_init, |
592 | .init_irq = s3c24xx_init_irq, | 594 | .init_irq = s3c24xx_init_irq, |
593 | .map_io = n30_map_io, | 595 | .map_io = n30_map_io, |
596 | .restart = s3c2410_restart, | ||
594 | MACHINE_END | 597 | MACHINE_END |
595 | 598 | ||
596 | MACHINE_START(N35, "Acer-N35") | 599 | MACHINE_START(N35, "Acer-N35") |
@@ -601,4 +604,5 @@ MACHINE_START(N35, "Acer-N35") | |||
601 | .init_machine = n30_init, | 604 | .init_machine = n30_init, |
602 | .init_irq = s3c24xx_init_irq, | 605 | .init_irq = s3c24xx_init_irq, |
603 | .map_io = n30_map_io, | 606 | .map_io = n30_map_io, |
607 | .restart = s3c2410_restart, | ||
604 | MACHINE_END | 608 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c index f03f3fd9cec9..5f1e0eeb38a9 100644 --- a/arch/arm/mach-s3c2410/mach-otom.c +++ b/arch/arm/mach-s3c2410/mach-otom.c | |||
@@ -38,6 +38,8 @@ | |||
38 | #include <plat/iic.h> | 38 | #include <plat/iic.h> |
39 | #include <plat/cpu.h> | 39 | #include <plat/cpu.h> |
40 | 40 | ||
41 | #include "common.h" | ||
42 | |||
41 | static struct map_desc otom11_iodesc[] __initdata = { | 43 | static struct map_desc otom11_iodesc[] __initdata = { |
42 | /* Device area */ | 44 | /* Device area */ |
43 | { (u32)OTOM_VA_CS8900A_BASE, OTOM_PA_CS8900A_BASE, SZ_16M, MT_DEVICE }, | 45 | { (u32)OTOM_VA_CS8900A_BASE, OTOM_PA_CS8900A_BASE, SZ_16M, MT_DEVICE }, |
@@ -121,4 +123,5 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1") | |||
121 | .init_machine = otom11_init, | 123 | .init_machine = otom11_init, |
122 | .init_irq = s3c24xx_init_irq, | 124 | .init_irq = s3c24xx_init_irq, |
123 | .timer = &s3c24xx_timer, | 125 | .timer = &s3c24xx_timer, |
126 | .restart = s3c2410_restart, | ||
124 | MACHINE_END | 127 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c index 451852156254..58f2c17b9f0d 100644 --- a/arch/arm/mach-s3c2410/mach-qt2410.c +++ b/arch/arm/mach-s3c2410/mach-qt2410.c | |||
@@ -62,6 +62,8 @@ | |||
62 | #include <plat/cpu.h> | 62 | #include <plat/cpu.h> |
63 | #include <plat/pm.h> | 63 | #include <plat/pm.h> |
64 | 64 | ||
65 | #include "common.h" | ||
66 | |||
65 | static struct map_desc qt2410_iodesc[] __initdata = { | 67 | static struct map_desc qt2410_iodesc[] __initdata = { |
66 | { 0xe0000000, __phys_to_pfn(S3C2410_CS3+0x01000000), SZ_1M, MT_DEVICE } | 68 | { 0xe0000000, __phys_to_pfn(S3C2410_CS3+0x01000000), SZ_1M, MT_DEVICE } |
67 | }; | 69 | }; |
@@ -350,6 +352,5 @@ MACHINE_START(QT2410, "QT2410") | |||
350 | .init_irq = s3c24xx_init_irq, | 352 | .init_irq = s3c24xx_init_irq, |
351 | .init_machine = qt2410_machine_init, | 353 | .init_machine = qt2410_machine_init, |
352 | .timer = &s3c24xx_timer, | 354 | .timer = &s3c24xx_timer, |
355 | .restart = s3c2410_restart, | ||
353 | MACHINE_END | 356 | MACHINE_END |
354 | |||
355 | |||
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c index 99c9dfdb71c7..bdc27e772876 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2410.c +++ b/arch/arm/mach-s3c2410/mach-smdk2410.c | |||
@@ -54,6 +54,8 @@ | |||
54 | 54 | ||
55 | #include <plat/common-smdk.h> | 55 | #include <plat/common-smdk.h> |
56 | 56 | ||
57 | #include "common.h" | ||
58 | |||
57 | static struct map_desc smdk2410_iodesc[] __initdata = { | 59 | static struct map_desc smdk2410_iodesc[] __initdata = { |
58 | /* nothing here yet */ | 60 | /* nothing here yet */ |
59 | }; | 61 | }; |
@@ -116,6 +118,5 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc | |||
116 | .init_irq = s3c24xx_init_irq, | 118 | .init_irq = s3c24xx_init_irq, |
117 | .init_machine = smdk2410_init, | 119 | .init_machine = smdk2410_init, |
118 | .timer = &s3c24xx_timer, | 120 | .timer = &s3c24xx_timer, |
121 | .restart = s3c2410_restart, | ||
119 | MACHINE_END | 122 | MACHINE_END |
120 | |||
121 | |||
diff --git a/arch/arm/mach-s3c2410/mach-tct_hammer.c b/arch/arm/mach-s3c2410/mach-tct_hammer.c index e0d0b6fb2800..1114666f0efb 100644 --- a/arch/arm/mach-s3c2410/mach-tct_hammer.c +++ b/arch/arm/mach-s3c2410/mach-tct_hammer.c | |||
@@ -54,6 +54,8 @@ | |||
54 | #include <linux/mtd/map.h> | 54 | #include <linux/mtd/map.h> |
55 | #include <linux/mtd/physmap.h> | 55 | #include <linux/mtd/physmap.h> |
56 | 56 | ||
57 | #include "common.h" | ||
58 | |||
57 | static struct resource tct_hammer_nor_resource = { | 59 | static struct resource tct_hammer_nor_resource = { |
58 | .start = 0x00000000, | 60 | .start = 0x00000000, |
59 | .end = 0x01000000 - 1, | 61 | .end = 0x01000000 - 1, |
@@ -151,4 +153,5 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER") | |||
151 | .init_irq = s3c24xx_init_irq, | 153 | .init_irq = s3c24xx_init_irq, |
152 | .init_machine = tct_hammer_init, | 154 | .init_machine = tct_hammer_init, |
153 | .timer = &s3c24xx_timer, | 155 | .timer = &s3c24xx_timer, |
156 | .restart = s3c2410_restart, | ||
154 | MACHINE_END | 157 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index df47e8e90065..cc7032b5c65b 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
@@ -53,6 +53,7 @@ | |||
53 | 53 | ||
54 | #include "usb-simtec.h" | 54 | #include "usb-simtec.h" |
55 | #include "nor-simtec.h" | 55 | #include "nor-simtec.h" |
56 | #include "common.h" | ||
56 | 57 | ||
57 | /* macros for virtual address mods for the io space entries */ | 58 | /* macros for virtual address mods for the io space entries */ |
58 | #define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5) | 59 | #define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5) |
@@ -405,4 +406,5 @@ MACHINE_START(VR1000, "Thorcom-VR1000") | |||
405 | .init_machine = vr1000_init, | 406 | .init_machine = vr1000_init, |
406 | .init_irq = s3c24xx_init_irq, | 407 | .init_irq = s3c24xx_init_irq, |
407 | .timer = &s3c24xx_timer, | 408 | .timer = &s3c24xx_timer, |
409 | .restart = s3c2410_restart, | ||
408 | MACHINE_END | 410 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index 3d7ebc557a72..489c826e92a7 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <plat/clock.h> | 42 | #include <plat/clock.h> |
43 | #include <plat/pll.h> | 43 | #include <plat/pll.h> |
44 | #include <plat/pm.h> | 44 | #include <plat/pm.h> |
45 | #include <plat/watchdog-reset.h> | ||
45 | 46 | ||
46 | #include <plat/gpio-core.h> | 47 | #include <plat/gpio-core.h> |
47 | #include <plat/gpio-cfg.h> | 48 | #include <plat/gpio-cfg.h> |
@@ -183,3 +184,15 @@ int __init s3c2410a_init(void) | |||
183 | s3c2410_sysdev.cls = &s3c2410a_sysclass; | 184 | s3c2410_sysdev.cls = &s3c2410a_sysclass; |
184 | return s3c2410_init(); | 185 | return s3c2410_init(); |
185 | } | 186 | } |
187 | |||
188 | void s3c2410_restart(char mode, const char *cmd) | ||
189 | { | ||
190 | if (mode == 's') { | ||
191 | soft_restart(0); | ||
192 | } | ||
193 | |||
194 | arch_wdt_reset(); | ||
195 | |||
196 | /* we'll take a jump through zero as a poor second */ | ||
197 | soft_restart(0); | ||
198 | } | ||
diff --git a/arch/arm/mach-s3c2440/common.h b/arch/arm/mach-s3c2440/common.h new file mode 100644 index 000000000000..db8a98ac68c5 --- /dev/null +++ b/arch/arm/mach-s3c2440/common.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * Common Header for S3C2440 machines | ||
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 | |||
12 | #ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H | ||
13 | #define __ARCH_ARM_MACH_S3C2440_COMMON_H | ||
14 | |||
15 | void s3c2440_restart(char mode, const char *cmd); | ||
16 | |||
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 74f92fc3fd04..121ff8d2c887 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c | |||
@@ -55,6 +55,8 @@ | |||
55 | #include <plat/cpu.h> | 55 | #include <plat/cpu.h> |
56 | #include <plat/audio-simtec.h> | 56 | #include <plat/audio-simtec.h> |
57 | 57 | ||
58 | #include "common.h" | ||
59 | |||
58 | #define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics" | 60 | #define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics" |
59 | 61 | ||
60 | static struct map_desc anubis_iodesc[] __initdata = { | 62 | static struct map_desc anubis_iodesc[] __initdata = { |
@@ -503,4 +505,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis") | |||
503 | .init_machine = anubis_init, | 505 | .init_machine = anubis_init, |
504 | .init_irq = s3c24xx_init_irq, | 506 | .init_irq = s3c24xx_init_irq, |
505 | .timer = &s3c24xx_timer, | 507 | .timer = &s3c24xx_timer, |
508 | .restart = s3c2440_restart, | ||
506 | MACHINE_END | 509 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-at2440evb.c b/arch/arm/mach-s3c2440/mach-at2440evb.c index 38887ee0c784..b7e334f07da4 100644 --- a/arch/arm/mach-s3c2440/mach-at2440evb.c +++ b/arch/arm/mach-s3c2440/mach-at2440evb.c | |||
@@ -49,6 +49,8 @@ | |||
49 | #include <plat/cpu.h> | 49 | #include <plat/cpu.h> |
50 | #include <plat/mci.h> | 50 | #include <plat/mci.h> |
51 | 51 | ||
52 | #include "common.h" | ||
53 | |||
52 | static struct map_desc at2440evb_iodesc[] __initdata = { | 54 | static struct map_desc at2440evb_iodesc[] __initdata = { |
53 | /* Nothing here */ | 55 | /* Nothing here */ |
54 | }; | 56 | }; |
@@ -238,4 +240,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB") | |||
238 | .init_machine = at2440evb_init, | 240 | .init_machine = at2440evb_init, |
239 | .init_irq = s3c24xx_init_irq, | 241 | .init_irq = s3c24xx_init_irq, |
240 | .timer = &s3c24xx_timer, | 242 | .timer = &s3c24xx_timer, |
243 | .restart = s3c2440_restart, | ||
241 | MACHINE_END | 244 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index de1e0ff46cec..5859e609d28c 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c | |||
@@ -90,6 +90,7 @@ | |||
90 | #include <plat/iic.h> | 90 | #include <plat/iic.h> |
91 | #include <plat/ts.h> | 91 | #include <plat/ts.h> |
92 | 92 | ||
93 | #include "common.h" | ||
93 | 94 | ||
94 | static struct pcf50633 *gta02_pcf; | 95 | static struct pcf50633 *gta02_pcf; |
95 | 96 | ||
@@ -600,4 +601,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02") | |||
600 | .init_irq = s3c24xx_init_irq, | 601 | .init_irq = s3c24xx_init_irq, |
601 | .init_machine = gta02_machine_init, | 602 | .init_machine = gta02_machine_init, |
602 | .timer = &s3c24xx_timer, | 603 | .timer = &s3c24xx_timer, |
604 | .restart = s3c2440_restart, | ||
603 | MACHINE_END | 605 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c index 91fe0b4c95f1..437322ffd88d 100644 --- a/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/arch/arm/mach-s3c2440/mach-mini2440.c | |||
@@ -60,6 +60,8 @@ | |||
60 | 60 | ||
61 | #include <sound/s3c24xx_uda134x.h> | 61 | #include <sound/s3c24xx_uda134x.h> |
62 | 62 | ||
63 | #include "common.h" | ||
64 | |||
63 | #define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300) | 65 | #define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300) |
64 | 66 | ||
65 | static struct map_desc mini2440_iodesc[] __initdata = { | 67 | static struct map_desc mini2440_iodesc[] __initdata = { |
@@ -681,4 +683,5 @@ MACHINE_START(MINI2440, "MINI2440") | |||
681 | .init_machine = mini2440_init, | 683 | .init_machine = mini2440_init, |
682 | .init_irq = s3c24xx_init_irq, | 684 | .init_irq = s3c24xx_init_irq, |
683 | .timer = &s3c24xx_timer, | 685 | .timer = &s3c24xx_timer, |
686 | .restart = s3c2440_restart, | ||
684 | MACHINE_END | 687 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-nexcoder.c b/arch/arm/mach-s3c2440/mach-nexcoder.c index 61c0bf148165..40eaf844bc1f 100644 --- a/arch/arm/mach-s3c2440/mach-nexcoder.c +++ b/arch/arm/mach-s3c2440/mach-nexcoder.c | |||
@@ -47,6 +47,8 @@ | |||
47 | #include <plat/devs.h> | 47 | #include <plat/devs.h> |
48 | #include <plat/cpu.h> | 48 | #include <plat/cpu.h> |
49 | 49 | ||
50 | #include "common.h" | ||
51 | |||
50 | static struct map_desc nexcoder_iodesc[] __initdata = { | 52 | static struct map_desc nexcoder_iodesc[] __initdata = { |
51 | /* nothing here yet */ | 53 | /* nothing here yet */ |
52 | }; | 54 | }; |
@@ -156,4 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") | |||
156 | .init_machine = nexcoder_init, | 158 | .init_machine = nexcoder_init, |
157 | .init_irq = s3c24xx_init_irq, | 159 | .init_irq = s3c24xx_init_irq, |
158 | .timer = &s3c24xx_timer, | 160 | .timer = &s3c24xx_timer, |
161 | .restart = s3c2440_restart, | ||
159 | MACHINE_END | 162 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index dc142ebf8cba..e795715fba30 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
@@ -54,6 +54,8 @@ | |||
54 | #include <plat/devs.h> | 54 | #include <plat/devs.h> |
55 | #include <plat/cpu.h> | 55 | #include <plat/cpu.h> |
56 | 56 | ||
57 | #include "common.h" | ||
58 | |||
57 | /* onboard perihperal map */ | 59 | /* onboard perihperal map */ |
58 | 60 | ||
59 | static struct map_desc osiris_iodesc[] __initdata = { | 61 | static struct map_desc osiris_iodesc[] __initdata = { |
@@ -452,4 +454,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") | |||
452 | .init_irq = s3c24xx_init_irq, | 454 | .init_irq = s3c24xx_init_irq, |
453 | .init_machine = osiris_init, | 455 | .init_machine = osiris_init, |
454 | .timer = &s3c24xx_timer, | 456 | .timer = &s3c24xx_timer, |
457 | .restart = s3c2440_restart, | ||
455 | MACHINE_END | 458 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c index 0d3453bf567c..1c50d3e09177 100644 --- a/arch/arm/mach-s3c2440/mach-rx1950.c +++ b/arch/arm/mach-s3c2440/mach-rx1950.c | |||
@@ -62,6 +62,8 @@ | |||
62 | 62 | ||
63 | #include <sound/uda1380.h> | 63 | #include <sound/uda1380.h> |
64 | 64 | ||
65 | #include "common.h" | ||
66 | |||
65 | #define LCD_PWM_PERIOD 192960 | 67 | #define LCD_PWM_PERIOD 192960 |
66 | #define LCD_PWM_DUTY 127353 | 68 | #define LCD_PWM_DUTY 127353 |
67 | 69 | ||
@@ -832,4 +834,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950") | |||
832 | .init_irq = s3c24xx_init_irq, | 834 | .init_irq = s3c24xx_init_irq, |
833 | .init_machine = rx1950_init_machine, | 835 | .init_machine = rx1950_init_machine, |
834 | .timer = &s3c24xx_timer, | 836 | .timer = &s3c24xx_timer, |
837 | .restart = s3c2440_restart, | ||
835 | MACHINE_END | 838 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c index e19499c2f909..4d20a016b85d 100644 --- a/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/arch/arm/mach-s3c2440/mach-rx3715.c | |||
@@ -51,6 +51,8 @@ | |||
51 | #include <plat/cpu.h> | 51 | #include <plat/cpu.h> |
52 | #include <plat/pm.h> | 52 | #include <plat/pm.h> |
53 | 53 | ||
54 | #include "common.h" | ||
55 | |||
54 | static struct map_desc rx3715_iodesc[] __initdata = { | 56 | static struct map_desc rx3715_iodesc[] __initdata = { |
55 | /* dump ISA space somewhere unused */ | 57 | /* dump ISA space somewhere unused */ |
56 | 58 | ||
@@ -224,4 +226,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715") | |||
224 | .init_irq = rx3715_init_irq, | 226 | .init_irq = rx3715_init_irq, |
225 | .init_machine = rx3715_init_machine, | 227 | .init_machine = rx3715_init_machine, |
226 | .timer = &s3c24xx_timer, | 228 | .timer = &s3c24xx_timer, |
229 | .restart = s3c2440_restart, | ||
227 | MACHINE_END | 230 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c index 36eeb4197a84..1deb60d12a60 100644 --- a/arch/arm/mach-s3c2440/mach-smdk2440.c +++ b/arch/arm/mach-s3c2440/mach-smdk2440.c | |||
@@ -47,6 +47,8 @@ | |||
47 | 47 | ||
48 | #include <plat/common-smdk.h> | 48 | #include <plat/common-smdk.h> |
49 | 49 | ||
50 | #include "common.h" | ||
51 | |||
50 | static struct map_desc smdk2440_iodesc[] __initdata = { | 52 | static struct map_desc smdk2440_iodesc[] __initdata = { |
51 | /* ISA IO Space map (memory space selected by A24) */ | 53 | /* ISA IO Space map (memory space selected by A24) */ |
52 | 54 | ||
@@ -181,4 +183,5 @@ MACHINE_START(S3C2440, "SMDK2440") | |||
181 | .map_io = smdk2440_map_io, | 183 | .map_io = smdk2440_map_io, |
182 | .init_machine = smdk2440_machine_init, | 184 | .init_machine = smdk2440_machine_init, |
183 | .timer = &s3c24xx_timer, | 185 | .timer = &s3c24xx_timer, |
186 | .restart = s3c2440_restart, | ||
184 | MACHINE_END | 187 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c index 37f8cc6aabd4..42d73f1e0cef 100644 --- a/arch/arm/mach-s3c2440/s3c2440.c +++ b/arch/arm/mach-s3c2440/s3c2440.c | |||
@@ -35,6 +35,7 @@ | |||
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> | ||
38 | 39 | ||
39 | #include <plat/gpio-core.h> | 40 | #include <plat/gpio-core.h> |
40 | #include <plat/gpio-cfg.h> | 41 | #include <plat/gpio-cfg.h> |
@@ -73,3 +74,15 @@ void __init s3c2440_map_io(void) | |||
73 | s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; | 74 | s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; |
74 | s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; | 75 | s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; |
75 | } | 76 | } |
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 | } | ||