diff options
-rw-r--r-- | arch/arm/mach-spear3xx/include/mach/generic.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-spear3xx/spear300_evb.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-spear3xx/spear310_evb.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-spear3xx/spear320_evb.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-spear6xx/include/mach/generic.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-spear6xx/spear600_evb.c | 1 | ||||
-rw-r--r-- | arch/arm/plat-spear/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/plat-spear/include/plat/system.h | 11 | ||||
-rw-r--r-- | arch/arm/plat-spear/restart.c | 27 |
9 files changed, 36 insertions, 12 deletions
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h index b8f31c3935f7..14276e5a98d2 100644 --- a/arch/arm/mach-spear3xx/include/mach/generic.h +++ b/arch/arm/mach-spear3xx/include/mach/generic.h | |||
@@ -42,6 +42,8 @@ void __init spear3xx_map_io(void); | |||
42 | void __init spear3xx_init_irq(void); | 42 | void __init spear3xx_init_irq(void); |
43 | void __init spear3xx_init(void); | 43 | void __init spear3xx_init(void); |
44 | 44 | ||
45 | void spear_restart(char, const char *); | ||
46 | |||
45 | /* pad mux declarations */ | 47 | /* pad mux declarations */ |
46 | #define PMX_FIRDA_MASK (1 << 14) | 48 | #define PMX_FIRDA_MASK (1 << 14) |
47 | #define PMX_I2C_MASK (1 << 13) | 49 | #define PMX_I2C_MASK (1 << 13) |
diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c index a5ff98eed1db..8b429f05b613 100644 --- a/arch/arm/mach-spear3xx/spear300_evb.c +++ b/arch/arm/mach-spear3xx/spear300_evb.c | |||
@@ -69,4 +69,5 @@ MACHINE_START(SPEAR300, "ST-SPEAR300-EVB") | |||
69 | .init_irq = spear3xx_init_irq, | 69 | .init_irq = spear3xx_init_irq, |
70 | .timer = &spear3xx_timer, | 70 | .timer = &spear3xx_timer, |
71 | .init_machine = spear300_evb_init, | 71 | .init_machine = spear300_evb_init, |
72 | .restart = spear_restart, | ||
72 | MACHINE_END | 73 | MACHINE_END |
diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c index 45d180d59362..a11d6ead0aed 100644 --- a/arch/arm/mach-spear3xx/spear310_evb.c +++ b/arch/arm/mach-spear3xx/spear310_evb.c | |||
@@ -75,4 +75,5 @@ MACHINE_START(SPEAR310, "ST-SPEAR310-EVB") | |||
75 | .init_irq = spear3xx_init_irq, | 75 | .init_irq = spear3xx_init_irq, |
76 | .timer = &spear3xx_timer, | 76 | .timer = &spear3xx_timer, |
77 | .init_machine = spear310_evb_init, | 77 | .init_machine = spear310_evb_init, |
78 | .restart = spear_restart, | ||
78 | MACHINE_END | 79 | MACHINE_END |
diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c index 22879848d73a..4239a70686c5 100644 --- a/arch/arm/mach-spear3xx/spear320_evb.c +++ b/arch/arm/mach-spear3xx/spear320_evb.c | |||
@@ -73,4 +73,5 @@ MACHINE_START(SPEAR320, "ST-SPEAR320-EVB") | |||
73 | .init_irq = spear3xx_init_irq, | 73 | .init_irq = spear3xx_init_irq, |
74 | .timer = &spear3xx_timer, | 74 | .timer = &spear3xx_timer, |
75 | .init_machine = spear320_evb_init, | 75 | .init_machine = spear320_evb_init, |
76 | .restart = spear_restart, | ||
76 | MACHINE_END | 77 | MACHINE_END |
diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h index 183f0238c5e2..116b99301cf5 100644 --- a/arch/arm/mach-spear6xx/include/mach/generic.h +++ b/arch/arm/mach-spear6xx/include/mach/generic.h | |||
@@ -41,6 +41,8 @@ void __init spear6xx_init(void); | |||
41 | void __init spear600_init(void); | 41 | void __init spear600_init(void); |
42 | void __init spear6xx_clk_init(void); | 42 | void __init spear6xx_clk_init(void); |
43 | 43 | ||
44 | void spear_restart(char, const char *); | ||
45 | |||
44 | /* Add spear600 machine device structure declarations here */ | 46 | /* Add spear600 machine device structure declarations here */ |
45 | 47 | ||
46 | #endif /* __MACH_GENERIC_H */ | 48 | #endif /* __MACH_GENERIC_H */ |
diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c index 8238fe38e713..0a16559ba264 100644 --- a/arch/arm/mach-spear6xx/spear600_evb.c +++ b/arch/arm/mach-spear6xx/spear600_evb.c | |||
@@ -48,4 +48,5 @@ MACHINE_START(SPEAR600, "ST-SPEAR600-EVB") | |||
48 | .init_irq = spear6xx_init_irq, | 48 | .init_irq = spear6xx_init_irq, |
49 | .timer = &spear6xx_timer, | 49 | .timer = &spear6xx_timer, |
50 | .init_machine = spear600_evb_init, | 50 | .init_machine = spear600_evb_init, |
51 | .restart = spear_restart, | ||
51 | MACHINE_END | 52 | MACHINE_END |
diff --git a/arch/arm/plat-spear/Makefile b/arch/arm/plat-spear/Makefile index b4f340b8f1f1..e0f2e5b9530c 100644 --- a/arch/arm/plat-spear/Makefile +++ b/arch/arm/plat-spear/Makefile | |||
@@ -3,6 +3,6 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := clock.o time.o | 6 | obj-y := clock.o restart.o time.o |
7 | 7 | ||
8 | obj-$(CONFIG_ARCH_SPEAR3XX) += shirq.o padmux.o | 8 | obj-$(CONFIG_ARCH_SPEAR3XX) += shirq.o padmux.o |
diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h index 1171f228d718..4a0d125260a8 100644 --- a/arch/arm/plat-spear/include/plat/system.h +++ b/arch/arm/plat-spear/include/plat/system.h | |||
@@ -14,10 +14,6 @@ | |||
14 | #ifndef __PLAT_SYSTEM_H | 14 | #ifndef __PLAT_SYSTEM_H |
15 | #define __PLAT_SYSTEM_H | 15 | #define __PLAT_SYSTEM_H |
16 | 16 | ||
17 | #include <linux/io.h> | ||
18 | #include <asm/hardware/sp810.h> | ||
19 | #include <mach/hardware.h> | ||
20 | |||
21 | static inline void arch_idle(void) | 17 | static inline void arch_idle(void) |
22 | { | 18 | { |
23 | /* | 19 | /* |
@@ -29,13 +25,6 @@ static inline void arch_idle(void) | |||
29 | 25 | ||
30 | static inline void arch_reset(char mode, const char *cmd) | 26 | static inline void arch_reset(char mode, const char *cmd) |
31 | { | 27 | { |
32 | if (mode == 's') { | ||
33 | /* software reset, Jump into ROM at address 0 */ | ||
34 | soft_restart(0); | ||
35 | } else { | ||
36 | /* hardware reset, Use on-chip reset capability */ | ||
37 | sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE); | ||
38 | } | ||
39 | } | 28 | } |
40 | 29 | ||
41 | #endif /* __PLAT_SYSTEM_H */ | 30 | #endif /* __PLAT_SYSTEM_H */ |
diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/plat-spear/restart.c new file mode 100644 index 000000000000..2b4e3d82957c --- /dev/null +++ b/arch/arm/plat-spear/restart.c | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/restart.c | ||
3 | * | ||
4 | * SPEAr platform specific restart functions | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | #include <linux/io.h> | ||
14 | #include <asm/hardware/sp810.h> | ||
15 | #include <mach/hardware.h> | ||
16 | #include <mach/generic.h> | ||
17 | |||
18 | void spear_restart(char mode, const char *cmd) | ||
19 | { | ||
20 | if (mode == 's') { | ||
21 | /* software reset, Jump into ROM at address 0 */ | ||
22 | soft_restart(0); | ||
23 | } else { | ||
24 | /* hardware reset, Use on-chip reset capability */ | ||
25 | sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE); | ||
26 | } | ||
27 | } | ||