Commit 7b6d864b authored by Robin Holt's avatar Robin Holt Committed by Linus Torvalds

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: default avatarRobin 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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 16d6d5b0
...@@ -223,11 +223,12 @@ extern int iop3xx_get_init_atu(void); ...@@ -223,11 +223,12 @@ extern int iop3xx_get_init_atu(void);
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/types.h> #include <linux/types.h>
#include <linux/reboot.h>
void iop3xx_map_io(void); void iop3xx_map_io(void);
void iop_init_cp6_handler(void); void iop_init_cp6_handler(void);
void iop_init_time(unsigned long tickrate); void iop_init_time(unsigned long tickrate);
void iop3xx_restart(char, const char *); void iop3xx_restart(enum reboot_mode, const char *);
static inline u32 read_tmr0(void) static inline u32 read_tmr0(void)
{ {
......
...@@ -59,7 +59,7 @@ struct machine_desc { ...@@ -59,7 +59,7 @@ struct machine_desc {
#ifdef CONFIG_MULTI_IRQ_HANDLER #ifdef CONFIG_MULTI_IRQ_HANDLER
void (*handle_irq)(struct pt_regs *); void (*handle_irq)(struct pt_regs *);
#endif #endif
void (*restart)(char, const char *); void (*restart)(enum reboot_mode, const char *);
}; };
/* /*
......
...@@ -6,11 +6,12 @@ ...@@ -6,11 +6,12 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/irqflags.h> #include <linux/irqflags.h>
#include <linux/reboot.h>
extern void cpu_init(void); extern void cpu_init(void);
void soft_restart(unsigned long); void soft_restart(unsigned long);
extern void (*arm_pm_restart)(char str, const char *cmd); extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
extern void (*arm_pm_idle)(void); extern void (*arm_pm_idle)(void);
#define UDBG_UNDEFINED (1 << 0) #define UDBG_UNDEFINED (1 << 0)
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/hw_breakpoint.h> #include <linux/hw_breakpoint.h>
#include <linux/cpuidle.h> #include <linux/cpuidle.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/reboot.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/idmap.h> #include <asm/idmap.h>
...@@ -113,7 +114,7 @@ void soft_restart(unsigned long addr) ...@@ -113,7 +114,7 @@ void soft_restart(unsigned long addr)
BUG(); BUG();
} }
static void null_restart(char mode, const char *cmd) static void null_restart(enum reboot_mode reboot_mode, const char *cmd)
{ {
} }
...@@ -123,7 +124,7 @@ static void null_restart(char mode, const char *cmd) ...@@ -123,7 +124,7 @@ static void null_restart(char mode, const char *cmd)
void (*pm_power_off)(void); void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off); EXPORT_SYMBOL(pm_power_off);
void (*arm_pm_restart)(char str, const char *cmd) = null_restart; void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = null_restart;
EXPORT_SYMBOL_GPL(arm_pm_restart); EXPORT_SYMBOL_GPL(arm_pm_restart);
/* /*
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/reboot.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -304,7 +305,7 @@ static void at91rm9200_idle(void) ...@@ -304,7 +305,7 @@ static void at91rm9200_idle(void)
at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK); at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK);
} }
static void at91rm9200_restart(char mode, const char *cmd) static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd)
{ {
/* /*
* Perform a hardware reset with the use of the Watchdog timer. * Perform a hardware reset with the use of the Watchdog timer.
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/clkdev.h> #include <linux/clkdev.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/reboot.h>
/* Map io */ /* Map io */
extern void __init at91_map_io(void); extern void __init at91_map_io(void);
...@@ -60,8 +61,8 @@ extern void at91sam9_idle(void); ...@@ -60,8 +61,8 @@ extern void at91sam9_idle(void);
/* reset */ /* reset */
extern void at91_ioremap_rstc(u32 base_addr); extern void at91_ioremap_rstc(u32 base_addr);
extern void at91sam9_alt_restart(char, const char *); extern void at91sam9_alt_restart(enum reboot_mode, const char *);
extern void at91sam9g45_restart(char, const char *); extern void at91sam9g45_restart(enum reboot_mode, const char *);
/* shutdown */ /* shutdown */
extern void at91_ioremap_shdwc(u32 base_addr); extern void at91_ioremap_shdwc(u32 base_addr);
......
...@@ -53,7 +53,7 @@ static void bcm2835_setup_restart(void) ...@@ -53,7 +53,7 @@ static void bcm2835_setup_restart(void)
WARN(!wdt_regs, "failed to remap watchdog regs"); WARN(!wdt_regs, "failed to remap watchdog regs");
} }
static void bcm2835_restart(char mode, const char *cmd) static void bcm2835_restart(enum reboot_mode mode, const char *cmd)
{ {
u32 val; u32 val;
...@@ -91,7 +91,7 @@ static void bcm2835_power_off(void) ...@@ -91,7 +91,7 @@ static void bcm2835_power_off(void)
writel_relaxed(val, wdt_regs + PM_RSTS); writel_relaxed(val, wdt_regs + PM_RSTS);
/* Continue with normal reset mechanism */ /* Continue with normal reset mechanism */
bcm2835_restart(0, ""); bcm2835_restart(REBOOT_HARD, "");
} }
static struct map_desc io_map __initdata = { static struct map_desc io_map __initdata = {
......
...@@ -384,7 +384,7 @@ void __init clps711x_timer_init(void) ...@@ -384,7 +384,7 @@ void __init clps711x_timer_init(void)
setup_irq(IRQ_TC2OI, &clps711x_timer_irq); setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
} }
void clps711x_restart(char mode, const char *cmd) void clps711x_restart(enum reboot_mode mode, const char *cmd)
{ {
soft_restart(0); soft_restart(0);
} }
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
* Common bits. * Common bits.
*/ */
#include <linux/reboot.h>
#define CLPS711X_NR_IRQS (33) #define CLPS711X_NR_IRQS (33)
#define CLPS711X_NR_GPIO (4 * 8 + 3) #define CLPS711X_NR_GPIO (4 * 8 + 3)
#define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit)) #define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit))
...@@ -12,5 +14,5 @@ extern void clps711x_map_io(void); ...@@ -12,5 +14,5 @@ extern void clps711x_map_io(void);
extern void clps711x_init_irq(void); extern void clps711x_init_irq(void);
extern void clps711x_timer_init(void); extern void clps711x_timer_init(void);
extern void clps711x_handle_irq(struct pt_regs *regs); extern void clps711x_handle_irq(struct pt_regs *regs);
extern void clps711x_restart(char mode, const char *cmd); extern void clps711x_restart(enum reboot_mode mode, const char *cmd);
extern void clps711x_init_early(void); extern void clps711x_init_early(void);
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#ifndef __CNS3XXX_CORE_H #ifndef __CNS3XXX_CORE_H
#define __CNS3XXX_CORE_H #define __CNS3XXX_CORE_H
#include <linux/reboot.h>
extern void cns3xxx_timer_init(void); extern void cns3xxx_timer_init(void);
#ifdef CONFIG_CACHE_L2X0 #ifdef CONFIG_CACHE_L2X0
...@@ -22,6 +24,6 @@ static inline void cns3xxx_l2x0_init(void) {} ...@@ -22,6 +24,6 @@ static inline void cns3xxx_l2x0_init(void) {}
void __init cns3xxx_map_io(void); void __init cns3xxx_map_io(void);
void __init cns3xxx_init_irq(void); void __init cns3xxx_init_irq(void);
void cns3xxx_power_off(void); void cns3xxx_power_off(void);
void cns3xxx_restart(char, const char *); void cns3xxx_restart(enum reboot_mode, const char *);
#endif /* __CNS3XXX_CORE_H */ #endif /* __CNS3XXX_CORE_H */
...@@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block) ...@@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block)
} }
EXPORT_SYMBOL(cns3xxx_pwr_soft_rst); EXPORT_SYMBOL(cns3xxx_pwr_soft_rst);
void cns3xxx_restart(char mode, const char *cmd) void cns3xxx_restart(enum reboot_mode mode, const char *cmd)
{ {
/* /*
* To reset, we hit the on-board reset register * To reset, we hit the on-board reset register
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/ahci_platform.h> #include <linux/ahci_platform.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/reboot.h>
#include <mach/cputype.h> #include <mach/cputype.h>
#include <mach/common.h> #include <mach/common.h>
...@@ -366,7 +367,7 @@ static struct platform_device da8xx_wdt_device = { ...@@ -366,7 +367,7 @@ static struct platform_device da8xx_wdt_device = {
.resource = da8xx_watchdog_resources, .resource = da8xx_watchdog_resources,
}; };
void da8xx_restart(char mode, const char *cmd) void da8xx_restart(enum reboot_mode mode, const char *cmd)
{ {
struct device *dev; struct device *dev;
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/reboot.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <linux/platform_data/i2c-davinci.h> #include <linux/platform_data/i2c-davinci.h>
...@@ -307,7 +308,7 @@ struct platform_device davinci_wdt_device = { ...@@ -307,7 +308,7 @@ struct platform_device davinci_wdt_device = {
.resource = wdt_resources, .resource = wdt_resources,
}; };
void davinci_restart(char mode, const char *cmd) void davinci_restart(enum reboot_mode mode, const char *cmd)
{ {
davinci_watchdog_reset(&davinci_wdt_device); davinci_watchdog_reset(&davinci_wdt_device);
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/reboot.h>
extern void davinci_timer_init(void); extern void davinci_timer_init(void);
...@@ -81,7 +82,7 @@ extern struct davinci_soc_info davinci_soc_info; ...@@ -81,7 +82,7 @@ extern struct davinci_soc_info davinci_soc_info;
extern void davinci_common_init(struct davinci_soc_info *soc_info); extern void davinci_common_init(struct davinci_soc_info *soc_info);
extern void davinci_init_ide(void); extern void davinci_init_ide(void);
void davinci_restart(char mode, const char *cmd); void davinci_restart(enum reboot_mode mode, const char *cmd);
void davinci_init_late(void); void davinci_init_late(void);
#ifdef CONFIG_DAVINCI_RESET_CLOCKS #ifdef CONFIG_DAVINCI_RESET_CLOCKS
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/davinci_emac.h> #include <linux/davinci_emac.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/platform_data/davinci_asp.h> #include <linux/platform_data/davinci_asp.h>
#include <linux/reboot.h>
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <mach/serial.h> #include <mach/serial.h>
...@@ -106,7 +107,7 @@ int da850_register_vpif_display ...@@ -106,7 +107,7 @@ int da850_register_vpif_display
(struct vpif_display_config *display_config); (struct vpif_display_config *display_config);
int da850_register_vpif_capture int da850_register_vpif_capture
(struct vpif_capture_config *capture_config); (struct vpif_capture_config *capture_config);
void da8xx_restart(char mode, const char *cmd); void da8xx_restart(enum reboot_mode mode, const char *cmd);
void da8xx_rproc_reserve_cma(void); void da8xx_rproc_reserve_cma(void);
int da8xx_register_rproc(void); int da8xx_register_rproc(void);
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/input/matrix_keypad.h> #include <linux/input/matrix_keypad.h>
#include <linux/mfd/ti_ssp.h> #include <linux/mfd/ti_ssp.h>
#include <linux/reboot.h>
#include <linux/platform_data/mmc-davinci.h> #include <linux/platform_data/mmc-davinci.h>
#include <linux/platform_data/mtd-davinci.h> #include <linux/platform_data/mtd-davinci.h>
...@@ -54,7 +55,7 @@ extern struct platform_device tnetv107x_serial_device; ...@@ -54,7 +55,7 @@ extern struct platform_device tnetv107x_serial_device;
extern void tnetv107x_init(void); extern void tnetv107x_init(void);
extern void tnetv107x_devices_init(struct tnetv107x_device_info *); extern void tnetv107x_devices_init(struct tnetv107x_device_info *);
extern void tnetv107x_irq_init(void); extern void tnetv107x_irq_init(void);
void tnetv107x_restart(char mode, const char *cmd); void tnetv107x_restart(enum reboot_mode mode, const char *cmd);
#endif #endif
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/reboot.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -730,7 +731,7 @@ static void tnetv107x_watchdog_reset(struct platform_device *pdev) ...@@ -730,7 +731,7 @@ static void tnetv107x_watchdog_reset(struct platform_device *pdev)
__raw_writel(1, &regs->kick); __raw_writel(1, &regs->kick);
} }
void tnetv107x_restart(char mode, const char *cmd) void tnetv107x_restart(enum reboot_mode mode, const char *cmd)
{ {
tnetv107x_watchdog_reset(&tnetv107x_wdt_device); tnetv107x_watchdog_reset(&tnetv107x_wdt_device);
} }
......
...@@ -381,7 +381,7 @@ void __init dove_init(void) ...@@ -381,7 +381,7 @@ void __init dove_init(void)
dove_xor1_init(); dove_xor1_init();
} }
void dove_restart(char mode, const char *cmd) void dove_restart(enum reboot_mode mode, const char *cmd)
{ {
/* /*
* Enable soft reset to assert RSTOUTn. * Enable soft reset to assert RSTOUTn.
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#ifndef __ARCH_DOVE_COMMON_H #ifndef __ARCH_DOVE_COMMON_H
#define __ARCH_DOVE_COMMON_H #define __ARCH_DOVE_COMMON_H
#include <linux/reboot.h>
struct mv643xx_eth_platform_data; struct mv643xx_eth_platform_data;
struct mv_sata_platform_data; struct mv_sata_platform_data;
...@@ -42,6 +44,6 @@ void dove_spi1_init(void); ...@@ -42,6 +44,6 @@ void dove_spi1_init(void);
void dove_i2c_init(void); void dove_i2c_init(void);
void dove_sdio0_init(void); void dove_sdio0_init(void);
void dove_sdio1_init(void); void dove_sdio1_init(void);
void dove_restart(char, const char *); void dove_restart(enum reboot_mode, const char *);
#endif #endif
...@@ -311,7 +311,7 @@ static int __init ebsa110_init(void) ...@@ -311,7 +311,7 @@ static int __init ebsa110_init(void)
arch_initcall(ebsa110_init); arch_initcall(ebsa110_init);
static void ebsa110_restart(char mode, const char *cmd) static void ebsa110_restart(enum reboot_mode mode, const char *cmd)
{ {
soft_restart(0x80000000); soft_restart(0x80000000);
} }
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/irqchip/arm-vic.h> #include <linux/irqchip/arm-vic.h>
#include <linux/reboot.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <linux/platform_data/video-ep93xx.h> #include <linux/platform_data/video-ep93xx.h>
...@@ -921,7 +922,7 @@ void __init ep93xx_init_devices(void) ...@@ -921,7 +922,7 @@ void __init ep93xx_init_devices(void)
gpio_led_register_device(-1, &ep93xx_led_data); gpio_led_register_device(-1, &ep93xx_led_data);
} }
void ep93xx_restart(char mode, const char *cmd) void ep93xx_restart(enum reboot_mode mode, const char *cmd)
{ {
/* /*
* Set then clear the SWRST bit to initiate a software reset * Set then clear the SWRST bit to initiate a software reset
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/reboot.h>
struct i2c_gpio_platform_data; struct i2c_gpio_platform_data;
struct i2c_board_info; struct i2c_board_info;
struct spi_board_info; struct spi_board_info;
...@@ -55,7 +57,7 @@ void ep93xx_ide_release_gpio(struct platform_device *pdev); ...@@ -55,7 +57,7 @@ void ep93xx_ide_release_gpio(struct platform_device *pdev);
void ep93xx_init_devices(void); void ep93xx_init_devices(void);
extern void ep93xx_timer_init(void); extern void ep93xx_timer_init(void);
void ep93xx_restart(char, const char *); void ep93xx_restart(enum reboot_mode, const char *);
void ep93xx_init_late(void); void ep93xx_init_late(void);
#ifdef CONFIG_CRUNCH #ifdef CONFIG_CRUNCH
......
...@@ -285,12 +285,12 @@ static struct map_desc exynos5440_iodesc0[] __initdata = { ...@@ -285,12 +285,12 @@ static struct map_desc exynos5440_iodesc0[] __initdata = {
}, },
}; };
void exynos4_restart(char mode, const char *cmd) void exynos4_restart(enum reboot_mode mode, const char *cmd)
{ {
__raw_writel(0x1, S5P_SWRESET); __raw_writel(0x1, S5P_SWRESET);
} }
void exynos5_restart(char mode, const char *cmd) void exynos5_restart(enum reboot_mode mode, const char *cmd)
{ {
struct device_node *np; struct device_node *np;
u32 val; u32 val;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H
#define __ARCH_ARM_MACH_EXYNOS_COMMON_H #define __ARCH_ARM_MACH_EXYNOS_COMMON_H
#include <linux/reboot.h>
#include <linux/of.h> #include <linux/of.h>
void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); 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,8 +21,8 @@ extern unsigned long xxti_f, xusbxti_f;
struct map_desc; struct map_desc;
void exynos_init_io(void); void exynos_init_io(void);
void exynos4_restart(char mode, const char *cmd); void exynos4_restart(enum reboot_mode mode, const char *cmd);
void exynos5_restart(char mode, const char *cmd); void exynos5_restart(enum reboot_mode mode, const char *cmd);
void exynos_init_late(void); void exynos_init_late(void);
/* ToDo: remove these after migrating legacy exynos4 platforms to dt */ /* ToDo: remove these after migrating legacy exynos4 platforms to dt */
......
...@@ -198,9 +198,9 @@ void __init footbridge_map_io(void) ...@@ -198,9 +198,9 @@ void __init footbridge_map_io(void)
} }
} }
void footbridge_restart(char mode, const char *cmd) void footbridge_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 's') { if (mode == REBOOT_SOFT) {
/* Jump into the ROM */ /* Jump into the ROM */
soft_restart(0x41000000); soft_restart(0x41000000);
} else { } else {
......
#include <linux/reboot.h>
extern void footbridge_timer_init(void); extern void footbridge_timer_init(void);
extern void isa_timer_init(void); extern void isa_timer_init(void);
...@@ -8,4 +9,4 @@ extern void footbridge_map_io(void); ...@@ -8,4 +9,4 @@ extern void footbridge_map_io(void);
extern void footbridge_init_irq(void); extern void footbridge_init_irq(void);
extern void isa_init_irq(unsigned int irq); extern void isa_init_irq(unsigned int irq);
extern void footbridge_restart(char, const char *); extern void footbridge_restart(enum reboot_mode, const char *);
...@@ -634,9 +634,9 @@ fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi) ...@@ -634,9 +634,9 @@ fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi)
#endif #endif
} }
static void netwinder_restart(char mode, const char *cmd) static void netwinder_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 's') { if (mode == REBOOT_SOFT) {
/* Jump into the ROM */ /* Jump into the ROM */
soft_restart(0x41000000); soft_restart(0x41000000);
} else { } else {
......
#ifndef __HIGHBANK_CORE_H #ifndef __HIGHBANK_CORE_H
#define __HIGHBANK_CORE_H #define __HIGHBANK_CORE_H
#include <linux/reboot.h>
extern void highbank_set_cpu_jump(int cpu, void *jump_addr); extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
extern void highbank_restart(char, const char *); extern void highbank_restart(enum reboot_mode, const char *);
extern void __iomem *scu_base_addr; extern void __iomem *scu_base_addr;
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
......
...@@ -15,13 +15,14 @@ ...@@ -15,13 +15,14 @@
*/ */
#include <linux/io.h> #include <linux/io.h>
#include <asm/proc-fns.h> #include <asm/proc-fns.h>
#include <linux/reboot.h>
#include "core.h" #include "core.h"
#include "sysregs.h" #include "sysregs.h"
void highbank_restart(char mode, const char *cmd) void highbank_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 'h') if (mode == REBOOT_HARD)
highbank_set_pwr_hard_reset(); highbank_set_pwr_hard_reset();
else else
highbank_set_pwr_soft_reset(); highbank_set_pwr_soft_reset();
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#ifndef __ASM_ARCH_MXC_COMMON_H__ #ifndef __ASM_ARCH_MXC_COMMON_H__
#define __ASM_ARCH_MXC_COMMON_H__ #define __ASM_ARCH_MXC_COMMON_H__
#include <linux/reboot.h>
struct platform_device; struct platform_device;
struct pt_regs; struct pt_regs;
struct clk; struct clk;
...@@ -71,7 +73,7 @@ extern int mx53_clocks_init_dt(void); ...@@ -71,7 +73,7 @@ extern int mx53_clocks_init_dt(void);
extern struct platform_device *mxc_register_gpio(char *name, int id, extern struct platform_device *mxc_register_gpio(char *name, int id,
resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
extern void mxc_set_cpu_type(unsigned int type); extern void mxc_set_cpu_type(unsigned int type);
extern void mxc_restart(char, const char *); extern void mxc_restart(enum reboot_mode, const char *);
extern void mxc_arch_reset_init(void __iomem *); extern void mxc_arch_reset_init(void __iomem *);
extern void mxc_arch_reset_init_dt(void); extern void mxc_arch_reset_init_dt(void);
extern int mx53_revision(void); extern int mx53_revision(void);
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/opp.h> #include <linux/opp.h>
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/reboot.h>
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/micrel_phy.h> #include <linux/micrel_phy.h>
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
...@@ -67,7 +68,7 @@ static void __init imx6q_init_revision(void) ...@@ -67,7 +68,7 @@ static void __init imx6q_init_revision(void)
mxc_set_cpu_type(rev >> 16 & 0xff); mxc_set_cpu_type(rev >> 16 & 0xff);
} }
static void imx6q_restart(char mode, const char *cmd) static void imx6q_restart(enum reboot_mode mode, const char *cmd)
{ {
struct device_node *np; struct device_node *np;
void __iomem *wdog_base; void __iomem *wdog_base;
......
...@@ -37,7 +37,7 @@ static struct clk *wdog_clk; ...@@ -37,7 +37,7 @@ static struct clk *wdog_clk;
/* /*
* Reset the system. It is called by machine_restart(). * Reset the system. It is called by machine_restart().
*/ */
void mxc_restart(char mode, const char *cmd) void mxc_restart(enum reboot_mode mode, const char *cmd)
{ {
unsigned int wcr_enable; unsigned int wcr_enable;
......
#include <linux/reboot.h>
#include <linux/amba/serial.h> #include <linux/amba/serial.h>
extern struct amba_pl010_data ap_uart_data; extern struct amba_pl010_data ap_uart_data;
void integrator_init_early(void); void integrator_init_early(void);
int integrator_init(bool is_cp); int integrator_init(bool is_cp);
void integrator_reserve(void); void integrator_reserve(void);
void integrator_restart(char, const char *); void integrator_restart(enum reboot_mode, const char *);
void integrator_init_sysfs(struct device *parent, u32 id); void integrator_init_sysfs(struct device *parent, u32 id);
...@@ -124,7 +124,7 @@ void __init integrator_reserve(void) ...@@ -124,7 +124,7 @@ void __init integrator_reserve(void)
/* /*
* To reset, we hit the on-board reset register in the system FPGA * To reset, we hit the on-board reset register in the system FPGA
*/ */
void integrator_restart(char mode, const char *cmd) void integrator_restart(enum reboot_mode mode, const char *cmd)
{ {
cm_control(CM_CTRL_RESET, CM_CTRL_RESET); cm_control(CM_CTRL_RESET, CM_CTRL_RESET);
} }
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
#define _IOP13XX_HW_H_ #define _IOP13XX_HW_H_
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/reboot.h>
/* The ATU offsets can change based on the strapping */ /* The ATU offsets can change based on the strapping */
extern u32 iop13xx_atux_pmmr_offset; extern u32 iop13xx_atux_pmmr_offset;
extern u32 iop13xx_atue_pmmr_offset; extern u32 iop13xx_atue_pmmr_offset;
...@@ -11,7 +14,7 @@ void iop13xx_map_io(void); ...@@ -11,7 +14,7 @@ void iop13xx_map_io(void);
void iop13xx_platform_init(void); void iop13xx_platform_init(void);
void iop13xx_add_tpmi_devices(void); void iop13xx_add_tpmi_devices(void);
void iop13xx_init_irq(void); void iop13xx_init_irq(void);
void iop13xx_restart(char, const char *); void iop13xx_restart(enum reboot_mode, const char *);
/* CPUID CP6 R0 Page 0 */ /* CPUID CP6 R0 Page 0 */
static inline int iop13xx_cpu_id(void) static inline int iop13xx_cpu_id(void)
......
...@@ -594,7 +594,7 @@ __setup("iop13xx_init_adma", iop13xx_init_adma_setup); ...@@ -594,7 +594,7 @@ __setup("iop13xx_init_adma", iop13xx_init_adma_setup);
__setup("iop13xx_init_uart", iop13xx_init_uart_setup); __setup("iop13xx_init_uart", iop13xx_init_uart_setup);
__setup("iop13xx_init_i2c", iop13xx_init_i2c_setup); __setup("iop13xx_init_i2c", iop13xx_init_i2c_setup);
void iop13xx_restart(char mode, const char *cmd) void iop13xx_restart(enum reboot_mode mode, const char *cmd)
{ {
/* /*
* Reset the internal bus (warning both cores are reset) * Reset the internal bus (warning both cores are reset)
......
...@@ -286,7 +286,7 @@ static void n2100_power_off(void) ...@@ -286,7 +286,7 @@ static void n2100_power_off(void)
; ;
} }
static void n2100_restart(char mode, const char *cmd) static void n2100_restart(enum reboot_mode mode, const char *cmd)
{ {
gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW); gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT); gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
......
...@@ -531,9 +531,9 @@ static void __init ixp4xx_clockevent_init(void) ...@@ -531,9 +531,9 @@ static void __init ixp4xx_clockevent_init(void)
0xf, 0xfffffffe); 0xf, 0xfffffffe);
} }
void ixp4xx_restart(char mode, const char *cmd) void ixp4xx_restart(enum reboot_mode mode, const char *cmd)
{ {
if ( 1 && mode == 's') { if ( 1 && mode == REBOOT_SOFT) {
/* Jump into ROM at address 0 */ /* Jump into ROM at address 0 */
soft_restart(0); soft_restart(0);
} else { } else {
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
#include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/flash.h> #include <asm/mach/flash.h>
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/reboot.h>
#include <asm/types.h> #include <asm/types.h>
#ifndef __ARMEB__ #ifndef __ARMEB__
...@@ -123,7 +125,7 @@ extern void ixp4xx_init_early(void); ...@@ -123,7 +125,7 @@ extern void ixp4xx_init_early(void);
extern void ixp4xx_init_irq(void); extern void ixp4xx_init_irq(void);
extern void ixp4xx_sys_init(void); extern void ixp4xx_sys_init(void);
extern void ixp4xx_timer_init(void); extern void ixp4xx_timer_init(void);
extern void ixp4xx_restart(char, const char *); extern void ixp4xx_restart(enum reboot_mode, const char *);
extern void ixp4xx_pci_preinit(void); extern void ixp4xx_pci_preinit(void);
struct pci_sys_data; struct pci_sys_data;
extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/mv643xx_i2c.h> #include <linux/mv643xx_i2c.h>
#include <linux/timex.h> #include <linux/timex.h>
#include <linux/kexec.h> #include <linux/kexec.h>
#include <linux/reboot.h>
#include <net/dsa.h> #include <net/dsa.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -722,7 +723,7 @@ void __init kirkwood_init(void) ...@@ -722,7 +723,7 @@ void __init kirkwood_init(void)
#endif #endif
} }
void kirkwood_restart(char mode, const char *cmd) void kirkwood_restart(enum reboot_mode mode, const char *cmd)
{ {
/* /*
* Enable soft reset to assert RSTOUTn. * Enable soft reset to assert RSTOUTn.
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#ifndef __ARCH_KIRKWOOD_COMMON_H #ifndef __ARCH_KIRKWOOD_COMMON_H
#define __ARCH_KIRKWOOD_COMMON_H #define __ARCH_KIRKWOOD_COMMON_H
#include <linux/reboot.h>
struct dsa_platform_data; struct dsa_platform_data;
struct mv643xx_eth_platform_data; struct mv643xx_eth_platform_data;
struct mv_sata_platform_data; struct mv_sata_platform_data;
...@@ -53,7 +55,7 @@ void kirkwood_audio_init(void); ...@@ -53,7 +55,7 @@ void kirkwood_audio_init(void);
void kirkwood_cpuidle_init(void); void kirkwood_cpuidle_init(void);
void kirkwood_cpufreq_init(void); void kirkwood_cpufreq_init(void);
void kirkwood_restart(char, const char *); void kirkwood_restart(enum reboot_mode, const char *);
void kirkwood_clk_init(void); void kirkwood_clk_init(void);
/* board init functions for boards not fully converted to fdt */ /* board init functions for boards not fully converted to fdt */
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
extern __init void ks8695_map_io(void); extern __init void ks8695_map_io(void);
extern __init void ks8695_init_irq(void); extern __init void ks8695_init_irq(void);
extern void ks8695_restart(char, const char *); extern void ks8695_restart(enum reboot_mode, const char *);
extern void ks8695_timer_init(void); extern void ks8695_timer_init(void);
...@@ -154,11 +154,11 @@ void __init ks8695_timer_init(void) ...@@ -154,11 +154,11 @@ void __init ks8695_timer_init(void)
setup_irq(KS8695_IRQ_TIMER1, &ks8695_timer_irq); setup_irq(KS8695_IRQ_TIMER1, &ks8695_timer_irq);
} }
void ks8695_restart(char mode, const char *cmd) void ks8695_restart(enum reboot_mode reboot_mode, const char *cmd)
{ {
unsigned int reg; unsigned int reg;
if (mode == 's') if (reboot_mode == REBOOT_SOFT)
soft_restart(0); soft_restart(0);
/* disable timer0 */ /* disable timer0 */
......
...@@ -207,11 +207,11 @@ void __init lpc32xx_map_io(void) ...@@ -207,11 +207,11 @@ void __init lpc32xx_map_io(void)
iotable_init(lpc32xx_io_desc, ARRAY_SIZE(lpc32xx_io_desc)); iotable_init(lpc32xx_io_desc, ARRAY_SIZE(lpc32xx_io_desc));
} }
void lpc23xx_restart(char mode, const char *cmd) void lpc23xx_restart(enum reboot_mode mode, const char *cmd)
{ {
switch (mode) { switch (mode) {
case 's': case REBOOT_SOFT:
case 'h': case REBOOT_HARD:
lpc32xx_watchdog_reset(); lpc32xx_watchdog_reset();
break; break;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <mach/board.h> #include <mach/board.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/reboot.h>
/* /*
* Other arch specific structures and functions * Other arch specific structures and functions
...@@ -29,7 +30,7 @@ extern void lpc32xx_timer_init(void); ...@@ -29,7 +30,7 @@ extern void lpc32xx_timer_init(void);
extern void __init lpc32xx_init_irq(void); extern void __init lpc32xx_init_irq(void);
extern void __init lpc32xx_map_io(void); extern void __init lpc32xx_map_io(void);
extern void __init lpc32xx_serial_init(void); extern void __init lpc32xx_serial_init(void);
extern void lpc23xx_restart(char, const char *); extern void lpc23xx_restart(enum reboot_mode, const char *);
/* /*
......
...@@ -47,7 +47,7 @@ void __init mmp_map_io(void) ...@@ -47,7 +47,7 @@ void __init mmp_map_io(void)
mmp_chip_id = __raw_readl(MMP_CHIPID); mmp_chip_id = __raw_readl(MMP_CHIPID);
} }
void mmp_restart(char mode, const char *cmd) void mmp_restart(enum reboot_mode mode, const char *cmd)
{ {
soft_restart(0); soft_restart(0);
} }
#include <linux/reboot.h>
#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
extern void timer_init(int irq); extern void timer_init(int irq);
extern void __init icu_init_irq(void); extern void __init icu_init_irq(void);
extern void __init mmp_map_io(void); extern void __init mmp_map_io(void);
extern void mmp_restart(char, const char *); extern void mmp_restart(enum reboot_mode, const char *);
extern void __init pxa168_clk_init(void); extern void __init pxa168_clk_init(void);
extern void __init pxa910_clk_init(void); extern void __init pxa910_clk_init(void);
extern void __init mmp2_clk_init(void); extern void __init mmp2_clk_init(void);
#ifndef __ASM_MACH_PXA168_H #ifndef __ASM_MACH_PXA168_H
#define __ASM_MACH_PXA168_H #define __ASM_MACH_PXA168_H
#include <linux/reboot.h>
extern void pxa168_timer_init(void); extern void pxa168_timer_init(void);
extern void __init pxa168_init_irq(void); extern void __init pxa168_init_irq(void);
extern void pxa168_restart(char, const char *); extern void pxa168_restart(enum reboot_mode, const char *);
extern void pxa168_clear_keypad_wakeup(void); extern void pxa168_clear_keypad_wakeup(void);
#include <linux/i2c.h> #include <linux/i2c.h>
......
...@@ -172,7 +172,7 @@ int __init pxa168_add_usb_host(struct mv_usb_platform_data *pdata) ...@@ -172,7 +172,7 @@ int __init pxa168_add_usb_host(struct mv_usb_platform_data *pdata)
return platform_device_register(&pxa168_device_usb_host); return platform_device_register(&pxa168_device_usb_host);
} }
void pxa168_restart(char mode, const char *cmd) void pxa168_restart(enum reboot_mode mode, const char *cmd)
{ {
soft_restart(0xffff0000); soft_restart(0xffff0000);
} }
...@@ -413,7 +413,7 @@ void __init mv78xx0_init(void) ...@@ -413,7 +413,7 @@ void __init mv78xx0_init(void)
clk_init(); clk_init();
} }
void mv78xx0_restart(char mode, const char *cmd) void mv78xx0_restart(enum reboot_mode mode, const char *cmd)
{ {
/* /*
* Enable soft reset to assert RSTOUTn. * Enable soft reset to assert RSTOUTn.
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#ifndef __ARCH_MV78XX0_COMMON_H #ifndef __ARCH_MV78XX0_COMMON_H
#define __ARCH_MV78XX0_COMMON_H #define __ARCH_MV78XX0_COMMON_H
#include <linux/reboot.h>
struct mv643xx_eth_platform_data; struct mv643xx_eth_platform_data;
struct mv_sata_platform_data; struct mv_sata_platform_data;
...@@ -45,7 +47,7 @@ void mv78xx0_uart1_init(void); ...@@ -45,7 +47,7 @@ void mv78xx0_uart1_init(void);
void mv78xx0_uart2_init(void); void mv78xx0_uart2_init(void);
void mv78xx0_uart3_init(void); void mv78xx0_uart3_init(void);
void mv78xx0_i2c_init(void); void mv78xx0_i2c_init(void);
void mv78xx0_restart(char, const char *); void mv78xx0_restart(enum reboot_mode, const char *);
extern void mv78xx0_timer_init(void); extern void mv78xx0_timer_init(void);
......
...@@ -17,7 +17,9 @@ ...@@ -17,7 +17,9 @@
#define ARMADA_XP_MAX_CPUS 4 #define ARMADA_XP_MAX_CPUS 4
void mvebu_restart(char mode, const char *cmd); #include <linux/reboot.h>
void mvebu_restart(enum reboot_mode mode, const char *cmd);
void armada_370_xp_init_irq(void); void armada_370_xp_init_irq(void);
void armada_370_xp_handle_irq(struct pt_regs *regs); void armada_370_xp_handle_irq(struct pt_regs *regs);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/reboot.h>
static void __iomem *system_controller_base; static void __iomem *system_controller_base;
...@@ -63,7 +64,7 @@ static struct of_device_id of_system_controller_table[] = { ...@@ -63,7 +64,7 @@ static struct of_device_id of_system_controller_table[] = {
{ /* end of list */ }, { /* end of list */ },
}; };
void mvebu_restart(char mode, const char *cmd) void mvebu_restart(enum reboot_mode mode, const char *cmd)
{ {
if (!system_controller_base) { if (!system_controller_base) {
pr_err("Cannot restart, system-controller not available: check the device tree\n"); pr_err("Cannot restart, system-controller not available: check the device tree\n");
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/irqchip/mxs.h> #include <linux/irqchip/mxs.h>
#include <linux/reboot.h>
#include <linux/micrel_phy.h> #include <linux/micrel_phy.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
...@@ -500,7 +501,7 @@ static void __init mxs_machine_init(void) ...@@ -500,7 +501,7 @@ static void __init mxs_machine_init(void)
/* /*
* Reset the system. It is called by machine_restart(). * Reset the system. It is called by machine_restart().
*/ */
static void mxs_restart(char mode, const char *cmd) static void mxs_restart(enum reboot_mode mode, const char *cmd)
{ {
struct device_node *np; struct device_node *np;
void __iomem *reset_addr; void __iomem *reset_addr;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-vic.h> #include <linux/irqchip/arm-vic.h>
#include <linux/reboot.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/netx-regs.h> #include <mach/netx-regs.h>
...@@ -187,7 +188,7 @@ static int __init netx_init(void) ...@@ -187,7 +188,7 @@ static int __init netx_init(void)
subsys_initcall(netx_init); subsys_initcall(netx_init);
void netx_restart(char mode, const char *cmd) void netx_restart(enum reboot_mode mode, const char *cmd)
{ {
writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES, writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES,
NETX_SYSTEM_RES_CR); NETX_SYSTEM_RES_CR);
......
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <linux/reboot.h>
extern void __init netx_map_io(void); extern void __init netx_map_io(void);
extern void __init netx_init_irq(void); extern void __init netx_init_irq(void);
extern void netx_restart(char, const char *); extern void netx_restart(enum reboot_mode, const char *);
extern void netx_timer_init(void); extern void netx_timer_init(void);
...@@ -103,7 +103,7 @@ static void __init cpu8815_map_io(void) ...@@ -103,7 +103,7 @@ static void __init cpu8815_map_io(void)
iotable_init(cpu8815_io_desc, ARRAY_SIZE(cpu8815_io_desc)); iotable_init(cpu8815_io_desc, ARRAY_SIZE(cpu8815_io_desc));
} }
static void cpu8815_restart(char mode, const char *cmd) static void cpu8815_restart(enum reboot_mode mode, const char *cmd)
{ {
void __iomem *srcbase = ioremap(NOMADIK_SRC_BASE, SZ_4K); void __iomem *srcbase = ioremap(NOMADIK_SRC_BASE, SZ_4K);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <linux/smc91x.h> #include <linux/smc91x.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/reboot.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -215,7 +216,7 @@ void voiceblue_wdt_ping(void) ...@@ -215,7 +216,7 @@ void voiceblue_wdt_ping(void)
gpio_set_value(0, wdt_gpio_state); gpio_set_value(0, wdt_gpio_state);
} }
static void voiceblue_restart(char mode, const char *cmd) static void voiceblue_restart(enum reboot_mode mode, const char *cmd)
{ {
/* /*
* Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/i2c-omap.h> #include <linux/i2c-omap.h>
#include <linux/reboot.h>
#include <plat/i2c.h> #include <plat/i2c.h>
...@@ -70,7 +71,7 @@ static inline int omap_serial_wakeup_init(void) ...@@ -70,7 +71,7 @@ static inline int omap_serial_wakeup_init(void)
void omap1_init_early(void); void omap1_init_early(void);
void omap1_init_irq(void); void omap1_init_irq(void);
void omap1_init_late(void); void omap1_init_late(void);
void omap1_restart(char, const char *); void omap1_restart(enum reboot_mode, const char *);
extern void __init omap_check_revision(void); extern void __init omap_check_revision(void);
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/reboot.h>
#include <mach/hardware.h> #include <mach/hardware.h>
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
#define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5 #define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5
void omap1_restart(char mode, const char *cmd) void omap1_restart(enum reboot_mode mode, const char *cmd)
{ {
/* /*
* Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/reboot.h>
#include "common.h" #include "common.h"
#include "prm-regbits-33xx.h" #include "prm-regbits-33xx.h"
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
* Resets the SoC. For @cmd, see the 'reboot' syscall in * Resets the SoC. For @cmd, see the 'reboot' syscall in
* kernel/sys.c. No return value. * kernel/sys.c. No return value.
*/ */
void am33xx_restart(char mode, const char *cmd) void am33xx_restart(enum reboot_mode mode, const char *cmd)
{ {
/* TODO: Handle mode and cmd if necessary */ /* TODO: Handle mode and cmd if necessary */
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c/twl.h> #include <linux/i2c/twl.h>
#include <linux/i2c-omap.h> #include <linux/i2c-omap.h>
#include <linux/reboot.h>
#include <asm/proc-fns.h> #include <asm/proc-fns.h>
...@@ -119,33 +120,33 @@ static inline void omap_soc_device_init(void) ...@@ -119,33 +120,33 @@ static inline void omap_soc_device_init(void)
#endif #endif
#if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) #if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430)
void omap2xxx_restart(char mode, const char *cmd); void omap2xxx_restart(enum reboot_mode mode, const char *cmd);
#else #else
static inline void omap2xxx_restart(char mode, const char *cmd) static inline void omap2xxx_restart(enum reboot_mode mode, const char *cmd)
{ {
} }
#endif #endif
#ifdef CONFIG_SOC_AM33XX #ifdef CONFIG_SOC_AM33XX
void am33xx_restart(char mode, const char *cmd); void am33xx_restart(enum reboot_mode mode, const char *cmd);
#else #else
static inline void am33xx_restart(char mode, const char *cmd) static inline void am33xx_restart(enum reboot_mode mode, const char *cmd)
{ {
} }
#endif #endif
#ifdef CONFIG_ARCH_OMAP3 #ifdef CONFIG_ARCH_OMAP3
void omap3xxx_restart(char mode, const char *cmd); void omap3xxx_restart(enum reboot_mode mode, const char *cmd);
#else #else
static inline void omap3xxx_restart(char mode, const char *cmd) static inline void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
{ {
} }
#endif #endif
#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
void omap44xx_restart(char mode, const char *cmd); void omap44xx_restart(enum reboot_mode mode, const char *cmd);
#else #else
static inline void omap44xx_restart(char mode, const char *cmd) static inline void omap44xx_restart(enum reboot_mode mode, const char *cmd)
{ {
} }
#endif #endif
......
...@@ -31,7 +31,7 @@ static struct clk *reset_virt_prcm_set_ck, *reset_sys_ck; ...@@ -31,7 +31,7 @@ static struct clk *reset_virt_prcm_set_ck, *reset_sys_ck;
* Set the DPLL to bypass so that reboot completes successfully. No * Set the DPLL to bypass so that reboot completes successfully. No
* return value. * return value.
*/ */
void omap2xxx_restart(char mode, const char *cmd) void omap2xxx_restart(enum reboot_mode mode, const char *cmd)
{ {
u32 rate; u32 rate;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/reboot.h>
#include "iomap.h" #include "iomap.h"
#include "common.h" #include "common.h"
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
* Resets the SoC. For @cmd, see the 'reboot' syscall in * Resets the SoC. For @cmd, see the 'reboot' syscall in
* kernel/sys.c. No return value. * kernel/sys.c. No return value.
*/ */
void omap3xxx_restart(char mode, const char *cmd) void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
{ {
omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
omap3xxx_prm_dpll3_reset(); /* never returns */ omap3xxx_prm_dpll3_reset(); /* never returns */
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/export.h> #include <linux/export.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/reboot.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*/ */
#include <linux/types.h> #include <linux/types.h>
#include <linux/reboot.h>
#include "prminst44xx.h" #include "prminst44xx.h"
/** /**
...@@ -18,7 +19,7 @@ ...@@ -18,7 +19,7 @@
* Resets the SoC. For @cmd, see the 'reboot' syscall in * Resets the SoC. For @cmd, see the 'reboot' syscall in
* kernel/sys.c. No return value. * kernel/sys.c. No return value.
*/ */
void omap44xx_restart(char mode, const char *cmd) void omap44xx_restart(enum reboot_mode mode, const char *cmd)
{ {
/* XXX Should save 'cmd' into scratchpad for use after reboot */ /* XXX Should save 'cmd' into scratchpad for use after reboot */
omap4_prminst_global_warm_sw_reset(); /* never returns */ omap4_prminst_global_warm_sw_reset(); /* never returns */
......
...@@ -347,7 +347,7 @@ void __init orion5x_init(void) ...@@ -347,7 +347,7 @@ void __init orion5x_init(void)
orion5x_wdt_init(); orion5x_wdt_init();
} }
void orion5x_restart(char mode, const char *cmd) void orion5x_restart(enum reboot_mode mode, const char *cmd)
{ {
/* /*
* Enable and issue soft reset * Enable and issue soft reset
......
#ifndef __ARCH_ORION5X_COMMON_H #ifndef __ARCH_ORION5X_COMMON_H
#define __ARCH_ORION5X_COMMON_H #define __ARCH_ORION5X_COMMON_H
#include <linux/reboot.h>
struct dsa_platform_data; struct dsa_platform_data;
struct mv643xx_eth_platform_data; struct mv643xx_eth_platform_data;
struct mv_sata_platform_data; struct mv_sata_platform_data;
...@@ -29,7 +31,7 @@ void orion5x_spi_init(void); ...@@ -29,7 +31,7 @@ void orion5x_spi_init(void);
void orion5x_uart0_init(void); void orion5x_uart0_init(void);
void orion5x_uart1_init(void); void orion5x_uart1_init(void);
void orion5x_xor_init(void); void orion5x_xor_init(void);
void orion5x_restart(char, const char *); void orion5x_restart(enum reboot_mode, const char *);
/* /*
* PCIe/PCI functions. * PCIe/PCI functions.
......
...@@ -139,7 +139,7 @@ static struct mv_sata_platform_data lschl_sata_data = { ...@@ -139,7 +139,7 @@ static struct mv_sata_platform_data lschl_sata_data = {
static void lschl_power_off(void) static void lschl_power_off(void)
{ {
orion5x_restart('h', NULL); orion5x_restart(REBOOT_HARD, NULL);
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -185,7 +185,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = { ...@@ -185,7 +185,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = {
static void ls_hgl_power_off(void) static void ls_hgl_power_off(void)
{ {
orion5x_restart('h', NULL); orion5x_restart(REBOOT_HARD, NULL);
} }
......
...@@ -185,7 +185,7 @@ static struct mv_sata_platform_data lsmini_sata_data = { ...@@ -185,7 +185,7 @@ static struct mv_sata_platform_data lsmini_sata_data = {
static void lsmini_power_off(void) static void lsmini_power_off(void)
{ {
orion5x_restart('h', NULL); orion5x_restart(REBOOT_HARD, NULL);
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/reboot.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -63,7 +64,7 @@ static const char *picoxcell_dt_match[] = { ...@@ -63,7 +64,7 @@ static const char *picoxcell_dt_match[] = {
NULL NULL
}; };
static void picoxcell_wdt_restart(char mode, const char *cmd) static void picoxcell_wdt_restart(enum reboot_mode mode, const char *cmd)
{ {
/* /*
* Configure the watchdog to reset with the shortest possible timeout * Configure the watchdog to reset with the shortest possible timeout
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#define __MACH_PRIMA2_COMMON_H__ #define __MACH_PRIMA2_COMMON_H__
#include <linux/init.h> #include <linux/init.h>
#include <linux/reboot.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <asm/exception.h> #include <asm/exception.h>
...@@ -22,7 +24,7 @@ extern void sirfsoc_cpu_die(unsigned int cpu); ...@@ -22,7 +24,7 @@ extern void sirfsoc_cpu_die(unsigned int cpu);
extern void __init sirfsoc_of_irq_init(void); extern void __init sirfsoc_of_irq_init(void);
extern void __init sirfsoc_of_clk_init(void); extern void __init sirfsoc_of_clk_init(void);
extern void sirfsoc_restart(char, const char *); extern void sirfsoc_restart(enum reboot_mode, const char *);
extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs);
#ifndef CONFIG_DEBUG_LL #ifndef CONFIG_DEBUG_LL
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/reboot.h>
void __iomem *sirfsoc_rstc_base; void __iomem *sirfsoc_rstc_base;
static DEFINE_MUTEX(rstc_lock); static DEFINE_MUTEX(rstc_lock);
...@@ -84,7 +85,7 @@ int sirfsoc_reset_device(struct device *dev) ...@@ -84,7 +85,7 @@ int sirfsoc_reset_device(struct device *dev)
#define SIRFSOC_SYS_RST_BIT BIT(31) #define SIRFSOC_SYS_RST_BIT BIT(31)
void sirfsoc_restart(char mode, const char *cmd) void sirfsoc_restart(enum reboot_mode mode, const char *cmd)
{ {
writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
} }
...@@ -663,16 +663,16 @@ static void corgi_poweroff(void) ...@@ -663,16 +663,16 @@ static void corgi_poweroff(void)
/* Green LED off tells the bootloader to halt */ /* Green LED off tells the bootloader to halt */
gpio_set_value(CORGI_GPIO_LED_GREEN, 0); gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
pxa_restart('h', NULL); pxa_restart(REBOOT_HARD, NULL);
} }
static void corgi_restart(char mode, const char *cmd) static void corgi_restart(enum reboot_mode mode, const char *cmd)
{ {
if (!machine_is_corgi()) if (!machine_is_corgi())
/* Green LED on tells the bootloader to reboot */ /* Green LED on tells the bootloader to reboot */
gpio_set_value(CORGI_GPIO_LED_GREEN, 1); gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
pxa_restart('h', cmd); pxa_restart(REBOOT_HARD, cmd);
} }
static void __init corgi_init(void) static void __init corgi_init(void)
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/reboot.h>
struct irq_data; struct irq_data;
extern void pxa_timer_init(void); extern void pxa_timer_init(void);
...@@ -56,4 +58,4 @@ void __init pxa_set_btuart_info(void *info); ...@@ -56,4 +58,4 @@ void __init pxa_set_btuart_info(void *info);
void __init pxa_set_stuart_info(void *info); void __init pxa_set_stuart_info(void *info);
void __init pxa_set_hwuart_info(void *info); void __init pxa_set_hwuart_info(void *info);
void pxa_restart(char, const char *); void pxa_restart(enum reboot_mode, const char *);
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <linux/wm97xx.h> #include <linux/wm97xx.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/usb/gpio_vbus.h> #include <linux/usb/gpio_vbus.h>
#include <linux/reboot.h>
#include <linux/regulator/max1586.h> #include <linux/regulator/max1586.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/i2c/pxa-i2c.h> #include <linux/i2c/pxa-i2c.h>
...@@ -696,13 +697,13 @@ static void mioa701_machine_exit(void); ...@@ -696,13 +697,13 @@ static void mioa701_machine_exit(void);
static void mioa701_poweroff(void) static void mioa701_poweroff(void)
{ {
mioa701_machine_exit(); mioa701_machine_exit();
pxa_restart('s', NULL); pxa_restart(REBOOT_SOFT, NULL);
} }
static void mioa701_restart(char c, const char *cmd) static void mioa701_restart(enum reboot_mode c, const char *cmd)
{ {
mioa701_machine_exit(); mioa701_machine_exit();
pxa_restart('s', cmd); pxa_restart(REBOOT_SOFT, cmd);
} }
static struct gpio global_gpios[] = { static struct gpio global_gpios[] = {
......
...@@ -422,7 +422,7 @@ static struct i2c_board_info __initdata poodle_i2c_devices[] = { ...@@ -422,7 +422,7 @@ static struct i2c_board_info __initdata poodle_i2c_devices[] = {
static void poodle_poweroff(void) static void poodle_poweroff(void)
{ {
pxa_restart('h', NULL); pxa_restart(REBOOT_HARD, NULL);
} }
static void __init poodle_init(void) static void __init poodle_init(void)
......
...@@ -83,7 +83,7 @@ static void do_hw_reset(void) ...@@ -83,7 +83,7 @@ static void do_hw_reset(void)
writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3);
} }
void pxa_restart(char mode, const char *cmd) void pxa_restart(enum reboot_mode mode, const char *cmd)
{ {
local_irq_disable(); local_irq_disable();
local_fiq_disable(); local_fiq_disable();
...@@ -91,14 +91,14 @@ void pxa_restart(char mode, const char *cmd) ...@@ -91,14 +91,14 @@ void pxa_restart(char mode, const char *cmd)
clear_reset_status(RESET_STATUS_ALL); clear_reset_status(RESET_STATUS_ALL);
switch (mode) { switch (mode) {
case 's': case REBOOT_SOFT:
/* Jump into ROM at address 0 */ /* Jump into ROM at address 0 */
soft_restart(0); soft_restart(0);
break; break;
case 'g': case REBOOT_GPIO:
do_gpio_reset(); do_gpio_reset();
break; break;
case 'h': case REBOOT_HARD:
default: default:
do_hw_reset(); do_hw_reset();
break; break;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/reboot.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -924,10 +925,10 @@ static inline void spitz_i2c_init(void) {} ...@@ -924,10 +925,10 @@ static inline void spitz_i2c_init(void) {}
******************************************************************************/ ******************************************************************************/
static void spitz_poweroff(void) static void spitz_poweroff(void)
{ {
pxa_restart('g', NULL); pxa_restart(REBOOT_GPIO, NULL);
} }
static void spitz_restart(char mode, const char *cmd) static void spitz_restart(enum reboot_mode mode, const char *cmd)
{ {
uint32_t msc0 = __raw_readl(MSC0); uint32_t msc0 = __raw_readl(MSC0);
/* Bootloader magic for a reboot */ /* Bootloader magic for a reboot */
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <linux/input/matrix_keypad.h> #include <linux/input/matrix_keypad.h>
#include <linux/i2c/pxa-i2c.h> #include <linux/i2c/pxa-i2c.h>
#include <linux/usb/gpio_vbus.h> #include <linux/usb/gpio_vbus.h>
#include <linux/reboot.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -911,10 +912,10 @@ static struct platform_device *devices[] __initdata = { ...@@ -911,10 +912,10 @@ static struct platform_device *devices[] __initdata = {
static void tosa_poweroff(void) static void tosa_poweroff(void)
{ {
pxa_restart('g', NULL); pxa_restart(REBOOT_GPIO, NULL);
} }
static void tosa_restart(char mode, const char *cmd) static void tosa_restart(enum reboot_mode mode, const char *cmd)
{ {
uint32_t msc0 = __raw_readl(MSC0); uint32_t msc0 = __raw_readl(MSC0);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/clk-realview.h> #include <linux/platform_data/clk-realview.h>
#include <linux/reboot.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -418,7 +419,7 @@ static void __init realview_eb_timer_init(void) ...@@ -418,7 +419,7 @@ static void __init realview_eb_timer_init(void)
realview_eb_twd_init(); realview_eb_twd_init();
} }
static void realview_eb_restart(char mode, const char *cmd) static void realview_eb_restart(enum reboot_mode mode, const char *cmd)
{ {
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/clk-realview.h> #include <linux/platform_data/clk-realview.h>
#include <linux/reboot.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -329,7 +330,7 @@ static void __init realview_pb1176_timer_init(void) ...@@ -329,7 +330,7 @@ static void __init realview_pb1176_timer_init(void)
realview_timer_init(IRQ_DC1176_TIMER0); realview_timer_init(IRQ_DC1176_TIMER0);
} }
static void realview_pb1176_restart(char mode, const char *cmd) static void realview_pb1176_restart(enum reboot_mode mode, const char *cmd)
{ {
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/clk-realview.h> #include <linux/platform_data/clk-realview.h>
#include <linux/reboot.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -316,7 +317,7 @@ static void __init realview_pb11mp_timer_init(void) ...@@ -316,7 +317,7 @@ static void __init realview_pb11mp_timer_init(void)
realview_pb11mp_twd_init(); realview_pb11mp_twd_init();
} }
static void realview_pb11mp_restart(char mode, const char *cmd) static void realview_pb11mp_restart(enum reboot_mode mode, const char *cmd)
{ {
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/clk-realview.h> #include <linux/platform_data/clk-realview.h>
#include <linux/reboot.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -264,7 +265,7 @@ static void __init realview_pba8_timer_init(void) ...@@ -264,7 +265,7 @@ static void __init realview_pba8_timer_init(void)
realview_timer_init(IRQ_PBA8_TIMER0_1); realview_timer_init(IRQ_PBA8_TIMER0_1);
} }
static void realview_pba8_restart(char mode, const char *cmd) static void realview_pba8_restart(enum reboot_mode mode, const char *cmd)
{ {
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/clk-realview.h> #include <linux/platform_data/clk-realview.h>
#include <linux/reboot.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -344,7 +345,7 @@ static void realview_pbx_fixup(struct tag *tags, char **from, ...@@ -344,7 +345,7 @@ static void realview_pbx_fixup(struct tag *tags, char **from,
#endif #endif
} }
static void realview_pbx_restart(char mode, const char *cmd) static void realview_pbx_restart(enum reboot_mode mode, const char *cmd)
{ {
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/reboot.h>
#include <asm/elf.h> #include <asm/elf.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -201,7 +202,7 @@ static int __init rpc_init(void) ...@@ -201,7 +202,7 @@ static int __init rpc_init(void)
arch_initcall(rpc_init); arch_initcall(rpc_init);
static void rpc_restart(char mode, const char *cmd) static void rpc_restart(enum reboot_mode mode, const char *cmd)
{ {
iomd_writeb(0, IOMD_ROMCR0); iomd_writeb(0, IOMD_ROMCR0);
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H #ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H
#define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__ #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
#include <linux/reboot.h>
struct s3c2410_uartcfg; struct s3c2410_uartcfg;
#ifdef CONFIG_CPU_S3C2410 #ifdef CONFIG_CPU_S3C2410
...@@ -20,7 +22,7 @@ extern int s3c2410a_init(void); ...@@ -20,7 +22,7 @@ extern int s3c2410a_init(void);
extern void s3c2410_map_io(void); extern void s3c2410_map_io(void);
extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
extern void s3c2410_init_clocks(int xtal); extern void s3c2410_init_clocks(int xtal);
extern void s3c2410_restart(char mode, const char *cmd); extern void s3c2410_restart(enum reboot_mode mode, const char *cmd);
extern void s3c2410_init_irq(void); extern void s3c2410_init_irq(void);
#else #else
#define s3c2410_init_clocks NULL #define s3c2410_init_clocks NULL
...@@ -36,7 +38,7 @@ extern void s3c2412_map_io(void); ...@@ -36,7 +38,7 @@ extern void s3c2412_map_io(void);
extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
extern void s3c2412_init_clocks(int xtal); extern void s3c2412_init_clocks(int xtal);
extern int s3c2412_baseclk_add(void); extern int s3c2412_baseclk_add(void);
extern void s3c2412_restart(char mode, const char *cmd); extern void s3c2412_restart(enum reboot_mode mode, const char *cmd);
extern void s3c2412_init_irq(void); extern void s3c2412_init_irq(void);
#else #else
#define s3c2412_init_clocks NULL #define s3c2412_init_clocks NULL
...@@ -51,7 +53,7 @@ extern void s3c2416_map_io(void); ...@@ -51,7 +53,7 @@ extern void s3c2416_map_io(void);
extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no); extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
extern void s3c2416_init_clocks(int xtal); extern void s3c2416_init_clocks(int xtal);
extern int s3c2416_baseclk_add(void); extern int s3c2416_baseclk_add(void);
extern void s3c2416_restart(char mode, const char *cmd); extern void s3c2416_restart(enum reboot_mode mode, const char *cmd);
extern void s3c2416_init_irq(void); extern void s3c2416_init_irq(void);
extern struct syscore_ops s3c2416_irq_syscore_ops; extern struct syscore_ops s3c2416_irq_syscore_ops;
...@@ -66,7 +68,7 @@ extern struct syscore_ops s3c2416_irq_syscore_ops; ...@@ -66,7 +68,7 @@ extern struct syscore_ops s3c2416_irq_syscore_ops;
extern void s3c244x_map_io(void); extern void s3c244x_map_io(void);
extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
extern void s3c244x_init_clocks(int xtal); extern void s3c244x_init_clocks(int xtal);
extern void s3c244x_restart(char mode, const char *cmd); extern void s3c244x_restart(enum reboot_mode mode, const char *cmd);
#else #else
#define s3c244x_init_clocks NULL #define s3c244x_init_clocks NULL
#define s3c244x_init_uarts NULL #define s3c244x_init_uarts NULL
...@@ -96,7 +98,7 @@ extern void s3c2443_map_io(void); ...@@ -96,7 +98,7 @@ extern void s3c2443_map_io(void);
extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
extern void s3c2443_init_clocks(int xtal); extern void s3c2443_init_clocks(int xtal);
extern int s3c2443_baseclk_add(void); extern int s3c2443_baseclk_add(void);
extern void s3c2443_restart(char mode, const char *cmd); extern void s3c2443_restart(enum reboot_mode mode, const char *cmd);
extern void s3c2443_init_irq(void); extern void s3c2443_init_irq(void);
#else #else
#define s3c2443_init_clocks NULL #define s3c2443_init_clocks NULL
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/syscore_ops.h> #include <linux/syscore_ops.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -196,9 +197,9 @@ int __init s3c2410a_init(void) ...@@ -196,9 +197,9 @@ int __init s3c2410a_init(void)
return s3c2410_init(); return s3c2410_init();
} }
void s3c2410_restart(char mode, const char *cmd) void s3c2410_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 's') { if (mode == REBOOT_SOFT) {
soft_restart(0); soft_restart(0);
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/reboot.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -129,9 +130,9 @@ static void s3c2412_idle(void) ...@@ -129,9 +130,9 @@ static void s3c2412_idle(void)
cpu_do_idle(); cpu_do_idle();
} }
void s3c2412_restart(char mode, const char *cmd) void s3c2412_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 's') if (mode == REBOOT_SOFT)
soft_restart(0); soft_restart(0);
/* errata "Watch-dog/Software Reset Problem" specifies that /* errata "Watch-dog/Software Reset Problem" specifies that
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <linux/syscore_ops.h> #include <linux/syscore_ops.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/reboot.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -79,9 +80,9 @@ static struct device s3c2416_dev = { ...@@ -79,9 +80,9 @@ static struct device s3c2416_dev = {
.bus = &s3c2416_subsys, .bus = &s3c2416_subsys,
}; };
void s3c2416_restart(char mode, const char *cmd) void s3c2416_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 's') if (mode == REBOOT_SOFT)
soft_restart(0); soft_restart(0);
__raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/reboot.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -59,9 +60,9 @@ static struct device s3c2443_dev = { ...@@ -59,9 +60,9 @@ static struct device s3c2443_dev = {
.bus = &s3c2443_subsys, .bus = &s3c2443_subsys,
}; };
void s3c2443_restart(char mode, const char *cmd) void s3c2443_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 's') if (mode == REBOOT_SOFT)
soft_restart(0); soft_restart(0);
__raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/syscore_ops.h> #include <linux/syscore_ops.h>
#include <linux/clk.h> #include <linux/clk.h>
...@@ -198,9 +199,9 @@ struct syscore_ops s3c244x_pm_syscore_ops = { ...@@ -198,9 +199,9 @@ struct syscore_ops s3c244x_pm_syscore_ops = {
.resume = s3c244x_resume, .resume = s3c244x_resume,
}; };
void s3c244x_restart(char mode, const char *cmd) void s3c244x_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 's') if (mode == REBOOT_SOFT)
soft_restart(0); soft_restart(0);
samsung_wdt_reset(); samsung_wdt_reset();
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/irq.h> #include <linux/irq.h>
...@@ -381,9 +382,9 @@ static int __init s3c64xx_init_irq_eint(void) ...@@ -381,9 +382,9 @@ static int __init s3c64xx_init_irq_eint(void)
} }
arch_initcall(s3c64xx_init_irq_eint); arch_initcall(s3c64xx_init_irq_eint);
void s3c64xx_restart(char mode, const char *cmd) void s3c64xx_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode != 's') if (mode != REBOOT_SOFT)
samsung_wdt_reset(); samsung_wdt_reset();
/* if all else fails, or mode was for soft, jump to 0 */ /* if all else fails, or mode was for soft, jump to 0 */
......
...@@ -17,13 +17,15 @@ ...@@ -17,13 +17,15 @@
#ifndef __ARCH_ARM_MACH_S3C64XX_COMMON_H #ifndef __ARCH_ARM_MACH_S3C64XX_COMMON_H
#define __ARCH_ARM_MACH_S3C64XX_COMMON_H #define __ARCH_ARM_MACH_S3C64XX_COMMON_H
#include <linux/reboot.h>
void s3c64xx_init_irq(u32 vic0, u32 vic1); void s3c64xx_init_irq(u32 vic0, u32 vic1);
void s3c64xx_init_io(struct map_desc *mach_desc, int size); void s3c64xx_init_io(struct map_desc *mach_desc, int size);
void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit); void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit);
void s3c64xx_setup_clocks(void); void s3c64xx_setup_clocks(void);
void s3c64xx_restart(char mode, const char *cmd); void s3c64xx_restart(enum reboot_mode mode, const char *cmd);
void s3c64xx_init_late(void); void s3c64xx_init_late(void);
#ifdef CONFIG_CPU_S3C6400 #ifdef CONFIG_CPU_S3C6400
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/reboot.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/proc-fns.h> #include <asm/proc-fns.h>
...@@ -439,9 +440,9 @@ static int __init s5p64x0_init_irq_eint(void) ...@@ -439,9 +440,9 @@ static int __init s5p64x0_init_irq_eint(void)
} }
arch_initcall(s5p64x0_init_irq_eint); arch_initcall(s5p64x0_init_irq_eint);
void s5p64x0_restart(char mode, const char *cmd) void s5p64x0_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode != 's') if (mode != REBOOT_SOFT)
samsung_wdt_reset(); samsung_wdt_reset();
soft_restart(0); soft_restart(0);
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#ifndef __ARCH_ARM_MACH_S5P64X0_COMMON_H #ifndef __ARCH_ARM_MACH_S5P64X0_COMMON_H
#define __ARCH_ARM_MACH_S5P64X0_COMMON_H #define __ARCH_ARM_MACH_S5P64X0_COMMON_H
#include <linux/reboot.h>
void s5p6440_init_irq(void); void s5p6440_init_irq(void);
void s5p6450_init_irq(void); void s5p6450_init_irq(void);
void s5p64x0_init_io(struct map_desc *mach_desc, int size); void s5p64x0_init_io(struct map_desc *mach_desc, int size);
...@@ -22,7 +24,7 @@ void s5p6440_setup_clocks(void); ...@@ -22,7 +24,7 @@ void s5p6440_setup_clocks(void);
void s5p6450_register_clocks(void); void s5p6450_register_clocks(void);
void s5p6450_setup_clocks(void); void s5p6450_setup_clocks(void);
void s5p64x0_restart(char mode, const char *cmd); void s5p64x0_restart(enum reboot_mode mode, const char *cmd);
#ifdef CONFIG_CPU_S5P6440 #ifdef CONFIG_CPU_S5P6440
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/reboot.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/proc-fns.h> #include <asm/proc-fns.h>
...@@ -217,9 +218,9 @@ void __init s5pc100_init_uarts(struct s3c2410_uartcfg *cfg, int no) ...@@ -217,9 +218,9 @@ void __init s5pc100_init_uarts(struct s3c2410_uartcfg *cfg, int no)
s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no);
} }
void s5pc100_restart(char mode, const char *cmd) void s5pc100_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode != 's') if (mode != REBOOT_SOFT)
samsung_wdt_reset(); samsung_wdt_reset();
soft_restart(0); soft_restart(0);
......
...@@ -12,13 +12,15 @@ ...@@ -12,13 +12,15 @@
#ifndef __ARCH_ARM_MACH_S5PC100_COMMON_H #ifndef __ARCH_ARM_MACH_S5PC100_COMMON_H
#define __ARCH_ARM_MACH_S5PC100_COMMON_H #define __ARCH_ARM_MACH_S5PC100_COMMON_H
#include <linux/reboot.h>
void s5pc100_init_io(struct map_desc *mach_desc, int size); void s5pc100_init_io(struct map_desc *mach_desc, int size);
void s5pc100_init_irq(void); void s5pc100_init_irq(void);
void s5pc100_register_clocks(void); void s5pc100_register_clocks(void);
void s5pc100_setup_clocks(void); void s5pc100_setup_clocks(void);
void s5pc100_restart(char mode, const char *cmd); void s5pc100_restart(enum reboot_mode mode, const char *cmd);
extern int s5pc100_init(void); extern int s5pc100_init(void);
extern void s5pc100_map_io(void); extern void s5pc100_map_io(void);
......
...@@ -143,7 +143,7 @@ static struct map_desc s5pv210_iodesc[] __initdata = { ...@@ -143,7 +143,7 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
} }
}; };
void s5pv210_restart(char mode, const char *cmd) void s5pv210_restart(enum reboot_mode mode, const char *cmd)
{ {
__raw_writel(0x1, S5P_SWRESET); __raw_writel(0x1, S5P_SWRESET);
} }
......
...@@ -12,13 +12,15 @@ ...@@ -12,13 +12,15 @@
#ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H #ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H
#define __ARCH_ARM_MACH_S5PV210_COMMON_H #define __ARCH_ARM_MACH_S5PV210_COMMON_H
#include <linux/reboot.h>
void s5pv210_init_io(struct map_desc *mach_desc, int size); void s5pv210_init_io(struct map_desc *mach_desc, int size);
void s5pv210_init_irq(void); void s5pv210_init_irq(void);
void s5pv210_register_clocks(void); void s5pv210_register_clocks(void);
void s5pv210_setup_clocks(void); void s5pv210_setup_clocks(void);
void s5pv210_restart(char mode, const char *cmd); void s5pv210_restart(enum reboot_mode mode, const char *cmd);
extern int s5pv210_init(void); extern int s5pv210_init(void);
extern void s5pv210_map_io(void); extern void s5pv210_map_io(void);
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/cpufreq.h> #include <linux/cpufreq.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/reboot.h>
#include <video/sa1100fb.h> #include <video/sa1100fb.h>
...@@ -131,9 +132,9 @@ static void sa1100_power_off(void) ...@@ -131,9 +132,9 @@ static void sa1100_power_off(void)
PMCR = PMCR_SF; PMCR = PMCR_SF;
} }
void sa11x0_restart(char mode, const char *cmd) void sa11x0_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 's') { if (mode == REBOOT_SOFT) {
/* Jump into ROM at address 0 */ /* Jump into ROM at address 0 */
soft_restart(0); soft_restart(0);
} else { } else {
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
* *
* Author: Nicolas Pitre * Author: Nicolas Pitre
*/ */
#include <linux/reboot.h>
extern void sa1100_timer_init(void); extern void sa1100_timer_init(void);
extern void __init sa1100_map_io(void); extern void __init sa1100_map_io(void);
extern void __init sa1100_init_irq(void); extern void __init sa1100_init_irq(void);
extern void __init sa1100_init_gpio(void); extern void __init sa1100_init_gpio(void);
extern void sa11x0_restart(char, const char *); extern void sa11x0_restart(enum reboot_mode, const char *);
extern void sa11x0_init_late(void); extern void sa11x0_init_late(void);
#define SET_BANK(__nr,__start,__size) \ #define SET_BANK(__nr,__start,__size) \
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/reboot.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
#define ROMCARD_SIZE 0x08000000 #define ROMCARD_SIZE 0x08000000
#define ROMCARD_START 0x10000000 #define ROMCARD_START 0x10000000
static void shark_restart(char mode, const char *cmd) static void shark_restart(enum reboot_mode mode, const char *cmd)
{ {
short temp; short temp;
/* Reset the Machine via pc[3] of the sequoia chipset */ /* Reset the Machine via pc[3] of the sequoia chipset */
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <linux/mmc/sh_mmcif.h> #include <linux/mmc/sh_mmcif.h>
#include <linux/mmc/sh_mobile_sdhi.h> #include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
#include <linux/reboot.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include <mach/r8a7740.h> #include <mach/r8a7740.h>
...@@ -1259,7 +1260,7 @@ static void __init eva_add_early_devices(void) ...@@ -1259,7 +1260,7 @@ static void __init eva_add_early_devices(void)
} }
#define RESCNT2 IOMEM(0xe6188020) #define RESCNT2 IOMEM(0xe6188020)
static void eva_restart(char mode, const char *cmd) static void eva_restart(enum reboot_mode mode, const char *cmd)
{ {
/* Do soft power on reset */ /* Do soft power on reset */
writel((1 << 31), RESCNT2); writel((1 << 31), RESCNT2);
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/pinctrl/machine.h> #include <linux/pinctrl/machine.h>
#include <linux/pinctrl/pinconf-generic.h> #include <linux/pinctrl/pinconf-generic.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/regulator/fixed.h> #include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
...@@ -890,7 +891,7 @@ static void __init kzm_init(void) ...@@ -890,7 +891,7 @@ static void __init kzm_init(void)
sh73a0_pm_init(); sh73a0_pm_init();
} }
static void kzm9g_restart(char mode, const char *cmd) static void kzm9g_restart(enum reboot_mode mode, const char *cmd)
{ {
#define RESCNT2 IOMEM(0xe6188020) #define RESCNT2 IOMEM(0xe6188020)
/* Do soft power on reset */ /* Do soft power on reset */
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/reboot.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -89,13 +90,13 @@ static void __init socfpga_init_irq(void) ...@@ -89,13 +90,13 @@ static void __init socfpga_init_irq(void)
socfpga_sysmgr_init(); socfpga_sysmgr_init();
} }
static void socfpga_cyclone5_restart(char mode, const char *cmd) static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)
{ {
u32 temp; u32 temp;
temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL); temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL);
if (mode == 'h') if (mode == REBOOT_HARD)
temp |= RSTMGR_CTRL_SWCOLDRSTREQ; temp |= RSTMGR_CTRL_SWCOLDRSTREQ;
else else
temp |= RSTMGR_CTRL_SWWARMRSTREQ; temp |= RSTMGR_CTRL_SWWARMRSTREQ;
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#include <linux/dmaengine.h> #include <linux/dmaengine.h>
#include <linux/amba/pl08x.h> #include <linux/amba/pl08x.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/reboot.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
extern void spear13xx_timer_init(void); extern void spear13xx_timer_init(void);
...@@ -32,7 +34,7 @@ void __init spear6xx_clk_init(void __iomem *misc_base); ...@@ -32,7 +34,7 @@ void __init spear6xx_clk_init(void __iomem *misc_base);
void __init spear13xx_map_io(void); void __init spear13xx_map_io(void);
void __init spear13xx_l2x0_init(void); void __init spear13xx_l2x0_init(void);
void spear_restart(char, const char *); void spear_restart(enum reboot_mode, const char *);
void spear13xx_secondary_startup(void); void spear13xx_secondary_startup(void);
void __cpuinit spear13xx_cpu_die(unsigned int cpu); void __cpuinit spear13xx_cpu_die(unsigned int cpu);
......
...@@ -12,14 +12,15 @@ ...@@ -12,14 +12,15 @@
*/ */
#include <linux/io.h> #include <linux/io.h>
#include <linux/amba/sp810.h> #include <linux/amba/sp810.h>
#include <linux/reboot.h>
#include <asm/system_misc.h> #include <asm/system_misc.h>
#include <mach/spear.h> #include <mach/spear.h>
#include "generic.h" #include "generic.h"
#define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204) #define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204)
void spear_restart(char mode, const char *cmd) void spear_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 's') { if (mode == REBOOT_SOFT) {
/* software reset, Jump into ROM at address 0 */ /* software reset, Jump into ROM at address 0 */
soft_restart(0); soft_restart(0);
} else { } else {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/reboot.h>
#include <linux/clk/sunxi.h> #include <linux/clk/sunxi.h>
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
static void __iomem *wdt_base; static void __iomem *wdt_base;
static void sun4i_restart(char mode, const char *cmd) static void sun4i_restart(enum reboot_mode mode, const char *cmd)
{ {
if (!wdt_base) if (!wdt_base)
return; return;
......
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
#define __MACH_TEGRA_BOARD_H #define __MACH_TEGRA_BOARD_H
#include <linux/types.h> #include <linux/types.h>
#include <linux/reboot.h>
void tegra_assert_system_reset(char mode, const char *cmd); void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd);
void __init tegra_init_early(void); void __init tegra_init_early(void);
void __init tegra_map_common_io(void); void __init tegra_map_common_io(void);
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/irqchip.h> #include <linux/irqchip.h>
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
...@@ -68,7 +69,7 @@ void __init tegra_dt_init_irq(void) ...@@ -68,7 +69,7 @@ void __init tegra_dt_init_irq(void)
} }
#endif #endif
void tegra_assert_system_reset(char mode, const char *cmd) void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd)
{ {
void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0); void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0);
u32 reg; u32 reg;
......
...@@ -300,11 +300,11 @@ static void __init u300_init_check_chip(void) ...@@ -300,11 +300,11 @@ static void __init u300_init_check_chip(void)
/* Forward declare this function from the watchdog */ /* Forward declare this function from the watchdog */
void coh901327_watchdog_reset(void); void coh901327_watchdog_reset(void);
static void u300_restart(char mode, const char *cmd) static void u300_restart(enum reboot_mode mode, const char *cmd)
{ {
switch (mode) { switch (mode) {
case 's': case REBOOT_SOFT:
case 'h': case REBOOT_HARD:
#ifdef CONFIG_COH901327_WATCHDOG #ifdef CONFIG_COH901327_WATCHDOG
coh901327_watchdog_reset(); coh901327_watchdog_reset();
#endif #endif
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <linux/clkdev.h> #include <linux/clkdev.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/reboot.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardware/arm_timer.h> #include <asm/hardware/arm_timer.h>
...@@ -733,7 +734,7 @@ static void versatile_leds_event(led_event_t ledevt) ...@@ -733,7 +734,7 @@ static void versatile_leds_event(led_event_t ledevt)
} }
#endif /* CONFIG_LEDS */ #endif /* CONFIG_LEDS */
void versatile_restart(char mode, const char *cmd) void versatile_restart(enum reboot_mode mode, const char *cmd)
{ {
void __iomem *sys = __io_address(VERSATILE_SYS_BASE); void __iomem *sys = __io_address(VERSATILE_SYS_BASE);
u32 val; u32 val;
......
...@@ -24,13 +24,14 @@ ...@@ -24,13 +24,14 @@
#include <linux/amba/bus.h> #include <linux/amba/bus.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/reboot.h>
extern void __init versatile_init(void); extern void __init versatile_init(void);
extern void __init versatile_init_early(void); extern void __init versatile_init_early(void);
extern void __init versatile_init_irq(void); extern void __init versatile_init_irq(void);
extern void __init versatile_map_io(void); extern void __init versatile_map_io(void);
extern void versatile_timer_init(void); extern void versatile_timer_init(void);
extern void versatile_restart(char, const char *); extern void versatile_restart(enum reboot_mode, const char *);
extern unsigned int mmc_status(struct device *dev); extern unsigned int mmc_status(struct device *dev);
#ifdef CONFIG_OF #ifdef CONFIG_OF
extern struct of_dev_auxdata versatile_auxdata_lookup[]; extern struct of_dev_auxdata versatile_auxdata_lookup[];
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/reboot.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -46,7 +47,7 @@ ...@@ -46,7 +47,7 @@
static void __iomem *pmc_base; static void __iomem *pmc_base;
void vt8500_restart(char mode, const char *cmd) void vt8500_restart(enum reboot_mode mode, const char *cmd)
{ {
if (pmc_base) if (pmc_base)
writel(1, pmc_base + VT8500_PMSR_REG); writel(1, pmc_base + VT8500_PMSR_REG);
......
...@@ -230,9 +230,9 @@ void __init nuc900_init_clocks(void) ...@@ -230,9 +230,9 @@ void __init nuc900_init_clocks(void)
#define WTE (1 << 7) #define WTE (1 << 7)
#define WTRE (1 << 1) #define WTRE (1 << 1)
void nuc9xx_restart(char mode, const char *cmd) void nuc9xx_restart(enum reboot_mode mode, const char *cmd)
{ {
if (mode == 's') { if (mode == REBOOT_SOFT) {
/* Jump into ROM at address 0 */ /* Jump into ROM at address 0 */
soft_restart(0); soft_restart(0);
} else { } else {
......
...@@ -14,10 +14,13 @@ ...@@ -14,10 +14,13 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
*/ */
#include <linux/reboot.h>
struct map_desc; struct map_desc;
/* core initialisation functions */ /* core initialisation functions */
extern void nuc900_init_irq(void); extern void nuc900_init_irq(void);
extern void nuc900_timer_init(void); extern void nuc900_timer_init(void);
extern void nuc9xx_restart(char, const char *); extern void nuc9xx_restart(enum reboot_mode, const char *);
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/export.h> #include <linux/export.h>
#include <asm/hardware/iop3xx.h> #include <asm/hardware/iop3xx.h>
#include <mach/gpio.h>
void gpio_line_config(int line, int direction) void gpio_line_config(int line, int direction)
{ {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <asm/system_misc.h> #include <asm/system_misc.h>
#include <mach/hardware.h> #include <mach/hardware.h>
void iop3xx_restart(char mode, const char *cmd) void iop3xx_restart(enum reboot_mode mode, const char *cmd)
{ {
*IOP3XX_PCSR = 0x30; *IOP3XX_PCSR = 0x30;
......
...@@ -15,11 +15,12 @@ ...@@ -15,11 +15,12 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/reboot.h>
#include <asm/system_misc.h> #include <asm/system_misc.h>
static void restart_poweroff_do_poweroff(void) static void restart_poweroff_do_poweroff(void)
{ {
arm_pm_restart('h', NULL); arm_pm_restart(REBOOT_HARD, NULL);
} }
static int restart_poweroff_probe(struct platform_device *pdev) static int restart_poweroff_probe(struct platform_device *pdev)
......
...@@ -48,7 +48,7 @@ static void vexpress_power_off(void) ...@@ -48,7 +48,7 @@ static void vexpress_power_off(void)
static struct device *vexpress_restart_device; static struct device *vexpress_restart_device;
static void vexpress_restart(char str, const char *cmd) static void vexpress_restart(enum reboot_mode reboot_mode, const char *cmd)
{ {
vexpress_reset_do(vexpress_restart_device, "restart"); vexpress_reset_do(vexpress_restart_device, "restart");
} }
......
...@@ -15,6 +15,7 @@ enum reboot_mode { ...@@ -15,6 +15,7 @@ enum reboot_mode {
REBOOT_WARM, REBOOT_WARM,
REBOOT_HARD, REBOOT_HARD,
REBOOT_SOFT, REBOOT_SOFT,
REBOOT_GPIO,
}; };
extern int register_reboot_notifier(struct notifier_block *); extern int register_reboot_notifier(struct notifier_block *);
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#define _LINUX_VEXPRESS_H #define _LINUX_VEXPRESS_H
#include <linux/device.h> #include <linux/device.h>
#include <linux/reboot.h>
#define VEXPRESS_SITE_MB 0 #define VEXPRESS_SITE_MB 0
#define VEXPRESS_SITE_DB1 1 #define VEXPRESS_SITE_DB1 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment