aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 08:25:15 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 08:25:27 -0500
commit7b9dd47136c07ffd883aff6926c7b281e4c1eea4 (patch)
treeb835312e76fe323de3e1cbbb0d15fca5a3f7ef9c /arch/arm/mach-s3c2410
parent2e0e943436912ffe0848ece58167edfe754edb96 (diff)
parent0575fb754dbfc32a01f297e778533340a533ec68 (diff)
Merge branch 'restart' into for-linus
Conflicts: arch/arm/mach-exynos/cpu.c The changes to arch/arm/mach-exynos/cpu.c were moved to mach-exynos/common.c.
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r--arch/arm/mach-s3c2410/common.h17
-rw-r--r--arch/arm/mach-s3c2410/include/mach/reset.h22
-rw-r--r--arch/arm/mach-s3c2410/include/mach/system-reset.h32
-rw-r--r--arch/arm/mach-s3c2410/include/mach/system.h4
-rw-r--r--arch/arm/mach-s3c2410/mach-amlm5900.c3
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c2
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c3
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c4
-rw-r--r--arch/arm/mach-s3c2410/mach-otom.c3
-rw-r--r--arch/arm/mach-s3c2410/mach-qt2410.c5
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2410.c5
-rw-r--r--arch/arm/mach-s3c2410/mach-tct_hammer.c3
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c2
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.c13
14 files changed, 56 insertions, 62 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
15void 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/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
20extern 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
deleted file mode 100644
index 913893d44650..000000000000
--- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/system-reset.h
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - System define for arch_reset() function
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <mach/hardware.h>
14#include <plat/watchdog-reset.h>
15
16extern void (*s3c24xx_reset_hook)(void);
17
18static void
19arch_reset(char mode, const char *cmd)
20{
21 if (mode == 's') {
22 soft_restart(0);
23 }
24
25 if (s3c24xx_reset_hook)
26 s3c24xx_reset_hook();
27
28 arch_wdt_reset();
29
30 /* we'll take a jump through zero as a poor second */
31 soft_restart(0);
32}
diff --git a/arch/arm/mach-s3c2410/include/mach/system.h b/arch/arm/mach-s3c2410/include/mach/system.h
index a8cbca6701e5..5e215c1a5c8f 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
22void (*s3c24xx_idle)(void); 21void (*s3c24xx_idle)(void);
23void (*s3c24xx_reset_hook)(void);
24 22
25void s3c24xx_default_idle(void) 23void s3c24xx_default_idle(void)
26{ 24{
@@ -54,5 +52,3 @@ static void arch_idle(void)
54 else 52 else
55 s3c24xx_default_idle(); 53 s3c24xx_default_idle();
56} 54}
57
58#include <mach/system-reset.h>
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
66static struct resource amlm5900_nor_resource = { 68static 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,
244MACHINE_END 247MACHINE_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,
665MACHINE_END 667MACHINE_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,
754MACHINE_END 757MACHINE_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
54static struct map_desc n30_iodesc[] __initdata = { 56static 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,
594MACHINE_END 597MACHINE_END
595 598
596MACHINE_START(N35, "Acer-N35") 599MACHINE_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,
604MACHINE_END 608MACHINE_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
41static struct map_desc otom11_iodesc[] __initdata = { 43static 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,
124MACHINE_END 127MACHINE_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
65static struct map_desc qt2410_iodesc[] __initdata = { 67static 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,
353MACHINE_END 356MACHINE_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
57static struct map_desc smdk2410_iodesc[] __initdata = { 59static 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,
119MACHINE_END 122MACHINE_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
57static struct resource tct_hammer_nor_resource = { 59static 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,
154MACHINE_END 157MACHINE_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,
408MACHINE_END 410MACHINE_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
188void 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}