diff options
author | Robin Holt <holt@sgi.com> | 2013-07-08 19:01:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-09 13:33:29 -0400 |
commit | 7b6d864b48d95e6ea1df7df64475b9cb9616dcf9 (patch) | |
tree | bc5b3c1c6021e19e51f7f5afe5fb0fbbaef9f7a3 /arch | |
parent | 16d6d5b00ee75307bab7e4ede9452c97b28f30e2 (diff) |
reboot: arm: change reboot_mode to use enum reboot_mode
Preparing to move the parsing of reboot= to generic kernel code forces
the change in reboot_mode handling to use the enum.
[akpm@linux-foundation.org: fix arch/arm/mach-socfpga/socfpga.c]
Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Russ Anderson <rja@sgi.com>
Cc: Robin Holt <holt@sgi.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
121 files changed, 277 insertions, 164 deletions
diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h index ed94b1a366ae..423744bf18eb 100644 --- a/arch/arm/include/asm/hardware/iop3xx.h +++ b/arch/arm/include/asm/hardware/iop3xx.h | |||
@@ -223,11 +223,12 @@ extern int iop3xx_get_init_atu(void); | |||
223 | #ifndef __ASSEMBLY__ | 223 | #ifndef __ASSEMBLY__ |
224 | 224 | ||
225 | #include <linux/types.h> | 225 | #include <linux/types.h> |
226 | #include <linux/reboot.h> | ||
226 | 227 | ||
227 | void iop3xx_map_io(void); | 228 | void iop3xx_map_io(void); |
228 | void iop_init_cp6_handler(void); | 229 | void iop_init_cp6_handler(void); |
229 | void iop_init_time(unsigned long tickrate); | 230 | void iop_init_time(unsigned long tickrate); |
230 | void iop3xx_restart(char, const char *); | 231 | void iop3xx_restart(enum reboot_mode, const char *); |
231 | 232 | ||
232 | static inline u32 read_tmr0(void) | 233 | static inline u32 read_tmr0(void) |
233 | { | 234 | { |
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index fdf62b4246b0..441efc491b50 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -59,7 +59,7 @@ struct machine_desc { | |||
59 | #ifdef CONFIG_MULTI_IRQ_HANDLER | 59 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
60 | void (*handle_irq)(struct pt_regs *); | 60 | void (*handle_irq)(struct pt_regs *); |
61 | #endif | 61 | #endif |
62 | void (*restart)(char, const char *); | 62 | void (*restart)(enum reboot_mode, const char *); |
63 | }; | 63 | }; |
64 | 64 | ||
65 | /* | 65 | /* |
diff --git a/arch/arm/include/asm/system_misc.h b/arch/arm/include/asm/system_misc.h index 21a23e378bbe..a3d61ad984af 100644 --- a/arch/arm/include/asm/system_misc.h +++ b/arch/arm/include/asm/system_misc.h | |||
@@ -6,11 +6,12 @@ | |||
6 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
7 | #include <linux/linkage.h> | 7 | #include <linux/linkage.h> |
8 | #include <linux/irqflags.h> | 8 | #include <linux/irqflags.h> |
9 | #include <linux/reboot.h> | ||
9 | 10 | ||
10 | extern void cpu_init(void); | 11 | extern void cpu_init(void); |
11 | 12 | ||
12 | void soft_restart(unsigned long); | 13 | void soft_restart(unsigned long); |
13 | extern void (*arm_pm_restart)(char str, const char *cmd); | 14 | extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); |
14 | extern void (*arm_pm_idle)(void); | 15 | extern void (*arm_pm_idle)(void); |
15 | 16 | ||
16 | #define UDBG_UNDEFINED (1 << 0) | 17 | #define UDBG_UNDEFINED (1 << 0) |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 2d544062fd7d..b7fdd864c839 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/hw_breakpoint.h> | 32 | #include <linux/hw_breakpoint.h> |
33 | #include <linux/cpuidle.h> | 33 | #include <linux/cpuidle.h> |
34 | #include <linux/leds.h> | 34 | #include <linux/leds.h> |
35 | #include <linux/reboot.h> | ||
35 | 36 | ||
36 | #include <asm/cacheflush.h> | 37 | #include <asm/cacheflush.h> |
37 | #include <asm/idmap.h> | 38 | #include <asm/idmap.h> |
@@ -113,7 +114,7 @@ void soft_restart(unsigned long addr) | |||
113 | BUG(); | 114 | BUG(); |
114 | } | 115 | } |
115 | 116 | ||
116 | static void null_restart(char mode, const char *cmd) | 117 | static void null_restart(enum reboot_mode reboot_mode, const char *cmd) |
117 | { | 118 | { |
118 | } | 119 | } |
119 | 120 | ||
@@ -123,7 +124,7 @@ static void null_restart(char mode, const char *cmd) | |||
123 | void (*pm_power_off)(void); | 124 | void (*pm_power_off)(void); |
124 | EXPORT_SYMBOL(pm_power_off); | 125 | EXPORT_SYMBOL(pm_power_off); |
125 | 126 | ||
126 | void (*arm_pm_restart)(char str, const char *cmd) = null_restart; | 127 | void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = null_restart; |
127 | EXPORT_SYMBOL_GPL(arm_pm_restart); | 128 | EXPORT_SYMBOL_GPL(arm_pm_restart); |
128 | 129 | ||
129 | /* | 130 | /* |
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 9eb574397ee1..4aad93d54d6f 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/reboot.h> | ||
14 | 15 | ||
15 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
16 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
@@ -304,7 +305,7 @@ static void at91rm9200_idle(void) | |||
304 | at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK); | 305 | at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK); |
305 | } | 306 | } |
306 | 307 | ||
307 | static void at91rm9200_restart(char mode, const char *cmd) | 308 | static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd) |
308 | { | 309 | { |
309 | /* | 310 | /* |
310 | * Perform a hardware reset with the use of the Watchdog timer. | 311 | * Perform a hardware reset with the use of the Watchdog timer. |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index f6de36aefe85..dc6e2f5f804d 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/clkdev.h> | 11 | #include <linux/clkdev.h> |
12 | #include <linux/of.h> | 12 | #include <linux/of.h> |
13 | #include <linux/reboot.h> | ||
13 | 14 | ||
14 | /* Map io */ | 15 | /* Map io */ |
15 | extern void __init at91_map_io(void); | 16 | extern void __init at91_map_io(void); |
@@ -60,8 +61,8 @@ extern void at91sam9_idle(void); | |||
60 | 61 | ||
61 | /* reset */ | 62 | /* reset */ |
62 | extern void at91_ioremap_rstc(u32 base_addr); | 63 | extern void at91_ioremap_rstc(u32 base_addr); |
63 | extern void at91sam9_alt_restart(char, const char *); | 64 | extern void at91sam9_alt_restart(enum reboot_mode, const char *); |
64 | extern void at91sam9g45_restart(char, const char *); | 65 | extern void at91sam9g45_restart(enum reboot_mode, const char *); |
65 | 66 | ||
66 | /* shutdown */ | 67 | /* shutdown */ |
67 | extern void at91_ioremap_shdwc(u32 base_addr); | 68 | extern void at91_ioremap_shdwc(u32 base_addr); |
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c index 740fa9ebe249..40686d7ef500 100644 --- a/arch/arm/mach-bcm2835/bcm2835.c +++ b/arch/arm/mach-bcm2835/bcm2835.c | |||
@@ -53,7 +53,7 @@ static void bcm2835_setup_restart(void) | |||
53 | WARN(!wdt_regs, "failed to remap watchdog regs"); | 53 | WARN(!wdt_regs, "failed to remap watchdog regs"); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void bcm2835_restart(char mode, const char *cmd) | 56 | static void bcm2835_restart(enum reboot_mode mode, const char *cmd) |
57 | { | 57 | { |
58 | u32 val; | 58 | u32 val; |
59 | 59 | ||
@@ -91,7 +91,7 @@ static void bcm2835_power_off(void) | |||
91 | writel_relaxed(val, wdt_regs + PM_RSTS); | 91 | writel_relaxed(val, wdt_regs + PM_RSTS); |
92 | 92 | ||
93 | /* Continue with normal reset mechanism */ | 93 | /* Continue with normal reset mechanism */ |
94 | bcm2835_restart(0, ""); | 94 | bcm2835_restart(REBOOT_HARD, ""); |
95 | } | 95 | } |
96 | 96 | ||
97 | static struct map_desc io_map __initdata = { | 97 | static struct map_desc io_map __initdata = { |
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c index f6d1746366d4..4ca2f3ca2de4 100644 --- a/arch/arm/mach-clps711x/common.c +++ b/arch/arm/mach-clps711x/common.c | |||
@@ -384,7 +384,7 @@ void __init clps711x_timer_init(void) | |||
384 | setup_irq(IRQ_TC2OI, &clps711x_timer_irq); | 384 | setup_irq(IRQ_TC2OI, &clps711x_timer_irq); |
385 | } | 385 | } |
386 | 386 | ||
387 | void clps711x_restart(char mode, const char *cmd) | 387 | void clps711x_restart(enum reboot_mode mode, const char *cmd) |
388 | { | 388 | { |
389 | soft_restart(0); | 389 | soft_restart(0); |
390 | } | 390 | } |
diff --git a/arch/arm/mach-clps711x/common.h b/arch/arm/mach-clps711x/common.h index 2a22f4c6cc75..9a6767bfdc47 100644 --- a/arch/arm/mach-clps711x/common.h +++ b/arch/arm/mach-clps711x/common.h | |||
@@ -4,6 +4,8 @@ | |||
4 | * Common bits. | 4 | * Common bits. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/reboot.h> | ||
8 | |||
7 | #define CLPS711X_NR_IRQS (33) | 9 | #define CLPS711X_NR_IRQS (33) |
8 | #define CLPS711X_NR_GPIO (4 * 8 + 3) | 10 | #define CLPS711X_NR_GPIO (4 * 8 + 3) |
9 | #define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit)) | 11 | #define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit)) |
@@ -12,5 +14,5 @@ extern void clps711x_map_io(void); | |||
12 | extern void clps711x_init_irq(void); | 14 | extern void clps711x_init_irq(void); |
13 | extern void clps711x_timer_init(void); | 15 | extern void clps711x_timer_init(void); |
14 | extern void clps711x_handle_irq(struct pt_regs *regs); | 16 | extern void clps711x_handle_irq(struct pt_regs *regs); |
15 | extern void clps711x_restart(char mode, const char *cmd); | 17 | extern void clps711x_restart(enum reboot_mode mode, const char *cmd); |
16 | extern void clps711x_init_early(void); | 18 | extern void clps711x_init_early(void); |
diff --git a/arch/arm/mach-cns3xxx/core.h b/arch/arm/mach-cns3xxx/core.h index b23b17b4da10..5218b6198dc2 100644 --- a/arch/arm/mach-cns3xxx/core.h +++ b/arch/arm/mach-cns3xxx/core.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __CNS3XXX_CORE_H | 11 | #ifndef __CNS3XXX_CORE_H |
12 | #define __CNS3XXX_CORE_H | 12 | #define __CNS3XXX_CORE_H |
13 | 13 | ||
14 | #include <linux/reboot.h> | ||
15 | |||
14 | extern void cns3xxx_timer_init(void); | 16 | extern void cns3xxx_timer_init(void); |
15 | 17 | ||
16 | #ifdef CONFIG_CACHE_L2X0 | 18 | #ifdef CONFIG_CACHE_L2X0 |
@@ -22,6 +24,6 @@ static inline void cns3xxx_l2x0_init(void) {} | |||
22 | void __init cns3xxx_map_io(void); | 24 | void __init cns3xxx_map_io(void); |
23 | void __init cns3xxx_init_irq(void); | 25 | void __init cns3xxx_init_irq(void); |
24 | void cns3xxx_power_off(void); | 26 | void cns3xxx_power_off(void); |
25 | void cns3xxx_restart(char, const char *); | 27 | void cns3xxx_restart(enum reboot_mode, const char *); |
26 | 28 | ||
27 | #endif /* __CNS3XXX_CORE_H */ | 29 | #endif /* __CNS3XXX_CORE_H */ |
diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c index 79e3d47aad65..fb38c726e987 100644 --- a/arch/arm/mach-cns3xxx/pm.c +++ b/arch/arm/mach-cns3xxx/pm.c | |||
@@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block) | |||
89 | } | 89 | } |
90 | EXPORT_SYMBOL(cns3xxx_pwr_soft_rst); | 90 | EXPORT_SYMBOL(cns3xxx_pwr_soft_rst); |
91 | 91 | ||
92 | void cns3xxx_restart(char mode, const char *cmd) | 92 | void cns3xxx_restart(enum reboot_mode mode, const char *cmd) |
93 | { | 93 | { |
94 | /* | 94 | /* |
95 | * To reset, we hit the on-board reset register | 95 | * To reset, we hit the on-board reset register |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index eb254fe861ac..71a46a348761 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/serial_8250.h> | 16 | #include <linux/serial_8250.h> |
17 | #include <linux/ahci_platform.h> | 17 | #include <linux/ahci_platform.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/reboot.h> | ||
19 | 20 | ||
20 | #include <mach/cputype.h> | 21 | #include <mach/cputype.h> |
21 | #include <mach/common.h> | 22 | #include <mach/common.h> |
@@ -366,7 +367,7 @@ static struct platform_device da8xx_wdt_device = { | |||
366 | .resource = da8xx_watchdog_resources, | 367 | .resource = da8xx_watchdog_resources, |
367 | }; | 368 | }; |
368 | 369 | ||
369 | void da8xx_restart(char mode, const char *cmd) | 370 | void da8xx_restart(enum reboot_mode mode, const char *cmd) |
370 | { | 371 | { |
371 | struct device *dev; | 372 | struct device *dev; |
372 | 373 | ||
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index 90b83d00fe2b..111573c0aad1 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/reboot.h> | ||
16 | 17 | ||
17 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
18 | #include <linux/platform_data/i2c-davinci.h> | 19 | #include <linux/platform_data/i2c-davinci.h> |
@@ -307,7 +308,7 @@ struct platform_device davinci_wdt_device = { | |||
307 | .resource = wdt_resources, | 308 | .resource = wdt_resources, |
308 | }; | 309 | }; |
309 | 310 | ||
310 | void davinci_restart(char mode, const char *cmd) | 311 | void davinci_restart(enum reboot_mode mode, const char *cmd) |
311 | { | 312 | { |
312 | davinci_watchdog_reset(&davinci_wdt_device); | 313 | davinci_watchdog_reset(&davinci_wdt_device); |
313 | } | 314 | } |
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index b124b77c90c5..cce316b92c06 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/reboot.h> | ||
17 | 18 | ||
18 | extern void davinci_timer_init(void); | 19 | extern void davinci_timer_init(void); |
19 | 20 | ||
@@ -81,7 +82,7 @@ extern struct davinci_soc_info davinci_soc_info; | |||
81 | 82 | ||
82 | extern void davinci_common_init(struct davinci_soc_info *soc_info); | 83 | extern void davinci_common_init(struct davinci_soc_info *soc_info); |
83 | extern void davinci_init_ide(void); | 84 | extern void davinci_init_ide(void); |
84 | void davinci_restart(char mode, const char *cmd); | 85 | void davinci_restart(enum reboot_mode mode, const char *cmd); |
85 | void davinci_init_late(void); | 86 | void davinci_init_late(void); |
86 | 87 | ||
87 | #ifdef CONFIG_DAVINCI_RESET_CLOCKS | 88 | #ifdef CONFIG_DAVINCI_RESET_CLOCKS |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index 3c797e2272f8..7b41a5e9bc31 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/davinci_emac.h> | 17 | #include <linux/davinci_emac.h> |
18 | #include <linux/spi/spi.h> | 18 | #include <linux/spi/spi.h> |
19 | #include <linux/platform_data/davinci_asp.h> | 19 | #include <linux/platform_data/davinci_asp.h> |
20 | #include <linux/reboot.h> | ||
20 | #include <linux/videodev2.h> | 21 | #include <linux/videodev2.h> |
21 | 22 | ||
22 | #include <mach/serial.h> | 23 | #include <mach/serial.h> |
@@ -106,7 +107,7 @@ int da850_register_vpif_display | |||
106 | (struct vpif_display_config *display_config); | 107 | (struct vpif_display_config *display_config); |
107 | int da850_register_vpif_capture | 108 | int da850_register_vpif_capture |
108 | (struct vpif_capture_config *capture_config); | 109 | (struct vpif_capture_config *capture_config); |
109 | void da8xx_restart(char mode, const char *cmd); | 110 | void da8xx_restart(enum reboot_mode mode, const char *cmd); |
110 | void da8xx_rproc_reserve_cma(void); | 111 | void da8xx_rproc_reserve_cma(void); |
111 | int da8xx_register_rproc(void); | 112 | int da8xx_register_rproc(void); |
112 | 113 | ||
diff --git a/arch/arm/mach-davinci/include/mach/tnetv107x.h b/arch/arm/mach-davinci/include/mach/tnetv107x.h index 366e975effa8..16314c64f755 100644 --- a/arch/arm/mach-davinci/include/mach/tnetv107x.h +++ b/arch/arm/mach-davinci/include/mach/tnetv107x.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/serial_8250.h> | 35 | #include <linux/serial_8250.h> |
36 | #include <linux/input/matrix_keypad.h> | 36 | #include <linux/input/matrix_keypad.h> |
37 | #include <linux/mfd/ti_ssp.h> | 37 | #include <linux/mfd/ti_ssp.h> |
38 | #include <linux/reboot.h> | ||
38 | 39 | ||
39 | #include <linux/platform_data/mmc-davinci.h> | 40 | #include <linux/platform_data/mmc-davinci.h> |
40 | #include <linux/platform_data/mtd-davinci.h> | 41 | #include <linux/platform_data/mtd-davinci.h> |
@@ -54,7 +55,7 @@ extern struct platform_device tnetv107x_serial_device; | |||
54 | extern void tnetv107x_init(void); | 55 | extern void tnetv107x_init(void); |
55 | extern void tnetv107x_devices_init(struct tnetv107x_device_info *); | 56 | extern void tnetv107x_devices_init(struct tnetv107x_device_info *); |
56 | extern void tnetv107x_irq_init(void); | 57 | extern void tnetv107x_irq_init(void); |
57 | void tnetv107x_restart(char mode, const char *cmd); | 58 | void tnetv107x_restart(enum reboot_mode mode, const char *cmd); |
58 | 59 | ||
59 | #endif | 60 | #endif |
60 | 61 | ||
diff --git a/arch/arm/mach-davinci/tnetv107x.c b/arch/arm/mach-davinci/tnetv107x.c index 3b2a70d43efa..4545667ecd3c 100644 --- a/arch/arm/mach-davinci/tnetv107x.c +++ b/arch/arm/mach-davinci/tnetv107x.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/reboot.h> | ||
22 | 23 | ||
23 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
24 | 25 | ||
@@ -730,7 +731,7 @@ static void tnetv107x_watchdog_reset(struct platform_device *pdev) | |||
730 | __raw_writel(1, ®s->kick); | 731 | __raw_writel(1, ®s->kick); |
731 | } | 732 | } |
732 | 733 | ||
733 | void tnetv107x_restart(char mode, const char *cmd) | 734 | void tnetv107x_restart(enum reboot_mode mode, const char *cmd) |
734 | { | 735 | { |
735 | tnetv107x_watchdog_reset(&tnetv107x_wdt_device); | 736 | tnetv107x_watchdog_reset(&tnetv107x_wdt_device); |
736 | } | 737 | } |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 2a9443d04d92..00247c771313 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -381,7 +381,7 @@ void __init dove_init(void) | |||
381 | dove_xor1_init(); | 381 | dove_xor1_init(); |
382 | } | 382 | } |
383 | 383 | ||
384 | void dove_restart(char mode, const char *cmd) | 384 | void dove_restart(enum reboot_mode mode, const char *cmd) |
385 | { | 385 | { |
386 | /* | 386 | /* |
387 | * Enable soft reset to assert RSTOUTn. | 387 | * Enable soft reset to assert RSTOUTn. |
diff --git a/arch/arm/mach-dove/common.h b/arch/arm/mach-dove/common.h index e86347928b67..1d725224d146 100644 --- a/arch/arm/mach-dove/common.h +++ b/arch/arm/mach-dove/common.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ARCH_DOVE_COMMON_H | 11 | #ifndef __ARCH_DOVE_COMMON_H |
12 | #define __ARCH_DOVE_COMMON_H | 12 | #define __ARCH_DOVE_COMMON_H |
13 | 13 | ||
14 | #include <linux/reboot.h> | ||
15 | |||
14 | struct mv643xx_eth_platform_data; | 16 | struct mv643xx_eth_platform_data; |
15 | struct mv_sata_platform_data; | 17 | struct mv_sata_platform_data; |
16 | 18 | ||
@@ -42,6 +44,6 @@ void dove_spi1_init(void); | |||
42 | void dove_i2c_init(void); | 44 | void dove_i2c_init(void); |
43 | void dove_sdio0_init(void); | 45 | void dove_sdio0_init(void); |
44 | void dove_sdio1_init(void); | 46 | void dove_sdio1_init(void); |
45 | void dove_restart(char, const char *); | 47 | void dove_restart(enum reboot_mode, const char *); |
46 | 48 | ||
47 | #endif | 49 | #endif |
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c index 41d2d90afaa3..68ac934d4565 100644 --- a/arch/arm/mach-ebsa110/core.c +++ b/arch/arm/mach-ebsa110/core.c | |||
@@ -311,7 +311,7 @@ static int __init ebsa110_init(void) | |||
311 | 311 | ||
312 | arch_initcall(ebsa110_init); | 312 | arch_initcall(ebsa110_init); |
313 | 313 | ||
314 | static void ebsa110_restart(char mode, const char *cmd) | 314 | static void ebsa110_restart(enum reboot_mode mode, const char *cmd) |
315 | { | 315 | { |
316 | soft_restart(0x80000000); | 316 | soft_restart(0x80000000); |
317 | } | 317 | } |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index c49ed3dc1aea..df8612fbbc9c 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/export.h> | 36 | #include <linux/export.h> |
37 | #include <linux/irqchip/arm-vic.h> | 37 | #include <linux/irqchip/arm-vic.h> |
38 | #include <linux/reboot.h> | ||
38 | 39 | ||
39 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
40 | #include <linux/platform_data/video-ep93xx.h> | 41 | #include <linux/platform_data/video-ep93xx.h> |
@@ -921,7 +922,7 @@ void __init ep93xx_init_devices(void) | |||
921 | gpio_led_register_device(-1, &ep93xx_led_data); | 922 | gpio_led_register_device(-1, &ep93xx_led_data); |
922 | } | 923 | } |
923 | 924 | ||
924 | void ep93xx_restart(char mode, const char *cmd) | 925 | void ep93xx_restart(enum reboot_mode mode, const char *cmd) |
925 | { | 926 | { |
926 | /* | 927 | /* |
927 | * Set then clear the SWRST bit to initiate a software reset | 928 | * Set then clear the SWRST bit to initiate a software reset |
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index a14e1b37beff..e256e0baec2e 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h | |||
@@ -4,6 +4,8 @@ | |||
4 | 4 | ||
5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
6 | 6 | ||
7 | #include <linux/reboot.h> | ||
8 | |||
7 | struct i2c_gpio_platform_data; | 9 | struct i2c_gpio_platform_data; |
8 | struct i2c_board_info; | 10 | struct i2c_board_info; |
9 | struct spi_board_info; | 11 | struct spi_board_info; |
@@ -55,7 +57,7 @@ void ep93xx_ide_release_gpio(struct platform_device *pdev); | |||
55 | void ep93xx_init_devices(void); | 57 | void ep93xx_init_devices(void); |
56 | extern void ep93xx_timer_init(void); | 58 | extern void ep93xx_timer_init(void); |
57 | 59 | ||
58 | void ep93xx_restart(char, const char *); | 60 | void ep93xx_restart(enum reboot_mode, const char *); |
59 | void ep93xx_init_late(void); | 61 | void ep93xx_init_late(void); |
60 | 62 | ||
61 | #ifdef CONFIG_CRUNCH | 63 | #ifdef CONFIG_CRUNCH |
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 2c655db4b78e..164685bd25c8 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -285,12 +285,12 @@ static struct map_desc exynos5440_iodesc0[] __initdata = { | |||
285 | }, | 285 | }, |
286 | }; | 286 | }; |
287 | 287 | ||
288 | void exynos4_restart(char mode, const char *cmd) | 288 | void exynos4_restart(enum reboot_mode mode, const char *cmd) |
289 | { | 289 | { |
290 | __raw_writel(0x1, S5P_SWRESET); | 290 | __raw_writel(0x1, S5P_SWRESET); |
291 | } | 291 | } |
292 | 292 | ||
293 | void exynos5_restart(char mode, const char *cmd) | 293 | void exynos5_restart(enum reboot_mode mode, const char *cmd) |
294 | { | 294 | { |
295 | struct device_node *np; | 295 | struct device_node *np; |
296 | u32 val; | 296 | u32 val; |
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 38d45fd23be4..3e156bcddcb4 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H |
13 | #define __ARCH_ARM_MACH_EXYNOS_COMMON_H | 13 | #define __ARCH_ARM_MACH_EXYNOS_COMMON_H |
14 | 14 | ||
15 | #include <linux/reboot.h> | ||
15 | #include <linux/of.h> | 16 | #include <linux/of.h> |
16 | 17 | ||
17 | void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); | 18 | void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); |
@@ -20,8 +21,8 @@ extern unsigned long xxti_f, xusbxti_f; | |||
20 | 21 | ||
21 | struct map_desc; | 22 | struct map_desc; |
22 | void exynos_init_io(void); | 23 | void exynos_init_io(void); |
23 | void exynos4_restart(char mode, const char *cmd); | 24 | void exynos4_restart(enum reboot_mode mode, const char *cmd); |
24 | void exynos5_restart(char mode, const char *cmd); | 25 | void exynos5_restart(enum reboot_mode mode, const char *cmd); |
25 | void exynos_init_late(void); | 26 | void exynos_init_late(void); |
26 | 27 | ||
27 | /* ToDo: remove these after migrating legacy exynos4 platforms to dt */ | 28 | /* ToDo: remove these after migrating legacy exynos4 platforms to dt */ |
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index a42b369bc439..2739ca2c1334 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c | |||
@@ -198,9 +198,9 @@ void __init footbridge_map_io(void) | |||
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | void footbridge_restart(char mode, const char *cmd) | 201 | void footbridge_restart(enum reboot_mode mode, const char *cmd) |
202 | { | 202 | { |
203 | if (mode == 's') { | 203 | if (mode == REBOOT_SOFT) { |
204 | /* Jump into the ROM */ | 204 | /* Jump into the ROM */ |
205 | soft_restart(0x41000000); | 205 | soft_restart(0x41000000); |
206 | } else { | 206 | } else { |
diff --git a/arch/arm/mach-footbridge/common.h b/arch/arm/mach-footbridge/common.h index a846e50a07b8..56607b3a773e 100644 --- a/arch/arm/mach-footbridge/common.h +++ b/arch/arm/mach-footbridge/common.h | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/reboot.h> | ||
1 | 2 | ||
2 | extern void footbridge_timer_init(void); | 3 | extern void footbridge_timer_init(void); |
3 | extern void isa_timer_init(void); | 4 | extern void isa_timer_init(void); |
@@ -8,4 +9,4 @@ extern void footbridge_map_io(void); | |||
8 | extern void footbridge_init_irq(void); | 9 | extern void footbridge_init_irq(void); |
9 | 10 | ||
10 | extern void isa_init_irq(unsigned int irq); | 11 | extern void isa_init_irq(unsigned int irq); |
11 | extern void footbridge_restart(char, const char *); | 12 | extern void footbridge_restart(enum reboot_mode, const char *); |
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c index 90ea23fdce4c..1fd2cf097e30 100644 --- a/arch/arm/mach-footbridge/netwinder-hw.c +++ b/arch/arm/mach-footbridge/netwinder-hw.c | |||
@@ -634,9 +634,9 @@ fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi) | |||
634 | #endif | 634 | #endif |
635 | } | 635 | } |
636 | 636 | ||
637 | static void netwinder_restart(char mode, const char *cmd) | 637 | static void netwinder_restart(enum reboot_mode mode, const char *cmd) |
638 | { | 638 | { |
639 | if (mode == 's') { | 639 | if (mode == REBOOT_SOFT) { |
640 | /* Jump into the ROM */ | 640 | /* Jump into the ROM */ |
641 | soft_restart(0x41000000); | 641 | soft_restart(0x41000000); |
642 | } else { | 642 | } else { |
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h index 3f65206a9b92..aea1ec5ab6f8 100644 --- a/arch/arm/mach-highbank/core.h +++ b/arch/arm/mach-highbank/core.h | |||
@@ -1,8 +1,10 @@ | |||
1 | #ifndef __HIGHBANK_CORE_H | 1 | #ifndef __HIGHBANK_CORE_H |
2 | #define __HIGHBANK_CORE_H | 2 | #define __HIGHBANK_CORE_H |
3 | 3 | ||
4 | #include <linux/reboot.h> | ||
5 | |||
4 | extern void highbank_set_cpu_jump(int cpu, void *jump_addr); | 6 | extern void highbank_set_cpu_jump(int cpu, void *jump_addr); |
5 | extern void highbank_restart(char, const char *); | 7 | extern void highbank_restart(enum reboot_mode, const char *); |
6 | extern void __iomem *scu_base_addr; | 8 | extern void __iomem *scu_base_addr; |
7 | 9 | ||
8 | #ifdef CONFIG_PM_SLEEP | 10 | #ifdef CONFIG_PM_SLEEP |
diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c index 37d8384dcf19..2df5870b7583 100644 --- a/arch/arm/mach-highbank/system.c +++ b/arch/arm/mach-highbank/system.c | |||
@@ -15,13 +15,14 @@ | |||
15 | */ | 15 | */ |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
18 | #include <linux/reboot.h> | ||
18 | 19 | ||
19 | #include "core.h" | 20 | #include "core.h" |
20 | #include "sysregs.h" | 21 | #include "sysregs.h" |
21 | 22 | ||
22 | void highbank_restart(char mode, const char *cmd) | 23 | void highbank_restart(enum reboot_mode mode, const char *cmd) |
23 | { | 24 | { |
24 | if (mode == 'h') | 25 | if (mode == REBOOT_HARD) |
25 | highbank_set_pwr_hard_reset(); | 26 | highbank_set_pwr_hard_reset(); |
26 | else | 27 | else |
27 | highbank_set_pwr_soft_reset(); | 28 | highbank_set_pwr_soft_reset(); |
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index ee78847abf47..cb6c838b63ed 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ASM_ARCH_MXC_COMMON_H__ | 11 | #ifndef __ASM_ARCH_MXC_COMMON_H__ |
12 | #define __ASM_ARCH_MXC_COMMON_H__ | 12 | #define __ASM_ARCH_MXC_COMMON_H__ |
13 | 13 | ||
14 | #include <linux/reboot.h> | ||
15 | |||
14 | struct platform_device; | 16 | struct platform_device; |
15 | struct pt_regs; | 17 | struct pt_regs; |
16 | struct clk; | 18 | struct clk; |
@@ -71,7 +73,7 @@ extern int mx53_clocks_init_dt(void); | |||
71 | extern struct platform_device *mxc_register_gpio(char *name, int id, | 73 | extern struct platform_device *mxc_register_gpio(char *name, int id, |
72 | resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); | 74 | resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); |
73 | extern void mxc_set_cpu_type(unsigned int type); | 75 | extern void mxc_set_cpu_type(unsigned int type); |
74 | extern void mxc_restart(char, const char *); | 76 | extern void mxc_restart(enum reboot_mode, const char *); |
75 | extern void mxc_arch_reset_init(void __iomem *); | 77 | extern void mxc_arch_reset_init(void __iomem *); |
76 | extern void mxc_arch_reset_init_dt(void); | 78 | extern void mxc_arch_reset_init_dt(void); |
77 | extern int mx53_revision(void); | 79 | extern int mx53_revision(void); |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index f5965220a4d8..7be13f8e69a0 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/of_platform.h> | 27 | #include <linux/of_platform.h> |
28 | #include <linux/opp.h> | 28 | #include <linux/opp.h> |
29 | #include <linux/phy.h> | 29 | #include <linux/phy.h> |
30 | #include <linux/reboot.h> | ||
30 | #include <linux/regmap.h> | 31 | #include <linux/regmap.h> |
31 | #include <linux/micrel_phy.h> | 32 | #include <linux/micrel_phy.h> |
32 | #include <linux/mfd/syscon.h> | 33 | #include <linux/mfd/syscon.h> |
@@ -67,7 +68,7 @@ static void __init imx6q_init_revision(void) | |||
67 | mxc_set_cpu_type(rev >> 16 & 0xff); | 68 | mxc_set_cpu_type(rev >> 16 & 0xff); |
68 | } | 69 | } |
69 | 70 | ||
70 | static void imx6q_restart(char mode, const char *cmd) | 71 | static void imx6q_restart(enum reboot_mode mode, const char *cmd) |
71 | { | 72 | { |
72 | struct device_node *np; | 73 | struct device_node *np; |
73 | void __iomem *wdog_base; | 74 | void __iomem *wdog_base; |
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index 7cdc79a9657c..6fe81bb4d3c9 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c | |||
@@ -37,7 +37,7 @@ static struct clk *wdog_clk; | |||
37 | /* | 37 | /* |
38 | * Reset the system. It is called by machine_restart(). | 38 | * Reset the system. It is called by machine_restart(). |
39 | */ | 39 | */ |
40 | void mxc_restart(char mode, const char *cmd) | 40 | void mxc_restart(enum reboot_mode mode, const char *cmd) |
41 | { | 41 | { |
42 | unsigned int wcr_enable; | 42 | unsigned int wcr_enable; |
43 | 43 | ||
diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-integrator/common.h index 72516658be1e..ad0ac5547b2c 100644 --- a/arch/arm/mach-integrator/common.h +++ b/arch/arm/mach-integrator/common.h | |||
@@ -1,7 +1,8 @@ | |||
1 | #include <linux/reboot.h> | ||
1 | #include <linux/amba/serial.h> | 2 | #include <linux/amba/serial.h> |
2 | extern struct amba_pl010_data ap_uart_data; | 3 | extern struct amba_pl010_data ap_uart_data; |
3 | void integrator_init_early(void); | 4 | void integrator_init_early(void); |
4 | int integrator_init(bool is_cp); | 5 | int integrator_init(bool is_cp); |
5 | void integrator_reserve(void); | 6 | void integrator_reserve(void); |
6 | void integrator_restart(char, const char *); | 7 | void integrator_restart(enum reboot_mode, const char *); |
7 | void integrator_init_sysfs(struct device *parent, u32 id); | 8 | void integrator_init_sysfs(struct device *parent, u32 id); |
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 81461d218717..4cdfd7365925 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -124,7 +124,7 @@ void __init integrator_reserve(void) | |||
124 | /* | 124 | /* |
125 | * To reset, we hit the on-board reset register in the system FPGA | 125 | * To reset, we hit the on-board reset register in the system FPGA |
126 | */ | 126 | */ |
127 | void integrator_restart(char mode, const char *cmd) | 127 | void integrator_restart(enum reboot_mode mode, const char *cmd) |
128 | { | 128 | { |
129 | cm_control(CM_CTRL_RESET, CM_CTRL_RESET); | 129 | cm_control(CM_CTRL_RESET, CM_CTRL_RESET); |
130 | } | 130 | } |
diff --git a/arch/arm/mach-iop13xx/include/mach/iop13xx.h b/arch/arm/mach-iop13xx/include/mach/iop13xx.h index 7480f58267aa..17b40279e0a4 100644 --- a/arch/arm/mach-iop13xx/include/mach/iop13xx.h +++ b/arch/arm/mach-iop13xx/include/mach/iop13xx.h | |||
@@ -2,6 +2,9 @@ | |||
2 | #define _IOP13XX_HW_H_ | 2 | #define _IOP13XX_HW_H_ |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | |||
6 | #include <linux/reboot.h> | ||
7 | |||
5 | /* The ATU offsets can change based on the strapping */ | 8 | /* The ATU offsets can change based on the strapping */ |
6 | extern u32 iop13xx_atux_pmmr_offset; | 9 | extern u32 iop13xx_atux_pmmr_offset; |
7 | extern u32 iop13xx_atue_pmmr_offset; | 10 | extern u32 iop13xx_atue_pmmr_offset; |
@@ -11,7 +14,7 @@ void iop13xx_map_io(void); | |||
11 | void iop13xx_platform_init(void); | 14 | void iop13xx_platform_init(void); |
12 | void iop13xx_add_tpmi_devices(void); | 15 | void iop13xx_add_tpmi_devices(void); |
13 | void iop13xx_init_irq(void); | 16 | void iop13xx_init_irq(void); |
14 | void iop13xx_restart(char, const char *); | 17 | void iop13xx_restart(enum reboot_mode, const char *); |
15 | 18 | ||
16 | /* CPUID CP6 R0 Page 0 */ | 19 | /* CPUID CP6 R0 Page 0 */ |
17 | static inline int iop13xx_cpu_id(void) | 20 | static inline int iop13xx_cpu_id(void) |
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c index 1c5bd7637b05..96e6c7a6793b 100644 --- a/arch/arm/mach-iop13xx/setup.c +++ b/arch/arm/mach-iop13xx/setup.c | |||
@@ -594,7 +594,7 @@ __setup("iop13xx_init_adma", iop13xx_init_adma_setup); | |||
594 | __setup("iop13xx_init_uart", iop13xx_init_uart_setup); | 594 | __setup("iop13xx_init_uart", iop13xx_init_uart_setup); |
595 | __setup("iop13xx_init_i2c", iop13xx_init_i2c_setup); | 595 | __setup("iop13xx_init_i2c", iop13xx_init_i2c_setup); |
596 | 596 | ||
597 | void iop13xx_restart(char mode, const char *cmd) | 597 | void iop13xx_restart(enum reboot_mode mode, const char *cmd) |
598 | { | 598 | { |
599 | /* | 599 | /* |
600 | * Reset the internal bus (warning both cores are reset) | 600 | * Reset the internal bus (warning both cores are reset) |
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index ea0984a7449e..069144300b77 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
@@ -286,7 +286,7 @@ static void n2100_power_off(void) | |||
286 | ; | 286 | ; |
287 | } | 287 | } |
288 | 288 | ||
289 | static void n2100_restart(char mode, const char *cmd) | 289 | static void n2100_restart(enum reboot_mode mode, const char *cmd) |
290 | { | 290 | { |
291 | gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW); | 291 | gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW); |
292 | gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT); | 292 | gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT); |
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 1f6c1fb353ad..5327decde5a0 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -531,9 +531,9 @@ static void __init ixp4xx_clockevent_init(void) | |||
531 | 0xf, 0xfffffffe); | 531 | 0xf, 0xfffffffe); |
532 | } | 532 | } |
533 | 533 | ||
534 | void ixp4xx_restart(char mode, const char *cmd) | 534 | void ixp4xx_restart(enum reboot_mode mode, const char *cmd) |
535 | { | 535 | { |
536 | if ( 1 && mode == 's') { | 536 | if ( 1 && mode == REBOOT_SOFT) { |
537 | /* Jump into ROM at address 0 */ | 537 | /* Jump into ROM at address 0 */ |
538 | soft_restart(0); | 538 | soft_restart(0); |
539 | } else { | 539 | } else { |
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c index 5d413f8c5700..686ef34c69f5 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-setup.c +++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/i2c-gpio.h> | 28 | #include <linux/i2c-gpio.h> |
29 | 29 | ||
30 | #include <mach/hardware.h> | ||
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/flash.h> | 33 | #include <asm/mach/flash.h> |
diff --git a/arch/arm/mach-ixp4xx/include/mach/platform.h b/arch/arm/mach-ixp4xx/include/mach/platform.h index db5afb69c123..4c4c6a6f4526 100644 --- a/arch/arm/mach-ixp4xx/include/mach/platform.h +++ b/arch/arm/mach-ixp4xx/include/mach/platform.h | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #ifndef __ASSEMBLY__ | 14 | #ifndef __ASSEMBLY__ |
15 | 15 | ||
16 | #include <linux/reboot.h> | ||
17 | |||
16 | #include <asm/types.h> | 18 | #include <asm/types.h> |
17 | 19 | ||
18 | #ifndef __ARMEB__ | 20 | #ifndef __ARMEB__ |
@@ -123,7 +125,7 @@ extern void ixp4xx_init_early(void); | |||
123 | extern void ixp4xx_init_irq(void); | 125 | extern void ixp4xx_init_irq(void); |
124 | extern void ixp4xx_sys_init(void); | 126 | extern void ixp4xx_sys_init(void); |
125 | extern void ixp4xx_timer_init(void); | 127 | extern void ixp4xx_timer_init(void); |
126 | extern void ixp4xx_restart(char, const char *); | 128 | extern void ixp4xx_restart(enum reboot_mode, const char *); |
127 | extern void ixp4xx_pci_preinit(void); | 129 | extern void ixp4xx_pci_preinit(void); |
128 | struct pci_sys_data; | 130 | struct pci_sys_data; |
129 | extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); | 131 | extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 7c72c725b711..e9238b5567ee 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/mv643xx_i2c.h> | 20 | #include <linux/mv643xx_i2c.h> |
21 | #include <linux/timex.h> | 21 | #include <linux/timex.h> |
22 | #include <linux/kexec.h> | 22 | #include <linux/kexec.h> |
23 | #include <linux/reboot.h> | ||
23 | #include <net/dsa.h> | 24 | #include <net/dsa.h> |
24 | #include <asm/page.h> | 25 | #include <asm/page.h> |
25 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
@@ -722,7 +723,7 @@ void __init kirkwood_init(void) | |||
722 | #endif | 723 | #endif |
723 | } | 724 | } |
724 | 725 | ||
725 | void kirkwood_restart(char mode, const char *cmd) | 726 | void kirkwood_restart(enum reboot_mode mode, const char *cmd) |
726 | { | 727 | { |
727 | /* | 728 | /* |
728 | * Enable soft reset to assert RSTOUTn. | 729 | * Enable soft reset to assert RSTOUTn. |
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 1c09f3f93fbb..fcf3ba682e24 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ARCH_KIRKWOOD_COMMON_H | 11 | #ifndef __ARCH_KIRKWOOD_COMMON_H |
12 | #define __ARCH_KIRKWOOD_COMMON_H | 12 | #define __ARCH_KIRKWOOD_COMMON_H |
13 | 13 | ||
14 | #include <linux/reboot.h> | ||
15 | |||
14 | struct dsa_platform_data; | 16 | struct dsa_platform_data; |
15 | struct mv643xx_eth_platform_data; | 17 | struct mv643xx_eth_platform_data; |
16 | struct mv_sata_platform_data; | 18 | struct mv_sata_platform_data; |
@@ -53,7 +55,7 @@ void kirkwood_audio_init(void); | |||
53 | void kirkwood_cpuidle_init(void); | 55 | void kirkwood_cpuidle_init(void); |
54 | void kirkwood_cpufreq_init(void); | 56 | void kirkwood_cpufreq_init(void); |
55 | 57 | ||
56 | void kirkwood_restart(char, const char *); | 58 | void kirkwood_restart(enum reboot_mode, const char *); |
57 | void kirkwood_clk_init(void); | 59 | void kirkwood_clk_init(void); |
58 | 60 | ||
59 | /* board init functions for boards not fully converted to fdt */ | 61 | /* board init functions for boards not fully converted to fdt */ |
diff --git a/arch/arm/mach-ks8695/generic.h b/arch/arm/mach-ks8695/generic.h index 6e97ce462d73..43253f8e6de4 100644 --- a/arch/arm/mach-ks8695/generic.h +++ b/arch/arm/mach-ks8695/generic.h | |||
@@ -12,5 +12,5 @@ | |||
12 | 12 | ||
13 | extern __init void ks8695_map_io(void); | 13 | extern __init void ks8695_map_io(void); |
14 | extern __init void ks8695_init_irq(void); | 14 | extern __init void ks8695_init_irq(void); |
15 | extern void ks8695_restart(char, const char *); | 15 | extern void ks8695_restart(enum reboot_mode, const char *); |
16 | extern void ks8695_timer_init(void); | 16 | extern void ks8695_timer_init(void); |
diff --git a/arch/arm/mach-ks8695/time.c b/arch/arm/mach-ks8695/time.c index c272a3863d5f..426c97662f5b 100644 --- a/arch/arm/mach-ks8695/time.c +++ b/arch/arm/mach-ks8695/time.c | |||
@@ -154,11 +154,11 @@ void __init ks8695_timer_init(void) | |||
154 | setup_irq(KS8695_IRQ_TIMER1, &ks8695_timer_irq); | 154 | setup_irq(KS8695_IRQ_TIMER1, &ks8695_timer_irq); |
155 | } | 155 | } |
156 | 156 | ||
157 | void ks8695_restart(char mode, const char *cmd) | 157 | void ks8695_restart(enum reboot_mode reboot_mode, const char *cmd) |
158 | { | 158 | { |
159 | unsigned int reg; | 159 | unsigned int reg; |
160 | 160 | ||
161 | if (mode == 's') | 161 | if (reboot_mode == REBOOT_SOFT) |
162 | soft_restart(0); | 162 | soft_restart(0); |
163 | 163 | ||
164 | /* disable timer0 */ | 164 | /* disable timer0 */ |
diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c index 0d4db8c544b5..d7aa54c25c59 100644 --- a/arch/arm/mach-lpc32xx/common.c +++ b/arch/arm/mach-lpc32xx/common.c | |||
@@ -207,11 +207,11 @@ void __init lpc32xx_map_io(void) | |||
207 | iotable_init(lpc32xx_io_desc, ARRAY_SIZE(lpc32xx_io_desc)); | 207 | iotable_init(lpc32xx_io_desc, ARRAY_SIZE(lpc32xx_io_desc)); |
208 | } | 208 | } |
209 | 209 | ||
210 | void lpc23xx_restart(char mode, const char *cmd) | 210 | void lpc23xx_restart(enum reboot_mode mode, const char *cmd) |
211 | { | 211 | { |
212 | switch (mode) { | 212 | switch (mode) { |
213 | case 's': | 213 | case REBOOT_SOFT: |
214 | case 'h': | 214 | case REBOOT_HARD: |
215 | lpc32xx_watchdog_reset(); | 215 | lpc32xx_watchdog_reset(); |
216 | break; | 216 | break; |
217 | 217 | ||
diff --git a/arch/arm/mach-lpc32xx/common.h b/arch/arm/mach-lpc32xx/common.h index e0b26062a272..1cd8853b2f9b 100644 --- a/arch/arm/mach-lpc32xx/common.h +++ b/arch/arm/mach-lpc32xx/common.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <mach/board.h> | 22 | #include <mach/board.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/reboot.h> | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * Other arch specific structures and functions | 27 | * Other arch specific structures and functions |
@@ -29,7 +30,7 @@ extern void lpc32xx_timer_init(void); | |||
29 | extern void __init lpc32xx_init_irq(void); | 30 | extern void __init lpc32xx_init_irq(void); |
30 | extern void __init lpc32xx_map_io(void); | 31 | extern void __init lpc32xx_map_io(void); |
31 | extern void __init lpc32xx_serial_init(void); | 32 | extern void __init lpc32xx_serial_init(void); |
32 | extern void lpc23xx_restart(char, const char *); | 33 | extern void lpc23xx_restart(enum reboot_mode, const char *); |
33 | 34 | ||
34 | 35 | ||
35 | /* | 36 | /* |
diff --git a/arch/arm/mach-mmp/common.c b/arch/arm/mach-mmp/common.c index 9292b7966e3b..c03b4ab582db 100644 --- a/arch/arm/mach-mmp/common.c +++ b/arch/arm/mach-mmp/common.c | |||
@@ -47,7 +47,7 @@ void __init mmp_map_io(void) | |||
47 | mmp_chip_id = __raw_readl(MMP_CHIPID); | 47 | mmp_chip_id = __raw_readl(MMP_CHIPID); |
48 | } | 48 | } |
49 | 49 | ||
50 | void mmp_restart(char mode, const char *cmd) | 50 | void mmp_restart(enum reboot_mode mode, const char *cmd) |
51 | { | 51 | { |
52 | soft_restart(0); | 52 | soft_restart(0); |
53 | } | 53 | } |
diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h index 0bdc50b134ce..991d7e9877de 100644 --- a/arch/arm/mach-mmp/common.h +++ b/arch/arm/mach-mmp/common.h | |||
@@ -1,10 +1,11 @@ | |||
1 | #include <linux/reboot.h> | ||
1 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) | 2 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) |
2 | 3 | ||
3 | extern void timer_init(int irq); | 4 | extern void timer_init(int irq); |
4 | 5 | ||
5 | extern void __init icu_init_irq(void); | 6 | extern void __init icu_init_irq(void); |
6 | extern void __init mmp_map_io(void); | 7 | extern void __init mmp_map_io(void); |
7 | extern void mmp_restart(char, const char *); | 8 | extern void mmp_restart(enum reboot_mode, const char *); |
8 | extern void __init pxa168_clk_init(void); | 9 | extern void __init pxa168_clk_init(void); |
9 | extern void __init pxa910_clk_init(void); | 10 | extern void __init pxa910_clk_init(void); |
10 | extern void __init mmp2_clk_init(void); | 11 | extern void __init mmp2_clk_init(void); |
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h index 7ed1df21ea1c..459c2d03eb5c 100644 --- a/arch/arm/mach-mmp/include/mach/pxa168.h +++ b/arch/arm/mach-mmp/include/mach/pxa168.h | |||
@@ -1,9 +1,11 @@ | |||
1 | #ifndef __ASM_MACH_PXA168_H | 1 | #ifndef __ASM_MACH_PXA168_H |
2 | #define __ASM_MACH_PXA168_H | 2 | #define __ASM_MACH_PXA168_H |
3 | 3 | ||
4 | #include <linux/reboot.h> | ||
5 | |||
4 | extern void pxa168_timer_init(void); | 6 | extern void pxa168_timer_init(void); |
5 | extern void __init pxa168_init_irq(void); | 7 | extern void __init pxa168_init_irq(void); |
6 | extern void pxa168_restart(char, const char *); | 8 | extern void pxa168_restart(enum reboot_mode, const char *); |
7 | extern void pxa168_clear_keypad_wakeup(void); | 9 | extern void pxa168_clear_keypad_wakeup(void); |
8 | 10 | ||
9 | #include <linux/i2c.h> | 11 | #include <linux/i2c.h> |
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index a30dcf3b7d9e..144e997624c0 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
@@ -172,7 +172,7 @@ int __init pxa168_add_usb_host(struct mv_usb_platform_data *pdata) | |||
172 | return platform_device_register(&pxa168_device_usb_host); | 172 | return platform_device_register(&pxa168_device_usb_host); |
173 | } | 173 | } |
174 | 174 | ||
175 | void pxa168_restart(char mode, const char *cmd) | 175 | void pxa168_restart(enum reboot_mode mode, const char *cmd) |
176 | { | 176 | { |
177 | soft_restart(0xffff0000); | 177 | soft_restart(0xffff0000); |
178 | } | 178 | } |
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 749a7f8c4992..75062eff2494 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -413,7 +413,7 @@ void __init mv78xx0_init(void) | |||
413 | clk_init(); | 413 | clk_init(); |
414 | } | 414 | } |
415 | 415 | ||
416 | void mv78xx0_restart(char mode, const char *cmd) | 416 | void mv78xx0_restart(enum reboot_mode mode, const char *cmd) |
417 | { | 417 | { |
418 | /* | 418 | /* |
419 | * Enable soft reset to assert RSTOUTn. | 419 | * Enable soft reset to assert RSTOUTn. |
diff --git a/arch/arm/mach-mv78xx0/common.h b/arch/arm/mach-mv78xx0/common.h index 5e9485bad0ac..6889af26077d 100644 --- a/arch/arm/mach-mv78xx0/common.h +++ b/arch/arm/mach-mv78xx0/common.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ARCH_MV78XX0_COMMON_H | 11 | #ifndef __ARCH_MV78XX0_COMMON_H |
12 | #define __ARCH_MV78XX0_COMMON_H | 12 | #define __ARCH_MV78XX0_COMMON_H |
13 | 13 | ||
14 | #include <linux/reboot.h> | ||
15 | |||
14 | struct mv643xx_eth_platform_data; | 16 | struct mv643xx_eth_platform_data; |
15 | struct mv_sata_platform_data; | 17 | struct mv_sata_platform_data; |
16 | 18 | ||
@@ -45,7 +47,7 @@ void mv78xx0_uart1_init(void); | |||
45 | void mv78xx0_uart2_init(void); | 47 | void mv78xx0_uart2_init(void); |
46 | void mv78xx0_uart3_init(void); | 48 | void mv78xx0_uart3_init(void); |
47 | void mv78xx0_i2c_init(void); | 49 | void mv78xx0_i2c_init(void); |
48 | void mv78xx0_restart(char, const char *); | 50 | void mv78xx0_restart(enum reboot_mode, const char *); |
49 | 51 | ||
50 | extern void mv78xx0_timer_init(void); | 52 | extern void mv78xx0_timer_init(void); |
51 | 53 | ||
diff --git a/arch/arm/mach-mvebu/common.h b/arch/arm/mach-mvebu/common.h index 98defd5e92cd..e366010e1d91 100644 --- a/arch/arm/mach-mvebu/common.h +++ b/arch/arm/mach-mvebu/common.h | |||
@@ -17,7 +17,9 @@ | |||
17 | 17 | ||
18 | #define ARMADA_XP_MAX_CPUS 4 | 18 | #define ARMADA_XP_MAX_CPUS 4 |
19 | 19 | ||
20 | void mvebu_restart(char mode, const char *cmd); | 20 | #include <linux/reboot.h> |
21 | |||
22 | void mvebu_restart(enum reboot_mode mode, const char *cmd); | ||
21 | 23 | ||
22 | void armada_370_xp_init_irq(void); | 24 | void armada_370_xp_init_irq(void); |
23 | void armada_370_xp_handle_irq(struct pt_regs *regs); | 25 | void armada_370_xp_handle_irq(struct pt_regs *regs); |
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c index b8079df8c986..f875124ff4f9 100644 --- a/arch/arm/mach-mvebu/system-controller.c +++ b/arch/arm/mach-mvebu/system-controller.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/reboot.h> | ||
29 | 30 | ||
30 | static void __iomem *system_controller_base; | 31 | static void __iomem *system_controller_base; |
31 | 32 | ||
@@ -63,7 +64,7 @@ static struct of_device_id of_system_controller_table[] = { | |||
63 | { /* end of list */ }, | 64 | { /* end of list */ }, |
64 | }; | 65 | }; |
65 | 66 | ||
66 | void mvebu_restart(char mode, const char *cmd) | 67 | void mvebu_restart(enum reboot_mode mode, const char *cmd) |
67 | { | 68 | { |
68 | if (!system_controller_base) { | 69 | if (!system_controller_base) { |
69 | pr_err("Cannot restart, system-controller not available: check the device tree\n"); | 70 | pr_err("Cannot restart, system-controller not available: check the device tree\n"); |
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 7fa611c1b287..6298adb8d335 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/irqchip/mxs.h> | 22 | #include <linux/irqchip/mxs.h> |
23 | #include <linux/reboot.h> | ||
23 | #include <linux/micrel_phy.h> | 24 | #include <linux/micrel_phy.h> |
24 | #include <linux/of_address.h> | 25 | #include <linux/of_address.h> |
25 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
@@ -500,7 +501,7 @@ static void __init mxs_machine_init(void) | |||
500 | /* | 501 | /* |
501 | * Reset the system. It is called by machine_restart(). | 502 | * Reset the system. It is called by machine_restart(). |
502 | */ | 503 | */ |
503 | static void mxs_restart(char mode, const char *cmd) | 504 | static void mxs_restart(enum reboot_mode mode, const char *cmd) |
504 | { | 505 | { |
505 | struct device_node *np; | 506 | struct device_node *np; |
506 | void __iomem *reset_addr; | 507 | void __iomem *reset_addr; |
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c index 1504b68f4c66..db25b0cef3a7 100644 --- a/arch/arm/mach-netx/generic.c +++ b/arch/arm/mach-netx/generic.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/irqchip/arm-vic.h> | 26 | #include <linux/irqchip/arm-vic.h> |
27 | #include <linux/reboot.h> | ||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
29 | #include <mach/netx-regs.h> | 30 | #include <mach/netx-regs.h> |
@@ -187,7 +188,7 @@ static int __init netx_init(void) | |||
187 | 188 | ||
188 | subsys_initcall(netx_init); | 189 | subsys_initcall(netx_init); |
189 | 190 | ||
190 | void netx_restart(char mode, const char *cmd) | 191 | void netx_restart(enum reboot_mode mode, const char *cmd) |
191 | { | 192 | { |
192 | writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES, | 193 | writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES, |
193 | NETX_SYSTEM_RES_CR); | 194 | NETX_SYSTEM_RES_CR); |
diff --git a/arch/arm/mach-netx/generic.h b/arch/arm/mach-netx/generic.h index 768b26bbb42b..bb2ce471cc28 100644 --- a/arch/arm/mach-netx/generic.h +++ b/arch/arm/mach-netx/generic.h | |||
@@ -17,8 +17,10 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/reboot.h> | ||
21 | |||
20 | extern void __init netx_map_io(void); | 22 | extern void __init netx_map_io(void); |
21 | extern void __init netx_init_irq(void); | 23 | extern void __init netx_init_irq(void); |
22 | extern void netx_restart(char, const char *); | 24 | extern void netx_restart(enum reboot_mode, const char *); |
23 | 25 | ||
24 | extern void netx_timer_init(void); | 26 | extern void netx_timer_init(void); |
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 2df209ed1a07..13e0df9c11ce 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c | |||
@@ -103,7 +103,7 @@ static void __init cpu8815_map_io(void) | |||
103 | iotable_init(cpu8815_io_desc, ARRAY_SIZE(cpu8815_io_desc)); | 103 | iotable_init(cpu8815_io_desc, ARRAY_SIZE(cpu8815_io_desc)); |
104 | } | 104 | } |
105 | 105 | ||
106 | static void cpu8815_restart(char mode, const char *cmd) | 106 | static void cpu8815_restart(enum reboot_mode mode, const char *cmd) |
107 | { | 107 | { |
108 | void __iomem *srcbase = ioremap(NOMADIK_SRC_BASE, SZ_4K); | 108 | void __iomem *srcbase = ioremap(NOMADIK_SRC_BASE, SZ_4K); |
109 | 109 | ||
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 6c116e1a4b01..4677a9ccb3cb 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/serial_reg.h> | 26 | #include <linux/serial_reg.h> |
27 | #include <linux/smc91x.h> | 27 | #include <linux/smc91x.h> |
28 | #include <linux/export.h> | 28 | #include <linux/export.h> |
29 | #include <linux/reboot.h> | ||
29 | 30 | ||
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
@@ -215,7 +216,7 @@ void voiceblue_wdt_ping(void) | |||
215 | gpio_set_value(0, wdt_gpio_state); | 216 | gpio_set_value(0, wdt_gpio_state); |
216 | } | 217 | } |
217 | 218 | ||
218 | static void voiceblue_restart(char mode, const char *cmd) | 219 | static void voiceblue_restart(enum reboot_mode mode, const char *cmd) |
219 | { | 220 | { |
220 | /* | 221 | /* |
221 | * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 | 222 | * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 |
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h index 14f7e9920479..abec019a5281 100644 --- a/arch/arm/mach-omap1/common.h +++ b/arch/arm/mach-omap1/common.h | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/mtd/mtd.h> | 29 | #include <linux/mtd/mtd.h> |
30 | #include <linux/i2c-omap.h> | 30 | #include <linux/i2c-omap.h> |
31 | #include <linux/reboot.h> | ||
31 | 32 | ||
32 | #include <plat/i2c.h> | 33 | #include <plat/i2c.h> |
33 | 34 | ||
@@ -70,7 +71,7 @@ static inline int omap_serial_wakeup_init(void) | |||
70 | void omap1_init_early(void); | 71 | void omap1_init_early(void); |
71 | void omap1_init_irq(void); | 72 | void omap1_init_irq(void); |
72 | void omap1_init_late(void); | 73 | void omap1_init_late(void); |
73 | void omap1_restart(char, const char *); | 74 | void omap1_restart(enum reboot_mode, const char *); |
74 | 75 | ||
75 | extern void __init omap_check_revision(void); | 76 | extern void __init omap_check_revision(void); |
76 | 77 | ||
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c index 5eebd7e889d0..72bf4bf4a702 100644 --- a/arch/arm/mach-omap1/reset.c +++ b/arch/arm/mach-omap1/reset.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/io.h> | 5 | #include <linux/io.h> |
6 | #include <linux/reboot.h> | ||
6 | 7 | ||
7 | #include <mach/hardware.h> | 8 | #include <mach/hardware.h> |
8 | 9 | ||
@@ -22,7 +23,7 @@ | |||
22 | #define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5 | 23 | #define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5 |
23 | 24 | ||
24 | 25 | ||
25 | void omap1_restart(char mode, const char *cmd) | 26 | void omap1_restart(enum reboot_mode mode, const char *cmd) |
26 | { | 27 | { |
27 | /* | 28 | /* |
28 | * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 | 29 | * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 |
diff --git a/arch/arm/mach-omap2/am33xx-restart.c b/arch/arm/mach-omap2/am33xx-restart.c index 88e4fa8af031..1eae96212315 100644 --- a/arch/arm/mach-omap2/am33xx-restart.c +++ b/arch/arm/mach-omap2/am33xx-restart.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/reboot.h> | ||
9 | 10 | ||
10 | #include "common.h" | 11 | #include "common.h" |
11 | #include "prm-regbits-33xx.h" | 12 | #include "prm-regbits-33xx.h" |
@@ -19,7 +20,7 @@ | |||
19 | * Resets the SoC. For @cmd, see the 'reboot' syscall in | 20 | * Resets the SoC. For @cmd, see the 'reboot' syscall in |
20 | * kernel/sys.c. No return value. | 21 | * kernel/sys.c. No return value. |
21 | */ | 22 | */ |
22 | void am33xx_restart(char mode, const char *cmd) | 23 | void am33xx_restart(enum reboot_mode mode, const char *cmd) |
23 | { | 24 | { |
24 | /* TODO: Handle mode and cmd if necessary */ | 25 | /* TODO: Handle mode and cmd if necessary */ |
25 | 26 | ||
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 72cab3f4f16d..dfcc182ecff9 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
32 | #include <linux/i2c/twl.h> | 32 | #include <linux/i2c/twl.h> |
33 | #include <linux/i2c-omap.h> | 33 | #include <linux/i2c-omap.h> |
34 | #include <linux/reboot.h> | ||
34 | 35 | ||
35 | #include <asm/proc-fns.h> | 36 | #include <asm/proc-fns.h> |
36 | 37 | ||
@@ -119,33 +120,33 @@ static inline void omap_soc_device_init(void) | |||
119 | #endif | 120 | #endif |
120 | 121 | ||
121 | #if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) | 122 | #if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) |
122 | void omap2xxx_restart(char mode, const char *cmd); | 123 | void omap2xxx_restart(enum reboot_mode mode, const char *cmd); |
123 | #else | 124 | #else |
124 | static inline void omap2xxx_restart(char mode, const char *cmd) | 125 | static inline void omap2xxx_restart(enum reboot_mode mode, const char *cmd) |
125 | { | 126 | { |
126 | } | 127 | } |
127 | #endif | 128 | #endif |
128 | 129 | ||
129 | #ifdef CONFIG_SOC_AM33XX | 130 | #ifdef CONFIG_SOC_AM33XX |
130 | void am33xx_restart(char mode, const char *cmd); | 131 | void am33xx_restart(enum reboot_mode mode, const char *cmd); |
131 | #else | 132 | #else |
132 | static inline void am33xx_restart(char mode, const char *cmd) | 133 | static inline void am33xx_restart(enum reboot_mode mode, const char *cmd) |
133 | { | 134 | { |
134 | } | 135 | } |
135 | #endif | 136 | #endif |
136 | 137 | ||
137 | #ifdef CONFIG_ARCH_OMAP3 | 138 | #ifdef CONFIG_ARCH_OMAP3 |
138 | void omap3xxx_restart(char mode, const char *cmd); | 139 | void omap3xxx_restart(enum reboot_mode mode, const char *cmd); |
139 | #else | 140 | #else |
140 | static inline void omap3xxx_restart(char mode, const char *cmd) | 141 | static inline void omap3xxx_restart(enum reboot_mode mode, const char *cmd) |
141 | { | 142 | { |
142 | } | 143 | } |
143 | #endif | 144 | #endif |
144 | 145 | ||
145 | #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) | 146 | #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) |
146 | void omap44xx_restart(char mode, const char *cmd); | 147 | void omap44xx_restart(enum reboot_mode mode, const char *cmd); |
147 | #else | 148 | #else |
148 | static inline void omap44xx_restart(char mode, const char *cmd) | 149 | static inline void omap44xx_restart(enum reboot_mode mode, const char *cmd) |
149 | { | 150 | { |
150 | } | 151 | } |
151 | #endif | 152 | #endif |
diff --git a/arch/arm/mach-omap2/omap2-restart.c b/arch/arm/mach-omap2/omap2-restart.c index 719b716a4494..68423e26399d 100644 --- a/arch/arm/mach-omap2/omap2-restart.c +++ b/arch/arm/mach-omap2/omap2-restart.c | |||
@@ -31,7 +31,7 @@ static struct clk *reset_virt_prcm_set_ck, *reset_sys_ck; | |||
31 | * Set the DPLL to bypass so that reboot completes successfully. No | 31 | * Set the DPLL to bypass so that reboot completes successfully. No |
32 | * return value. | 32 | * return value. |
33 | */ | 33 | */ |
34 | void omap2xxx_restart(char mode, const char *cmd) | 34 | void omap2xxx_restart(enum reboot_mode mode, const char *cmd) |
35 | { | 35 | { |
36 | u32 rate; | 36 | u32 rate; |
37 | 37 | ||
diff --git a/arch/arm/mach-omap2/omap3-restart.c b/arch/arm/mach-omap2/omap3-restart.c index 923c582189e5..5de2a0c2979d 100644 --- a/arch/arm/mach-omap2/omap3-restart.c +++ b/arch/arm/mach-omap2/omap3-restart.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/reboot.h> | ||
15 | 16 | ||
16 | #include "iomap.h" | 17 | #include "iomap.h" |
17 | #include "common.h" | 18 | #include "common.h" |
@@ -28,7 +29,7 @@ | |||
28 | * Resets the SoC. For @cmd, see the 'reboot' syscall in | 29 | * Resets the SoC. For @cmd, see the 'reboot' syscall in |
29 | * kernel/sys.c. No return value. | 30 | * kernel/sys.c. No return value. |
30 | */ | 31 | */ |
31 | void omap3xxx_restart(char mode, const char *cmd) | 32 | void omap3xxx_restart(enum reboot_mode mode, const char *cmd) |
32 | { | 33 | { |
33 | omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); | 34 | omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); |
34 | omap3xxx_prm_dpll3_reset(); /* never returns */ | 35 | omap3xxx_prm_dpll3_reset(); /* never returns */ |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 38cd3a69cff3..57911430324e 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/export.h> | 23 | #include <linux/export.h> |
24 | #include <linux/irqchip/arm-gic.h> | 24 | #include <linux/irqchip/arm-gic.h> |
25 | #include <linux/of_address.h> | 25 | #include <linux/of_address.h> |
26 | #include <linux/reboot.h> | ||
26 | 27 | ||
27 | #include <asm/hardware/cache-l2x0.h> | 28 | #include <asm/hardware/cache-l2x0.h> |
28 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-omap2/omap4-restart.c b/arch/arm/mach-omap2/omap4-restart.c index f90e02e11898..41dfd7da8170 100644 --- a/arch/arm/mach-omap2/omap4-restart.c +++ b/arch/arm/mach-omap2/omap4-restart.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/reboot.h> | ||
11 | #include "prminst44xx.h" | 12 | #include "prminst44xx.h" |
12 | 13 | ||
13 | /** | 14 | /** |
@@ -18,7 +19,7 @@ | |||
18 | * Resets the SoC. For @cmd, see the 'reboot' syscall in | 19 | * Resets the SoC. For @cmd, see the 'reboot' syscall in |
19 | * kernel/sys.c. No return value. | 20 | * kernel/sys.c. No return value. |
20 | */ | 21 | */ |
21 | void omap44xx_restart(char mode, const char *cmd) | 22 | void omap44xx_restart(enum reboot_mode mode, const char *cmd) |
22 | { | 23 | { |
23 | /* XXX Should save 'cmd' into scratchpad for use after reboot */ | 24 | /* XXX Should save 'cmd' into scratchpad for use after reboot */ |
24 | omap4_prminst_global_warm_sw_reset(); /* never returns */ | 25 | omap4_prminst_global_warm_sw_reset(); /* never returns */ |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index f8a6db9239bf..b41599f98a8e 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -347,7 +347,7 @@ void __init orion5x_init(void) | |||
347 | orion5x_wdt_init(); | 347 | orion5x_wdt_init(); |
348 | } | 348 | } |
349 | 349 | ||
350 | void orion5x_restart(char mode, const char *cmd) | 350 | void orion5x_restart(enum reboot_mode mode, const char *cmd) |
351 | { | 351 | { |
352 | /* | 352 | /* |
353 | * Enable and issue soft reset | 353 | * Enable and issue soft reset |
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index cdaa01f3d186..a909afb384fb 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ARCH_ORION5X_COMMON_H | 1 | #ifndef __ARCH_ORION5X_COMMON_H |
2 | #define __ARCH_ORION5X_COMMON_H | 2 | #define __ARCH_ORION5X_COMMON_H |
3 | 3 | ||
4 | #include <linux/reboot.h> | ||
5 | |||
4 | struct dsa_platform_data; | 6 | struct dsa_platform_data; |
5 | struct mv643xx_eth_platform_data; | 7 | struct mv643xx_eth_platform_data; |
6 | struct mv_sata_platform_data; | 8 | struct mv_sata_platform_data; |
@@ -29,7 +31,7 @@ void orion5x_spi_init(void); | |||
29 | void orion5x_uart0_init(void); | 31 | void orion5x_uart0_init(void); |
30 | void orion5x_uart1_init(void); | 32 | void orion5x_uart1_init(void); |
31 | void orion5x_xor_init(void); | 33 | void orion5x_xor_init(void); |
32 | void orion5x_restart(char, const char *); | 34 | void orion5x_restart(enum reboot_mode, const char *); |
33 | 35 | ||
34 | /* | 36 | /* |
35 | * PCIe/PCI functions. | 37 | * PCIe/PCI functions. |
diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c index 24f4e14e5893..6234977b5aea 100644 --- a/arch/arm/mach-orion5x/ls-chl-setup.c +++ b/arch/arm/mach-orion5x/ls-chl-setup.c | |||
@@ -139,7 +139,7 @@ static struct mv_sata_platform_data lschl_sata_data = { | |||
139 | 139 | ||
140 | static void lschl_power_off(void) | 140 | static void lschl_power_off(void) |
141 | { | 141 | { |
142 | orion5x_restart('h', NULL); | 142 | orion5x_restart(REBOOT_HARD, NULL); |
143 | } | 143 | } |
144 | 144 | ||
145 | /***************************************************************************** | 145 | /***************************************************************************** |
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c index fc653bb41e78..fe04c4b64569 100644 --- a/arch/arm/mach-orion5x/ls_hgl-setup.c +++ b/arch/arm/mach-orion5x/ls_hgl-setup.c | |||
@@ -185,7 +185,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = { | |||
185 | 185 | ||
186 | static void ls_hgl_power_off(void) | 186 | static void ls_hgl_power_off(void) |
187 | { | 187 | { |
188 | orion5x_restart('h', NULL); | 188 | orion5x_restart(REBOOT_HARD, NULL); |
189 | } | 189 | } |
190 | 190 | ||
191 | 191 | ||
diff --git a/arch/arm/mach-orion5x/lsmini-setup.c b/arch/arm/mach-orion5x/lsmini-setup.c index 18e66e617dc2..ca4dbe973daf 100644 --- a/arch/arm/mach-orion5x/lsmini-setup.c +++ b/arch/arm/mach-orion5x/lsmini-setup.c | |||
@@ -185,7 +185,7 @@ static struct mv_sata_platform_data lsmini_sata_data = { | |||
185 | 185 | ||
186 | static void lsmini_power_off(void) | 186 | static void lsmini_power_off(void) |
187 | { | 187 | { |
188 | orion5x_restart('h', NULL); | 188 | orion5x_restart(REBOOT_HARD, NULL); |
189 | } | 189 | } |
190 | 190 | ||
191 | 191 | ||
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c index b13f51bc35cf..ec79fea82704 100644 --- a/arch/arm/mach-picoxcell/common.c +++ b/arch/arm/mach-picoxcell/common.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/of.h> | 11 | #include <linux/of.h> |
12 | #include <linux/of_address.h> | 12 | #include <linux/of_address.h> |
13 | #include <linux/of_platform.h> | 13 | #include <linux/of_platform.h> |
14 | #include <linux/reboot.h> | ||
14 | 15 | ||
15 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
16 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
@@ -63,7 +64,7 @@ static const char *picoxcell_dt_match[] = { | |||
63 | NULL | 64 | NULL |
64 | }; | 65 | }; |
65 | 66 | ||
66 | static void picoxcell_wdt_restart(char mode, const char *cmd) | 67 | static void picoxcell_wdt_restart(enum reboot_mode mode, const char *cmd) |
67 | { | 68 | { |
68 | /* | 69 | /* |
69 | * Configure the watchdog to reset with the shortest possible timeout | 70 | * Configure the watchdog to reset with the shortest possible timeout |
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h index 81135cd88e54..a6304858474a 100644 --- a/arch/arm/mach-prima2/common.h +++ b/arch/arm/mach-prima2/common.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #define __MACH_PRIMA2_COMMON_H__ | 10 | #define __MACH_PRIMA2_COMMON_H__ |
11 | 11 | ||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/reboot.h> | ||
14 | |||
13 | #include <asm/mach/time.h> | 15 | #include <asm/mach/time.h> |
14 | #include <asm/exception.h> | 16 | #include <asm/exception.h> |
15 | 17 | ||
@@ -22,7 +24,7 @@ extern void sirfsoc_cpu_die(unsigned int cpu); | |||
22 | 24 | ||
23 | extern void __init sirfsoc_of_irq_init(void); | 25 | extern void __init sirfsoc_of_irq_init(void); |
24 | extern void __init sirfsoc_of_clk_init(void); | 26 | extern void __init sirfsoc_of_clk_init(void); |
25 | extern void sirfsoc_restart(char, const char *); | 27 | extern void sirfsoc_restart(enum reboot_mode, const char *); |
26 | extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); | 28 | extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); |
27 | 29 | ||
28 | #ifndef CONFIG_DEBUG_LL | 30 | #ifndef CONFIG_DEBUG_LL |
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c index d5e0cbc934c0..ccb53391147a 100644 --- a/arch/arm/mach-prima2/rstc.c +++ b/arch/arm/mach-prima2/rstc.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/of.h> | 14 | #include <linux/of.h> |
15 | #include <linux/of_address.h> | 15 | #include <linux/of_address.h> |
16 | #include <linux/reboot.h> | ||
16 | 17 | ||
17 | void __iomem *sirfsoc_rstc_base; | 18 | void __iomem *sirfsoc_rstc_base; |
18 | static DEFINE_MUTEX(rstc_lock); | 19 | static DEFINE_MUTEX(rstc_lock); |
@@ -84,7 +85,7 @@ int sirfsoc_reset_device(struct device *dev) | |||
84 | 85 | ||
85 | #define SIRFSOC_SYS_RST_BIT BIT(31) | 86 | #define SIRFSOC_SYS_RST_BIT BIT(31) |
86 | 87 | ||
87 | void sirfsoc_restart(char mode, const char *cmd) | 88 | void sirfsoc_restart(enum reboot_mode mode, const char *cmd) |
88 | { | 89 | { |
89 | writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); | 90 | writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); |
90 | } | 91 | } |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index a5b8fead7d61..f162f1b77cd2 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -663,16 +663,16 @@ static void corgi_poweroff(void) | |||
663 | /* Green LED off tells the bootloader to halt */ | 663 | /* Green LED off tells the bootloader to halt */ |
664 | gpio_set_value(CORGI_GPIO_LED_GREEN, 0); | 664 | gpio_set_value(CORGI_GPIO_LED_GREEN, 0); |
665 | 665 | ||
666 | pxa_restart('h', NULL); | 666 | pxa_restart(REBOOT_HARD, NULL); |
667 | } | 667 | } |
668 | 668 | ||
669 | static void corgi_restart(char mode, const char *cmd) | 669 | static void corgi_restart(enum reboot_mode mode, const char *cmd) |
670 | { | 670 | { |
671 | if (!machine_is_corgi()) | 671 | if (!machine_is_corgi()) |
672 | /* Green LED on tells the bootloader to reboot */ | 672 | /* Green LED on tells the bootloader to reboot */ |
673 | gpio_set_value(CORGI_GPIO_LED_GREEN, 1); | 673 | gpio_set_value(CORGI_GPIO_LED_GREEN, 1); |
674 | 674 | ||
675 | pxa_restart('h', cmd); | 675 | pxa_restart(REBOOT_HARD, cmd); |
676 | } | 676 | } |
677 | 677 | ||
678 | static void __init corgi_init(void) | 678 | static void __init corgi_init(void) |
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h index fd7ea39b78c0..8963984d1f43 100644 --- a/arch/arm/mach-pxa/generic.h +++ b/arch/arm/mach-pxa/generic.h | |||
@@ -9,6 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/reboot.h> | ||
13 | |||
12 | struct irq_data; | 14 | struct irq_data; |
13 | 15 | ||
14 | extern void pxa_timer_init(void); | 16 | extern void pxa_timer_init(void); |
@@ -56,4 +58,4 @@ void __init pxa_set_btuart_info(void *info); | |||
56 | void __init pxa_set_stuart_info(void *info); | 58 | void __init pxa_set_stuart_info(void *info); |
57 | void __init pxa_set_hwuart_info(void *info); | 59 | void __init pxa_set_hwuart_info(void *info); |
58 | 60 | ||
59 | void pxa_restart(char, const char *); | 61 | void pxa_restart(enum reboot_mode, const char *); |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index e6b0a936c150..acc9d3cc0762 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/wm97xx.h> | 37 | #include <linux/wm97xx.h> |
38 | #include <linux/mtd/physmap.h> | 38 | #include <linux/mtd/physmap.h> |
39 | #include <linux/usb/gpio_vbus.h> | 39 | #include <linux/usb/gpio_vbus.h> |
40 | #include <linux/reboot.h> | ||
40 | #include <linux/regulator/max1586.h> | 41 | #include <linux/regulator/max1586.h> |
41 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
42 | #include <linux/i2c/pxa-i2c.h> | 43 | #include <linux/i2c/pxa-i2c.h> |
@@ -696,13 +697,13 @@ static void mioa701_machine_exit(void); | |||
696 | static void mioa701_poweroff(void) | 697 | static void mioa701_poweroff(void) |
697 | { | 698 | { |
698 | mioa701_machine_exit(); | 699 | mioa701_machine_exit(); |
699 | pxa_restart('s', NULL); | 700 | pxa_restart(REBOOT_SOFT, NULL); |
700 | } | 701 | } |
701 | 702 | ||
702 | static void mioa701_restart(char c, const char *cmd) | 703 | static void mioa701_restart(enum reboot_mode c, const char *cmd) |
703 | { | 704 | { |
704 | mioa701_machine_exit(); | 705 | mioa701_machine_exit(); |
705 | pxa_restart('s', cmd); | 706 | pxa_restart(REBOOT_SOFT, cmd); |
706 | } | 707 | } |
707 | 708 | ||
708 | static struct gpio global_gpios[] = { | 709 | static struct gpio global_gpios[] = { |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 50ccd5f1d560..711d37e26bd8 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -422,7 +422,7 @@ static struct i2c_board_info __initdata poodle_i2c_devices[] = { | |||
422 | 422 | ||
423 | static void poodle_poweroff(void) | 423 | static void poodle_poweroff(void) |
424 | { | 424 | { |
425 | pxa_restart('h', NULL); | 425 | pxa_restart(REBOOT_HARD, NULL); |
426 | } | 426 | } |
427 | 427 | ||
428 | static void __init poodle_init(void) | 428 | static void __init poodle_init(void) |
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c index 3fab583755d4..0d5dd646f61f 100644 --- a/arch/arm/mach-pxa/reset.c +++ b/arch/arm/mach-pxa/reset.c | |||
@@ -83,7 +83,7 @@ static void do_hw_reset(void) | |||
83 | writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); | 83 | writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); |
84 | } | 84 | } |
85 | 85 | ||
86 | void pxa_restart(char mode, const char *cmd) | 86 | void pxa_restart(enum reboot_mode mode, const char *cmd) |
87 | { | 87 | { |
88 | local_irq_disable(); | 88 | local_irq_disable(); |
89 | local_fiq_disable(); | 89 | local_fiq_disable(); |
@@ -91,14 +91,14 @@ void pxa_restart(char mode, const char *cmd) | |||
91 | clear_reset_status(RESET_STATUS_ALL); | 91 | clear_reset_status(RESET_STATUS_ALL); |
92 | 92 | ||
93 | switch (mode) { | 93 | switch (mode) { |
94 | case 's': | 94 | case REBOOT_SOFT: |
95 | /* Jump into ROM at address 0 */ | 95 | /* Jump into ROM at address 0 */ |
96 | soft_restart(0); | 96 | soft_restart(0); |
97 | break; | 97 | break; |
98 | case 'g': | 98 | case REBOOT_GPIO: |
99 | do_gpio_reset(); | 99 | do_gpio_reset(); |
100 | break; | 100 | break; |
101 | case 'h': | 101 | case REBOOT_HARD: |
102 | default: | 102 | default: |
103 | do_hw_reset(); | 103 | do_hw_reset(); |
104 | break; | 104 | break; |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index c3c00424bb35..2125df0444e7 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/regulator/machine.h> | 31 | #include <linux/regulator/machine.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/reboot.h> | ||
34 | 35 | ||
35 | #include <asm/setup.h> | 36 | #include <asm/setup.h> |
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
@@ -924,10 +925,10 @@ static inline void spitz_i2c_init(void) {} | |||
924 | ******************************************************************************/ | 925 | ******************************************************************************/ |
925 | static void spitz_poweroff(void) | 926 | static void spitz_poweroff(void) |
926 | { | 927 | { |
927 | pxa_restart('g', NULL); | 928 | pxa_restart(REBOOT_GPIO, NULL); |
928 | } | 929 | } |
929 | 930 | ||
930 | static void spitz_restart(char mode, const char *cmd) | 931 | static void spitz_restart(enum reboot_mode mode, const char *cmd) |
931 | { | 932 | { |
932 | uint32_t msc0 = __raw_readl(MSC0); | 933 | uint32_t msc0 = __raw_readl(MSC0); |
933 | /* Bootloader magic for a reboot */ | 934 | /* Bootloader magic for a reboot */ |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index a41992fea720..0206b915a6f6 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/input/matrix_keypad.h> | 36 | #include <linux/input/matrix_keypad.h> |
37 | #include <linux/i2c/pxa-i2c.h> | 37 | #include <linux/i2c/pxa-i2c.h> |
38 | #include <linux/usb/gpio_vbus.h> | 38 | #include <linux/usb/gpio_vbus.h> |
39 | #include <linux/reboot.h> | ||
39 | 40 | ||
40 | #include <asm/setup.h> | 41 | #include <asm/setup.h> |
41 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
@@ -911,10 +912,10 @@ static struct platform_device *devices[] __initdata = { | |||
911 | 912 | ||
912 | static void tosa_poweroff(void) | 913 | static void tosa_poweroff(void) |
913 | { | 914 | { |
914 | pxa_restart('g', NULL); | 915 | pxa_restart(REBOOT_GPIO, NULL); |
915 | } | 916 | } |
916 | 917 | ||
917 | static void tosa_restart(char mode, const char *cmd) | 918 | static void tosa_restart(enum reboot_mode mode, const char *cmd) |
918 | { | 919 | { |
919 | uint32_t msc0 = __raw_readl(MSC0); | 920 | uint32_t msc0 = __raw_readl(MSC0); |
920 | 921 | ||
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 5b1c8bfe6fa9..c85ddb2a0ad0 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/irqchip/arm-gic.h> | 30 | #include <linux/irqchip/arm-gic.h> |
31 | #include <linux/platform_data/clk-realview.h> | 31 | #include <linux/platform_data/clk-realview.h> |
32 | #include <linux/reboot.h> | ||
32 | 33 | ||
33 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
@@ -418,7 +419,7 @@ static void __init realview_eb_timer_init(void) | |||
418 | realview_eb_twd_init(); | 419 | realview_eb_twd_init(); |
419 | } | 420 | } |
420 | 421 | ||
421 | static void realview_eb_restart(char mode, const char *cmd) | 422 | static void realview_eb_restart(enum reboot_mode mode, const char *cmd) |
422 | { | 423 | { |
423 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); | 424 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); |
424 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); | 425 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index d5e83a1f6982..c5eade76461b 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
32 | #include <linux/irqchip/arm-gic.h> | 32 | #include <linux/irqchip/arm-gic.h> |
33 | #include <linux/platform_data/clk-realview.h> | 33 | #include <linux/platform_data/clk-realview.h> |
34 | #include <linux/reboot.h> | ||
34 | 35 | ||
35 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
36 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
@@ -329,7 +330,7 @@ static void __init realview_pb1176_timer_init(void) | |||
329 | realview_timer_init(IRQ_DC1176_TIMER0); | 330 | realview_timer_init(IRQ_DC1176_TIMER0); |
330 | } | 331 | } |
331 | 332 | ||
332 | static void realview_pb1176_restart(char mode, const char *cmd) | 333 | static void realview_pb1176_restart(enum reboot_mode mode, const char *cmd) |
333 | { | 334 | { |
334 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); | 335 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); |
335 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); | 336 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index c3cfe213b5e6..f4b0962578fe 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/irqchip/arm-gic.h> | 30 | #include <linux/irqchip/arm-gic.h> |
31 | #include <linux/platform_data/clk-realview.h> | 31 | #include <linux/platform_data/clk-realview.h> |
32 | #include <linux/reboot.h> | ||
32 | 33 | ||
33 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
@@ -316,7 +317,7 @@ static void __init realview_pb11mp_timer_init(void) | |||
316 | realview_pb11mp_twd_init(); | 317 | realview_pb11mp_twd_init(); |
317 | } | 318 | } |
318 | 319 | ||
319 | static void realview_pb11mp_restart(char mode, const char *cmd) | 320 | static void realview_pb11mp_restart(enum reboot_mode mode, const char *cmd) |
320 | { | 321 | { |
321 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); | 322 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); |
322 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); | 323 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index dde652a59620..10a3e1d76891 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/irqchip/arm-gic.h> | 30 | #include <linux/irqchip/arm-gic.h> |
31 | #include <linux/platform_data/clk-realview.h> | 31 | #include <linux/platform_data/clk-realview.h> |
32 | #include <linux/reboot.h> | ||
32 | 33 | ||
33 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
34 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
@@ -264,7 +265,7 @@ static void __init realview_pba8_timer_init(void) | |||
264 | realview_timer_init(IRQ_PBA8_TIMER0_1); | 265 | realview_timer_init(IRQ_PBA8_TIMER0_1); |
265 | } | 266 | } |
266 | 267 | ||
267 | static void realview_pba8_restart(char mode, const char *cmd) | 268 | static void realview_pba8_restart(enum reboot_mode mode, const char *cmd) |
268 | { | 269 | { |
269 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); | 270 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); |
270 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); | 271 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index 54f0185b01e3..9d75493e3f0c 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/irqchip/arm-gic.h> | 29 | #include <linux/irqchip/arm-gic.h> |
30 | #include <linux/platform_data/clk-realview.h> | 30 | #include <linux/platform_data/clk-realview.h> |
31 | #include <linux/reboot.h> | ||
31 | 32 | ||
32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
@@ -344,7 +345,7 @@ static void realview_pbx_fixup(struct tag *tags, char **from, | |||
344 | #endif | 345 | #endif |
345 | } | 346 | } |
346 | 347 | ||
347 | static void realview_pbx_restart(char mode, const char *cmd) | 348 | static void realview_pbx_restart(enum reboot_mode mode, const char *cmd) |
348 | { | 349 | { |
349 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); | 350 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); |
350 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); | 351 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); |
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c index a302cf5e0fc7..09d602b10d57 100644 --- a/arch/arm/mach-rpc/riscpc.c +++ b/arch/arm/mach-rpc/riscpc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/ata_platform.h> | 20 | #include <linux/ata_platform.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/reboot.h> | ||
23 | 24 | ||
24 | #include <asm/elf.h> | 25 | #include <asm/elf.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
@@ -201,7 +202,7 @@ static int __init rpc_init(void) | |||
201 | 202 | ||
202 | arch_initcall(rpc_init); | 203 | arch_initcall(rpc_init); |
203 | 204 | ||
204 | static void rpc_restart(char mode, const char *cmd) | 205 | static void rpc_restart(enum reboot_mode mode, const char *cmd) |
205 | { | 206 | { |
206 | iomd_writeb(0, IOMD_ROMCR0); | 207 | iomd_writeb(0, IOMD_ROMCR0); |
207 | 208 | ||
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h index 307c3714be55..84b280654f4c 100644 --- a/arch/arm/mach-s3c24xx/common.h +++ b/arch/arm/mach-s3c24xx/common.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H |
13 | #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__ | 13 | #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__ |
14 | 14 | ||
15 | #include <linux/reboot.h> | ||
16 | |||
15 | struct s3c2410_uartcfg; | 17 | struct s3c2410_uartcfg; |
16 | 18 | ||
17 | #ifdef CONFIG_CPU_S3C2410 | 19 | #ifdef CONFIG_CPU_S3C2410 |
@@ -20,7 +22,7 @@ extern int s3c2410a_init(void); | |||
20 | extern void s3c2410_map_io(void); | 22 | extern void s3c2410_map_io(void); |
21 | extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 23 | extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
22 | extern void s3c2410_init_clocks(int xtal); | 24 | extern void s3c2410_init_clocks(int xtal); |
23 | extern void s3c2410_restart(char mode, const char *cmd); | 25 | extern void s3c2410_restart(enum reboot_mode mode, const char *cmd); |
24 | extern void s3c2410_init_irq(void); | 26 | extern void s3c2410_init_irq(void); |
25 | #else | 27 | #else |
26 | #define s3c2410_init_clocks NULL | 28 | #define s3c2410_init_clocks NULL |
@@ -36,7 +38,7 @@ extern void s3c2412_map_io(void); | |||
36 | extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 38 | extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
37 | extern void s3c2412_init_clocks(int xtal); | 39 | extern void s3c2412_init_clocks(int xtal); |
38 | extern int s3c2412_baseclk_add(void); | 40 | extern int s3c2412_baseclk_add(void); |
39 | extern void s3c2412_restart(char mode, const char *cmd); | 41 | extern void s3c2412_restart(enum reboot_mode mode, const char *cmd); |
40 | extern void s3c2412_init_irq(void); | 42 | extern void s3c2412_init_irq(void); |
41 | #else | 43 | #else |
42 | #define s3c2412_init_clocks NULL | 44 | #define s3c2412_init_clocks NULL |
@@ -51,7 +53,7 @@ extern void s3c2416_map_io(void); | |||
51 | extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 53 | extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
52 | extern void s3c2416_init_clocks(int xtal); | 54 | extern void s3c2416_init_clocks(int xtal); |
53 | extern int s3c2416_baseclk_add(void); | 55 | extern int s3c2416_baseclk_add(void); |
54 | extern void s3c2416_restart(char mode, const char *cmd); | 56 | extern void s3c2416_restart(enum reboot_mode mode, const char *cmd); |
55 | extern void s3c2416_init_irq(void); | 57 | extern void s3c2416_init_irq(void); |
56 | 58 | ||
57 | extern struct syscore_ops s3c2416_irq_syscore_ops; | 59 | extern struct syscore_ops s3c2416_irq_syscore_ops; |
@@ -66,7 +68,7 @@ extern struct syscore_ops s3c2416_irq_syscore_ops; | |||
66 | extern void s3c244x_map_io(void); | 68 | extern void s3c244x_map_io(void); |
67 | extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 69 | extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
68 | extern void s3c244x_init_clocks(int xtal); | 70 | extern void s3c244x_init_clocks(int xtal); |
69 | extern void s3c244x_restart(char mode, const char *cmd); | 71 | extern void s3c244x_restart(enum reboot_mode mode, const char *cmd); |
70 | #else | 72 | #else |
71 | #define s3c244x_init_clocks NULL | 73 | #define s3c244x_init_clocks NULL |
72 | #define s3c244x_init_uarts NULL | 74 | #define s3c244x_init_uarts NULL |
@@ -96,7 +98,7 @@ extern void s3c2443_map_io(void); | |||
96 | extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 98 | extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
97 | extern void s3c2443_init_clocks(int xtal); | 99 | extern void s3c2443_init_clocks(int xtal); |
98 | extern int s3c2443_baseclk_add(void); | 100 | extern int s3c2443_baseclk_add(void); |
99 | extern void s3c2443_restart(char mode, const char *cmd); | 101 | extern void s3c2443_restart(enum reboot_mode mode, const char *cmd); |
100 | extern void s3c2443_init_irq(void); | 102 | extern void s3c2443_init_irq(void); |
101 | #else | 103 | #else |
102 | #define s3c2443_init_clocks NULL | 104 | #define s3c2443_init_clocks NULL |
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c index ff384acc65b2..34676d1d5fec 100644 --- a/arch/arm/mach-s3c24xx/s3c2410.c +++ b/arch/arm/mach-s3c24xx/s3c2410.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/syscore_ops.h> | 22 | #include <linux/syscore_ops.h> |
23 | #include <linux/serial_core.h> | 23 | #include <linux/serial_core.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/reboot.h> | ||
25 | #include <linux/io.h> | 26 | #include <linux/io.h> |
26 | 27 | ||
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
@@ -196,9 +197,9 @@ int __init s3c2410a_init(void) | |||
196 | return s3c2410_init(); | 197 | return s3c2410_init(); |
197 | } | 198 | } |
198 | 199 | ||
199 | void s3c2410_restart(char mode, const char *cmd) | 200 | void s3c2410_restart(enum reboot_mode mode, const char *cmd) |
200 | { | 201 | { |
201 | if (mode == 's') { | 202 | if (mode == REBOOT_SOFT) { |
202 | soft_restart(0); | 203 | soft_restart(0); |
203 | } | 204 | } |
204 | 205 | ||
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c index 0f864d4c97de..0251650cbf80 100644 --- a/arch/arm/mach-s3c24xx/s3c2412.c +++ b/arch/arm/mach-s3c24xx/s3c2412.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/reboot.h> | ||
25 | 26 | ||
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
@@ -129,9 +130,9 @@ static void s3c2412_idle(void) | |||
129 | cpu_do_idle(); | 130 | cpu_do_idle(); |
130 | } | 131 | } |
131 | 132 | ||
132 | void s3c2412_restart(char mode, const char *cmd) | 133 | void s3c2412_restart(enum reboot_mode mode, const char *cmd) |
133 | { | 134 | { |
134 | if (mode == 's') | 135 | if (mode == REBOOT_SOFT) |
135 | soft_restart(0); | 136 | soft_restart(0); |
136 | 137 | ||
137 | /* errata "Watch-dog/Software Reset Problem" specifies that | 138 | /* errata "Watch-dog/Software Reset Problem" specifies that |
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index b9c5d382dafb..9ef3ccfbe196 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/syscore_ops.h> | 35 | #include <linux/syscore_ops.h> |
36 | #include <linux/clk.h> | 36 | #include <linux/clk.h> |
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
38 | #include <linux/reboot.h> | ||
38 | 39 | ||
39 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
@@ -79,9 +80,9 @@ static struct device s3c2416_dev = { | |||
79 | .bus = &s3c2416_subsys, | 80 | .bus = &s3c2416_subsys, |
80 | }; | 81 | }; |
81 | 82 | ||
82 | void s3c2416_restart(char mode, const char *cmd) | 83 | void s3c2416_restart(enum reboot_mode mode, const char *cmd) |
83 | { | 84 | { |
84 | if (mode == 's') | 85 | if (mode == REBOOT_SOFT) |
85 | soft_restart(0); | 86 | soft_restart(0); |
86 | 87 | ||
87 | __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); | 88 | __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); |
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c index 8328cd65bf3d..b6c71918b25c 100644 --- a/arch/arm/mach-s3c24xx/s3c2443.c +++ b/arch/arm/mach-s3c24xx/s3c2443.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/reboot.h> | ||
25 | 26 | ||
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
@@ -59,9 +60,9 @@ static struct device s3c2443_dev = { | |||
59 | .bus = &s3c2443_subsys, | 60 | .bus = &s3c2443_subsys, |
60 | }; | 61 | }; |
61 | 62 | ||
62 | void s3c2443_restart(char mode, const char *cmd) | 63 | void s3c2443_restart(enum reboot_mode mode, const char *cmd) |
63 | { | 64 | { |
64 | if (mode == 's') | 65 | if (mode == REBOOT_SOFT) |
65 | soft_restart(0); | 66 | soft_restart(0); |
66 | 67 | ||
67 | __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); | 68 | __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); |
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c index d0423e2544c1..911b555029fc 100644 --- a/arch/arm/mach-s3c24xx/s3c244x.c +++ b/arch/arm/mach-s3c24xx/s3c244x.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/serial_core.h> | 19 | #include <linux/serial_core.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/reboot.h> | ||
21 | #include <linux/device.h> | 22 | #include <linux/device.h> |
22 | #include <linux/syscore_ops.h> | 23 | #include <linux/syscore_ops.h> |
23 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
@@ -198,9 +199,9 @@ struct syscore_ops s3c244x_pm_syscore_ops = { | |||
198 | .resume = s3c244x_resume, | 199 | .resume = s3c244x_resume, |
199 | }; | 200 | }; |
200 | 201 | ||
201 | void s3c244x_restart(char mode, const char *cmd) | 202 | void s3c244x_restart(enum reboot_mode mode, const char *cmd) |
202 | { | 203 | { |
203 | if (mode == 's') | 204 | if (mode == REBOOT_SOFT) |
204 | soft_restart(0); | 205 | soft_restart(0); |
205 | 206 | ||
206 | samsung_wdt_reset(); | 207 | samsung_wdt_reset(); |
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index 1aed6f4be1ce..3f62e467b129 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
22 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/reboot.h> | ||
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
25 | #include <linux/dma-mapping.h> | 26 | #include <linux/dma-mapping.h> |
26 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
@@ -381,9 +382,9 @@ static int __init s3c64xx_init_irq_eint(void) | |||
381 | } | 382 | } |
382 | arch_initcall(s3c64xx_init_irq_eint); | 383 | arch_initcall(s3c64xx_init_irq_eint); |
383 | 384 | ||
384 | void s3c64xx_restart(char mode, const char *cmd) | 385 | void s3c64xx_restart(enum reboot_mode mode, const char *cmd) |
385 | { | 386 | { |
386 | if (mode != 's') | 387 | if (mode != REBOOT_SOFT) |
387 | samsung_wdt_reset(); | 388 | samsung_wdt_reset(); |
388 | 389 | ||
389 | /* if all else fails, or mode was for soft, jump to 0 */ | 390 | /* if all else fails, or mode was for soft, jump to 0 */ |
diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c64xx/common.h index 6cfc99bdfb37..e8f990b37665 100644 --- a/arch/arm/mach-s3c64xx/common.h +++ b/arch/arm/mach-s3c64xx/common.h | |||
@@ -17,13 +17,15 @@ | |||
17 | #ifndef __ARCH_ARM_MACH_S3C64XX_COMMON_H | 17 | #ifndef __ARCH_ARM_MACH_S3C64XX_COMMON_H |
18 | #define __ARCH_ARM_MACH_S3C64XX_COMMON_H | 18 | #define __ARCH_ARM_MACH_S3C64XX_COMMON_H |
19 | 19 | ||
20 | #include <linux/reboot.h> | ||
21 | |||
20 | void s3c64xx_init_irq(u32 vic0, u32 vic1); | 22 | void s3c64xx_init_irq(u32 vic0, u32 vic1); |
21 | void s3c64xx_init_io(struct map_desc *mach_desc, int size); | 23 | void s3c64xx_init_io(struct map_desc *mach_desc, int size); |
22 | 24 | ||
23 | void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit); | 25 | void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit); |
24 | void s3c64xx_setup_clocks(void); | 26 | void s3c64xx_setup_clocks(void); |
25 | 27 | ||
26 | void s3c64xx_restart(char mode, const char *cmd); | 28 | void s3c64xx_restart(enum reboot_mode mode, const char *cmd); |
27 | void s3c64xx_init_late(void); | 29 | void s3c64xx_init_late(void); |
28 | 30 | ||
29 | #ifdef CONFIG_CPU_S3C6400 | 31 | #ifdef CONFIG_CPU_S3C6400 |
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c index 76d0053bf564..dfdfdc320ce7 100644 --- a/arch/arm/mach-s5p64x0/common.c +++ b/arch/arm/mach-s5p64x0/common.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
27 | #include <linux/reboot.h> | ||
27 | 28 | ||
28 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
29 | #include <asm/proc-fns.h> | 30 | #include <asm/proc-fns.h> |
@@ -439,9 +440,9 @@ static int __init s5p64x0_init_irq_eint(void) | |||
439 | } | 440 | } |
440 | arch_initcall(s5p64x0_init_irq_eint); | 441 | arch_initcall(s5p64x0_init_irq_eint); |
441 | 442 | ||
442 | void s5p64x0_restart(char mode, const char *cmd) | 443 | void s5p64x0_restart(enum reboot_mode mode, const char *cmd) |
443 | { | 444 | { |
444 | if (mode != 's') | 445 | if (mode != REBOOT_SOFT) |
445 | samsung_wdt_reset(); | 446 | samsung_wdt_reset(); |
446 | 447 | ||
447 | soft_restart(0); | 448 | soft_restart(0); |
diff --git a/arch/arm/mach-s5p64x0/common.h b/arch/arm/mach-s5p64x0/common.h index f8a60fdc5884..f3a9b43cba4a 100644 --- a/arch/arm/mach-s5p64x0/common.h +++ b/arch/arm/mach-s5p64x0/common.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #ifndef __ARCH_ARM_MACH_S5P64X0_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_S5P64X0_COMMON_H |
13 | #define __ARCH_ARM_MACH_S5P64X0_COMMON_H | 13 | #define __ARCH_ARM_MACH_S5P64X0_COMMON_H |
14 | 14 | ||
15 | #include <linux/reboot.h> | ||
16 | |||
15 | void s5p6440_init_irq(void); | 17 | void s5p6440_init_irq(void); |
16 | void s5p6450_init_irq(void); | 18 | void s5p6450_init_irq(void); |
17 | void s5p64x0_init_io(struct map_desc *mach_desc, int size); | 19 | void s5p64x0_init_io(struct map_desc *mach_desc, int size); |
@@ -22,7 +24,7 @@ void s5p6440_setup_clocks(void); | |||
22 | void s5p6450_register_clocks(void); | 24 | void s5p6450_register_clocks(void); |
23 | void s5p6450_setup_clocks(void); | 25 | void s5p6450_setup_clocks(void); |
24 | 26 | ||
25 | void s5p64x0_restart(char mode, const char *cmd); | 27 | void s5p64x0_restart(enum reboot_mode mode, const char *cmd); |
26 | 28 | ||
27 | #ifdef CONFIG_CPU_S5P6440 | 29 | #ifdef CONFIG_CPU_S5P6440 |
28 | 30 | ||
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c index 511031564d35..4bdfecf6d024 100644 --- a/arch/arm/mach-s5pc100/common.c +++ b/arch/arm/mach-s5pc100/common.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/serial_core.h> | 24 | #include <linux/serial_core.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/reboot.h> | ||
27 | 28 | ||
28 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
29 | #include <asm/proc-fns.h> | 30 | #include <asm/proc-fns.h> |
@@ -217,9 +218,9 @@ void __init s5pc100_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
217 | s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); | 218 | s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); |
218 | } | 219 | } |
219 | 220 | ||
220 | void s5pc100_restart(char mode, const char *cmd) | 221 | void s5pc100_restart(enum reboot_mode mode, const char *cmd) |
221 | { | 222 | { |
222 | if (mode != 's') | 223 | if (mode != REBOOT_SOFT) |
223 | samsung_wdt_reset(); | 224 | samsung_wdt_reset(); |
224 | 225 | ||
225 | soft_restart(0); | 226 | soft_restart(0); |
diff --git a/arch/arm/mach-s5pc100/common.h b/arch/arm/mach-s5pc100/common.h index c41f912e9e1f..08d782d65d7b 100644 --- a/arch/arm/mach-s5pc100/common.h +++ b/arch/arm/mach-s5pc100/common.h | |||
@@ -12,13 +12,15 @@ | |||
12 | #ifndef __ARCH_ARM_MACH_S5PC100_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_S5PC100_COMMON_H |
13 | #define __ARCH_ARM_MACH_S5PC100_COMMON_H | 13 | #define __ARCH_ARM_MACH_S5PC100_COMMON_H |
14 | 14 | ||
15 | #include <linux/reboot.h> | ||
16 | |||
15 | void s5pc100_init_io(struct map_desc *mach_desc, int size); | 17 | void s5pc100_init_io(struct map_desc *mach_desc, int size); |
16 | void s5pc100_init_irq(void); | 18 | void s5pc100_init_irq(void); |
17 | 19 | ||
18 | void s5pc100_register_clocks(void); | 20 | void s5pc100_register_clocks(void); |
19 | void s5pc100_setup_clocks(void); | 21 | void s5pc100_setup_clocks(void); |
20 | 22 | ||
21 | void s5pc100_restart(char mode, const char *cmd); | 23 | void s5pc100_restart(enum reboot_mode mode, const char *cmd); |
22 | 24 | ||
23 | extern int s5pc100_init(void); | 25 | extern int s5pc100_init(void); |
24 | extern void s5pc100_map_io(void); | 26 | extern void s5pc100_map_io(void); |
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c index 9dfe93e2624d..023f1a796a9c 100644 --- a/arch/arm/mach-s5pv210/common.c +++ b/arch/arm/mach-s5pv210/common.c | |||
@@ -143,7 +143,7 @@ static struct map_desc s5pv210_iodesc[] __initdata = { | |||
143 | } | 143 | } |
144 | }; | 144 | }; |
145 | 145 | ||
146 | void s5pv210_restart(char mode, const char *cmd) | 146 | void s5pv210_restart(enum reboot_mode mode, const char *cmd) |
147 | { | 147 | { |
148 | __raw_writel(0x1, S5P_SWRESET); | 148 | __raw_writel(0x1, S5P_SWRESET); |
149 | } | 149 | } |
diff --git a/arch/arm/mach-s5pv210/common.h b/arch/arm/mach-s5pv210/common.h index 0a1cc0aef720..fe1beb54e548 100644 --- a/arch/arm/mach-s5pv210/common.h +++ b/arch/arm/mach-s5pv210/common.h | |||
@@ -12,13 +12,15 @@ | |||
12 | #ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H |
13 | #define __ARCH_ARM_MACH_S5PV210_COMMON_H | 13 | #define __ARCH_ARM_MACH_S5PV210_COMMON_H |
14 | 14 | ||
15 | #include <linux/reboot.h> | ||
16 | |||
15 | void s5pv210_init_io(struct map_desc *mach_desc, int size); | 17 | void s5pv210_init_io(struct map_desc *mach_desc, int size); |
16 | void s5pv210_init_irq(void); | 18 | void s5pv210_init_irq(void); |
17 | 19 | ||
18 | void s5pv210_register_clocks(void); | 20 | void s5pv210_register_clocks(void); |
19 | void s5pv210_setup_clocks(void); | 21 | void s5pv210_setup_clocks(void); |
20 | 22 | ||
21 | void s5pv210_restart(char mode, const char *cmd); | 23 | void s5pv210_restart(enum reboot_mode mode, const char *cmd); |
22 | 24 | ||
23 | extern int s5pv210_init(void); | 25 | extern int s5pv210_init(void); |
24 | extern void s5pv210_map_io(void); | 26 | extern void s5pv210_map_io(void); |
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 9db3e98e8b85..f25b6119e028 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/cpufreq.h> | 19 | #include <linux/cpufreq.h> |
20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/reboot.h> | ||
22 | 23 | ||
23 | #include <video/sa1100fb.h> | 24 | #include <video/sa1100fb.h> |
24 | 25 | ||
@@ -131,9 +132,9 @@ static void sa1100_power_off(void) | |||
131 | PMCR = PMCR_SF; | 132 | PMCR = PMCR_SF; |
132 | } | 133 | } |
133 | 134 | ||
134 | void sa11x0_restart(char mode, const char *cmd) | 135 | void sa11x0_restart(enum reboot_mode mode, const char *cmd) |
135 | { | 136 | { |
136 | if (mode == 's') { | 137 | if (mode == REBOOT_SOFT) { |
137 | /* Jump into ROM at address 0 */ | 138 | /* Jump into ROM at address 0 */ |
138 | soft_restart(0); | 139 | soft_restart(0); |
139 | } else { | 140 | } else { |
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h index 2abc6a1f6e86..9a33695c9492 100644 --- a/arch/arm/mach-sa1100/generic.h +++ b/arch/arm/mach-sa1100/generic.h | |||
@@ -3,12 +3,13 @@ | |||
3 | * | 3 | * |
4 | * Author: Nicolas Pitre | 4 | * Author: Nicolas Pitre |
5 | */ | 5 | */ |
6 | #include <linux/reboot.h> | ||
6 | 7 | ||
7 | extern void sa1100_timer_init(void); | 8 | extern void sa1100_timer_init(void); |
8 | extern void __init sa1100_map_io(void); | 9 | extern void __init sa1100_map_io(void); |
9 | extern void __init sa1100_init_irq(void); | 10 | extern void __init sa1100_init_irq(void); |
10 | extern void __init sa1100_init_gpio(void); | 11 | extern void __init sa1100_init_gpio(void); |
11 | extern void sa11x0_restart(char, const char *); | 12 | extern void sa11x0_restart(enum reboot_mode, const char *); |
12 | extern void sa11x0_init_late(void); | 13 | extern void sa11x0_init_late(void); |
13 | 14 | ||
14 | #define SET_BANK(__nr,__start,__size) \ | 15 | #define SET_BANK(__nr,__start,__size) \ |
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index 153555724988..1d32c5e8eab6 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/serial_8250.h> | 11 | #include <linux/serial_8250.h> |
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | #include <linux/cpu.h> | 13 | #include <linux/cpu.h> |
14 | #include <linux/reboot.h> | ||
14 | 15 | ||
15 | #include <asm/setup.h> | 16 | #include <asm/setup.h> |
16 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
@@ -24,7 +25,7 @@ | |||
24 | #define ROMCARD_SIZE 0x08000000 | 25 | #define ROMCARD_SIZE 0x08000000 |
25 | #define ROMCARD_START 0x10000000 | 26 | #define ROMCARD_START 0x10000000 |
26 | 27 | ||
27 | static void shark_restart(char mode, const char *cmd) | 28 | static void shark_restart(enum reboot_mode mode, const char *cmd) |
28 | { | 29 | { |
29 | short temp; | 30 | short temp; |
30 | /* Reset the Machine via pc[3] of the sequoia chipset */ | 31 | /* Reset the Machine via pc[3] of the sequoia chipset */ |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 44a621505eeb..45221fd7e25d 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/mmc/sh_mmcif.h> | 42 | #include <linux/mmc/sh_mmcif.h> |
43 | #include <linux/mmc/sh_mobile_sdhi.h> | 43 | #include <linux/mmc/sh_mobile_sdhi.h> |
44 | #include <linux/i2c-gpio.h> | 44 | #include <linux/i2c-gpio.h> |
45 | #include <linux/reboot.h> | ||
45 | #include <mach/common.h> | 46 | #include <mach/common.h> |
46 | #include <mach/irqs.h> | 47 | #include <mach/irqs.h> |
47 | #include <mach/r8a7740.h> | 48 | #include <mach/r8a7740.h> |
@@ -1259,7 +1260,7 @@ static void __init eva_add_early_devices(void) | |||
1259 | } | 1260 | } |
1260 | 1261 | ||
1261 | #define RESCNT2 IOMEM(0xe6188020) | 1262 | #define RESCNT2 IOMEM(0xe6188020) |
1262 | static void eva_restart(char mode, const char *cmd) | 1263 | static void eva_restart(enum reboot_mode mode, const char *cmd) |
1263 | { | 1264 | { |
1264 | /* Do soft power on reset */ | 1265 | /* Do soft power on reset */ |
1265 | writel((1 << 31), RESCNT2); | 1266 | writel((1 << 31), RESCNT2); |
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 165483c9bee2..1068120d339f 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/pinctrl/machine.h> | 34 | #include <linux/pinctrl/machine.h> |
35 | #include <linux/pinctrl/pinconf-generic.h> | 35 | #include <linux/pinctrl/pinconf-generic.h> |
36 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
37 | #include <linux/reboot.h> | ||
37 | #include <linux/regulator/fixed.h> | 38 | #include <linux/regulator/fixed.h> |
38 | #include <linux/regulator/machine.h> | 39 | #include <linux/regulator/machine.h> |
39 | #include <linux/smsc911x.h> | 40 | #include <linux/smsc911x.h> |
@@ -890,7 +891,7 @@ static void __init kzm_init(void) | |||
890 | sh73a0_pm_init(); | 891 | sh73a0_pm_init(); |
891 | } | 892 | } |
892 | 893 | ||
893 | static void kzm9g_restart(char mode, const char *cmd) | 894 | static void kzm9g_restart(enum reboot_mode mode, const char *cmd) |
894 | { | 895 | { |
895 | #define RESCNT2 IOMEM(0xe6188020) | 896 | #define RESCNT2 IOMEM(0xe6188020) |
896 | /* Do soft power on reset */ | 897 | /* Do soft power on reset */ |
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c index 8ea11b472b91..bfce9641e32f 100644 --- a/arch/arm/mach-socfpga/socfpga.c +++ b/arch/arm/mach-socfpga/socfpga.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/of_address.h> | 19 | #include <linux/of_address.h> |
20 | #include <linux/of_irq.h> | 20 | #include <linux/of_irq.h> |
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <linux/reboot.h> | ||
22 | 23 | ||
23 | #include <asm/hardware/cache-l2x0.h> | 24 | #include <asm/hardware/cache-l2x0.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
@@ -89,13 +90,13 @@ static void __init socfpga_init_irq(void) | |||
89 | socfpga_sysmgr_init(); | 90 | socfpga_sysmgr_init(); |
90 | } | 91 | } |
91 | 92 | ||
92 | static void socfpga_cyclone5_restart(char mode, const char *cmd) | 93 | static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd) |
93 | { | 94 | { |
94 | u32 temp; | 95 | u32 temp; |
95 | 96 | ||
96 | temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL); | 97 | temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL); |
97 | 98 | ||
98 | if (mode == 'h') | 99 | if (mode == REBOOT_HARD) |
99 | temp |= RSTMGR_CTRL_SWCOLDRSTREQ; | 100 | temp |= RSTMGR_CTRL_SWCOLDRSTREQ; |
100 | else | 101 | else |
101 | temp |= RSTMGR_CTRL_SWWARMRSTREQ; | 102 | temp |= RSTMGR_CTRL_SWWARMRSTREQ; |
diff --git a/arch/arm/mach-spear/generic.h b/arch/arm/mach-spear/generic.h index a9fd45362fee..904f2c907b46 100644 --- a/arch/arm/mach-spear/generic.h +++ b/arch/arm/mach-spear/generic.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/dmaengine.h> | 16 | #include <linux/dmaengine.h> |
17 | #include <linux/amba/pl08x.h> | 17 | #include <linux/amba/pl08x.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/reboot.h> | ||
20 | |||
19 | #include <asm/mach/time.h> | 21 | #include <asm/mach/time.h> |
20 | 22 | ||
21 | extern void spear13xx_timer_init(void); | 23 | extern void spear13xx_timer_init(void); |
@@ -32,7 +34,7 @@ void __init spear6xx_clk_init(void __iomem *misc_base); | |||
32 | void __init spear13xx_map_io(void); | 34 | void __init spear13xx_map_io(void); |
33 | void __init spear13xx_l2x0_init(void); | 35 | void __init spear13xx_l2x0_init(void); |
34 | 36 | ||
35 | void spear_restart(char, const char *); | 37 | void spear_restart(enum reboot_mode, const char *); |
36 | 38 | ||
37 | void spear13xx_secondary_startup(void); | 39 | void spear13xx_secondary_startup(void); |
38 | void __cpuinit spear13xx_cpu_die(unsigned int cpu); | 40 | void __cpuinit spear13xx_cpu_die(unsigned int cpu); |
diff --git a/arch/arm/mach-spear/restart.c b/arch/arm/mach-spear/restart.c index 2b44500bb718..ce5e098c4888 100644 --- a/arch/arm/mach-spear/restart.c +++ b/arch/arm/mach-spear/restart.c | |||
@@ -12,14 +12,15 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/amba/sp810.h> | 14 | #include <linux/amba/sp810.h> |
15 | #include <linux/reboot.h> | ||
15 | #include <asm/system_misc.h> | 16 | #include <asm/system_misc.h> |
16 | #include <mach/spear.h> | 17 | #include <mach/spear.h> |
17 | #include "generic.h" | 18 | #include "generic.h" |
18 | 19 | ||
19 | #define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204) | 20 | #define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204) |
20 | void spear_restart(char mode, const char *cmd) | 21 | void spear_restart(enum reboot_mode mode, const char *cmd) |
21 | { | 22 | { |
22 | if (mode == 's') { | 23 | if (mode == REBOOT_SOFT) { |
23 | /* software reset, Jump into ROM at address 0 */ | 24 | /* software reset, Jump into ROM at address 0 */ |
24 | soft_restart(0); | 25 | soft_restart(0); |
25 | } else { | 26 | } else { |
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index 84485a10fc3a..38a3c55527c8 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/of_irq.h> | 18 | #include <linux/of_irq.h> |
19 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/reboot.h> | ||
21 | 22 | ||
22 | #include <linux/clk/sunxi.h> | 23 | #include <linux/clk/sunxi.h> |
23 | 24 | ||
@@ -33,7 +34,7 @@ | |||
33 | 34 | ||
34 | static void __iomem *wdt_base; | 35 | static void __iomem *wdt_base; |
35 | 36 | ||
36 | static void sun4i_restart(char mode, const char *cmd) | 37 | static void sun4i_restart(enum reboot_mode mode, const char *cmd) |
37 | { | 38 | { |
38 | if (!wdt_base) | 39 | if (!wdt_base) |
39 | return; | 40 | return; |
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h index 1787327fae3a..9a6659fe2dc2 100644 --- a/arch/arm/mach-tegra/board.h +++ b/arch/arm/mach-tegra/board.h | |||
@@ -23,8 +23,9 @@ | |||
23 | #define __MACH_TEGRA_BOARD_H | 23 | #define __MACH_TEGRA_BOARD_H |
24 | 24 | ||
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/reboot.h> | ||
26 | 27 | ||
27 | void tegra_assert_system_reset(char mode, const char *cmd); | 28 | void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd); |
28 | 29 | ||
29 | void __init tegra_init_early(void); | 30 | void __init tegra_init_early(void); |
30 | void __init tegra_map_common_io(void); | 31 | void __init tegra_map_common_io(void); |
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index b25153e2ebaa..94a119a35af8 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/reboot.h> | ||
25 | #include <linux/irqchip.h> | 26 | #include <linux/irqchip.h> |
26 | #include <linux/clk-provider.h> | 27 | #include <linux/clk-provider.h> |
27 | 28 | ||
@@ -68,7 +69,7 @@ void __init tegra_dt_init_irq(void) | |||
68 | } | 69 | } |
69 | #endif | 70 | #endif |
70 | 71 | ||
71 | void tegra_assert_system_reset(char mode, const char *cmd) | 72 | void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd) |
72 | { | 73 | { |
73 | void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0); | 74 | void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0); |
74 | u32 reg; | 75 | u32 reg; |
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 4f7ac2a11452..35670b15f281 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -300,11 +300,11 @@ static void __init u300_init_check_chip(void) | |||
300 | /* Forward declare this function from the watchdog */ | 300 | /* Forward declare this function from the watchdog */ |
301 | void coh901327_watchdog_reset(void); | 301 | void coh901327_watchdog_reset(void); |
302 | 302 | ||
303 | static void u300_restart(char mode, const char *cmd) | 303 | static void u300_restart(enum reboot_mode mode, const char *cmd) |
304 | { | 304 | { |
305 | switch (mode) { | 305 | switch (mode) { |
306 | case 's': | 306 | case REBOOT_SOFT: |
307 | case 'h': | 307 | case REBOOT_HARD: |
308 | #ifdef CONFIG_COH901327_WATCHDOG | 308 | #ifdef CONFIG_COH901327_WATCHDOG |
309 | coh901327_watchdog_reset(); | 309 | coh901327_watchdog_reset(); |
310 | #endif | 310 | #endif |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 54bb80b012ac..3b0572f30d56 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/clkdev.h> | 38 | #include <linux/clkdev.h> |
39 | #include <linux/mtd/physmap.h> | 39 | #include <linux/mtd/physmap.h> |
40 | #include <linux/bitops.h> | 40 | #include <linux/bitops.h> |
41 | #include <linux/reboot.h> | ||
41 | 42 | ||
42 | #include <asm/irq.h> | 43 | #include <asm/irq.h> |
43 | #include <asm/hardware/arm_timer.h> | 44 | #include <asm/hardware/arm_timer.h> |
@@ -733,7 +734,7 @@ static void versatile_leds_event(led_event_t ledevt) | |||
733 | } | 734 | } |
734 | #endif /* CONFIG_LEDS */ | 735 | #endif /* CONFIG_LEDS */ |
735 | 736 | ||
736 | void versatile_restart(char mode, const char *cmd) | 737 | void versatile_restart(enum reboot_mode mode, const char *cmd) |
737 | { | 738 | { |
738 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); | 739 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); |
739 | u32 val; | 740 | u32 val; |
diff --git a/arch/arm/mach-versatile/core.h b/arch/arm/mach-versatile/core.h index 5c1b87d1da6b..f06d5768e428 100644 --- a/arch/arm/mach-versatile/core.h +++ b/arch/arm/mach-versatile/core.h | |||
@@ -24,13 +24,14 @@ | |||
24 | 24 | ||
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
27 | #include <linux/reboot.h> | ||
27 | 28 | ||
28 | extern void __init versatile_init(void); | 29 | extern void __init versatile_init(void); |
29 | extern void __init versatile_init_early(void); | 30 | extern void __init versatile_init_early(void); |
30 | extern void __init versatile_init_irq(void); | 31 | extern void __init versatile_init_irq(void); |
31 | extern void __init versatile_map_io(void); | 32 | extern void __init versatile_map_io(void); |
32 | extern void versatile_timer_init(void); | 33 | extern void versatile_timer_init(void); |
33 | extern void versatile_restart(char, const char *); | 34 | extern void versatile_restart(enum reboot_mode, const char *); |
34 | extern unsigned int mmc_status(struct device *dev); | 35 | extern unsigned int mmc_status(struct device *dev); |
35 | #ifdef CONFIG_OF | 36 | #ifdef CONFIG_OF |
36 | extern struct of_dev_auxdata versatile_auxdata_lookup[]; | 37 | extern struct of_dev_auxdata versatile_auxdata_lookup[]; |
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c index f8f2f00856e0..eefaa60d6614 100644 --- a/arch/arm/mach-vt8500/vt8500.c +++ b/arch/arm/mach-vt8500/vt8500.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/clocksource.h> | 21 | #include <linux/clocksource.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
24 | #include <linux/reboot.h> | ||
24 | 25 | ||
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
@@ -46,7 +47,7 @@ | |||
46 | 47 | ||
47 | static void __iomem *pmc_base; | 48 | static void __iomem *pmc_base; |
48 | 49 | ||
49 | void vt8500_restart(char mode, const char *cmd) | 50 | void vt8500_restart(enum reboot_mode mode, const char *cmd) |
50 | { | 51 | { |
51 | if (pmc_base) | 52 | if (pmc_base) |
52 | writel(1, pmc_base + VT8500_PMSR_REG); | 53 | writel(1, pmc_base + VT8500_PMSR_REG); |
diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index 9e4dd8b63c4a..b1eabaad50a5 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c | |||
@@ -230,9 +230,9 @@ void __init nuc900_init_clocks(void) | |||
230 | #define WTE (1 << 7) | 230 | #define WTE (1 << 7) |
231 | #define WTRE (1 << 1) | 231 | #define WTRE (1 << 1) |
232 | 232 | ||
233 | void nuc9xx_restart(char mode, const char *cmd) | 233 | void nuc9xx_restart(enum reboot_mode mode, const char *cmd) |
234 | { | 234 | { |
235 | if (mode == 's') { | 235 | if (mode == REBOOT_SOFT) { |
236 | /* Jump into ROM at address 0 */ | 236 | /* Jump into ROM at address 0 */ |
237 | soft_restart(0); | 237 | soft_restart(0); |
238 | } else { | 238 | } else { |
diff --git a/arch/arm/mach-w90x900/nuc9xx.h b/arch/arm/mach-w90x900/nuc9xx.h index 88ef4b267089..e3ab1e1381f1 100644 --- a/arch/arm/mach-w90x900/nuc9xx.h +++ b/arch/arm/mach-w90x900/nuc9xx.h | |||
@@ -14,10 +14,13 @@ | |||
14 | * published by the Free Software Foundation. | 14 | * published by the Free Software Foundation. |
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | |||
18 | #include <linux/reboot.h> | ||
19 | |||
17 | struct map_desc; | 20 | struct map_desc; |
18 | 21 | ||
19 | /* core initialisation functions */ | 22 | /* core initialisation functions */ |
20 | 23 | ||
21 | extern void nuc900_init_irq(void); | 24 | extern void nuc900_init_irq(void); |
22 | extern void nuc900_timer_init(void); | 25 | extern void nuc900_timer_init(void); |
23 | extern void nuc9xx_restart(char, const char *); | 26 | extern void nuc9xx_restart(enum reboot_mode, const char *); |
diff --git a/arch/arm/plat-iop/gpio.c b/arch/arm/plat-iop/gpio.c index e4de9be78feb..697de6dc4936 100644 --- a/arch/arm/plat-iop/gpio.c +++ b/arch/arm/plat-iop/gpio.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/export.h> | 18 | #include <linux/export.h> |
19 | #include <asm/hardware/iop3xx.h> | 19 | #include <asm/hardware/iop3xx.h> |
20 | #include <mach/gpio.h> | ||
20 | 21 | ||
21 | void gpio_line_config(int line, int direction) | 22 | void gpio_line_config(int line, int direction) |
22 | { | 23 | { |
diff --git a/arch/arm/plat-iop/restart.c b/arch/arm/plat-iop/restart.c index 33fa699a4d28..3a4d5e5fde52 100644 --- a/arch/arm/plat-iop/restart.c +++ b/arch/arm/plat-iop/restart.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/system_misc.h> | 11 | #include <asm/system_misc.h> |
12 | #include <mach/hardware.h> | 12 | #include <mach/hardware.h> |
13 | 13 | ||
14 | void iop3xx_restart(char mode, const char *cmd) | 14 | void iop3xx_restart(enum reboot_mode mode, const char *cmd) |
15 | { | 15 | { |
16 | *IOP3XX_PCSR = 0x30; | 16 | *IOP3XX_PCSR = 0x30; |
17 | 17 | ||