Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Robin Holt and committed by
Linus Torvalds
7b6d864b 16d6d5b0

+282 -166
+2 -1
arch/arm/include/asm/hardware/iop3xx.h
··· 223 223 #ifndef __ASSEMBLY__ 224 224 225 225 #include <linux/types.h> 226 + #include <linux/reboot.h> 226 227 227 228 void iop3xx_map_io(void); 228 229 void iop_init_cp6_handler(void); 229 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 233 static inline u32 read_tmr0(void) 233 234 {
+1 -1
arch/arm/include/asm/mach/arch.h
··· 59 59 #ifdef CONFIG_MULTI_IRQ_HANDLER 60 60 void (*handle_irq)(struct pt_regs *); 61 61 #endif 62 - void (*restart)(char, const char *); 62 + void (*restart)(enum reboot_mode, const char *); 63 63 }; 64 64 65 65 /*
+2 -1
arch/arm/include/asm/system_misc.h
··· 6 6 #include <linux/compiler.h> 7 7 #include <linux/linkage.h> 8 8 #include <linux/irqflags.h> 9 + #include <linux/reboot.h> 9 10 10 11 extern void cpu_init(void); 11 12 12 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 15 extern void (*arm_pm_idle)(void); 15 16 16 17 #define UDBG_UNDEFINED (1 << 0)
+3 -2
arch/arm/kernel/process.c
··· 32 32 #include <linux/hw_breakpoint.h> 33 33 #include <linux/cpuidle.h> 34 34 #include <linux/leds.h> 35 + #include <linux/reboot.h> 35 36 36 37 #include <asm/cacheflush.h> 37 38 #include <asm/idmap.h> ··· 114 113 BUG(); 115 114 } 116 115 117 - static void null_restart(char mode, const char *cmd) 116 + static void null_restart(enum reboot_mode reboot_mode, const char *cmd) 118 117 { 119 118 } 120 119 ··· 124 123 void (*pm_power_off)(void); 125 124 EXPORT_SYMBOL(pm_power_off); 126 125 127 - void (*arm_pm_restart)(char str, const char *cmd) = null_restart; 126 + void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = null_restart; 128 127 EXPORT_SYMBOL_GPL(arm_pm_restart); 129 128 130 129 /*
+2 -1
arch/arm/mach-at91/at91rm9200.c
··· 11 11 */ 12 12 13 13 #include <linux/module.h> 14 + #include <linux/reboot.h> 14 15 15 16 #include <asm/irq.h> 16 17 #include <asm/mach/arch.h> ··· 305 304 at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK); 306 305 } 307 306 308 - static void at91rm9200_restart(char mode, const char *cmd) 307 + static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd) 309 308 { 310 309 /* 311 310 * Perform a hardware reset with the use of the Watchdog timer.
+3 -2
arch/arm/mach-at91/generic.h
··· 10 10 11 11 #include <linux/clkdev.h> 12 12 #include <linux/of.h> 13 + #include <linux/reboot.h> 13 14 14 15 /* Map io */ 15 16 extern void __init at91_map_io(void); ··· 61 60 62 61 /* reset */ 63 62 extern void at91_ioremap_rstc(u32 base_addr); 64 - extern void at91sam9_alt_restart(char, const char *); 65 - extern void at91sam9g45_restart(char, const char *); 63 + extern void at91sam9_alt_restart(enum reboot_mode, const char *); 64 + extern void at91sam9g45_restart(enum reboot_mode, const char *); 66 65 67 66 /* shutdown */ 68 67 extern void at91_ioremap_shdwc(u32 base_addr);
+2 -2
arch/arm/mach-bcm2835/bcm2835.c
··· 53 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 58 u32 val; 59 59 ··· 91 91 writel_relaxed(val, wdt_regs + PM_RSTS); 92 92 93 93 /* Continue with normal reset mechanism */ 94 - bcm2835_restart(0, ""); 94 + bcm2835_restart(REBOOT_HARD, ""); 95 95 } 96 96 97 97 static struct map_desc io_map __initdata = {
+1 -1
arch/arm/mach-clps711x/common.c
··· 384 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 389 soft_restart(0); 390 390 }
+3 -1
arch/arm/mach-clps711x/common.h
··· 4 4 * Common bits. 5 5 */ 6 6 7 + #include <linux/reboot.h> 8 + 7 9 #define CLPS711X_NR_IRQS (33) 8 10 #define CLPS711X_NR_GPIO (4 * 8 + 3) 9 11 #define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit)) ··· 14 12 extern void clps711x_init_irq(void); 15 13 extern void clps711x_timer_init(void); 16 14 extern void clps711x_handle_irq(struct pt_regs *regs); 17 - extern void clps711x_restart(char mode, const char *cmd); 15 + extern void clps711x_restart(enum reboot_mode mode, const char *cmd); 18 16 extern void clps711x_init_early(void);
+3 -1
arch/arm/mach-cns3xxx/core.h
··· 11 11 #ifndef __CNS3XXX_CORE_H 12 12 #define __CNS3XXX_CORE_H 13 13 14 + #include <linux/reboot.h> 15 + 14 16 extern void cns3xxx_timer_init(void); 15 17 16 18 #ifdef CONFIG_CACHE_L2X0 ··· 24 22 void __init cns3xxx_map_io(void); 25 23 void __init cns3xxx_init_irq(void); 26 24 void cns3xxx_power_off(void); 27 - void cns3xxx_restart(char, const char *); 25 + void cns3xxx_restart(enum reboot_mode, const char *); 28 26 29 27 #endif /* __CNS3XXX_CORE_H */
+1 -1
arch/arm/mach-cns3xxx/pm.c
··· 89 89 } 90 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 95 * To reset, we hit the on-board reset register
+2 -1
arch/arm/mach-davinci/devices-da8xx.c
··· 16 16 #include <linux/serial_8250.h> 17 17 #include <linux/ahci_platform.h> 18 18 #include <linux/clk.h> 19 + #include <linux/reboot.h> 19 20 20 21 #include <mach/cputype.h> 21 22 #include <mach/common.h> ··· 367 366 .resource = da8xx_watchdog_resources, 368 367 }; 369 368 370 - void da8xx_restart(char mode, const char *cmd) 369 + void da8xx_restart(enum reboot_mode mode, const char *cmd) 371 370 { 372 371 struct device *dev; 373 372
+2 -1
arch/arm/mach-davinci/devices.c
··· 13 13 #include <linux/platform_device.h> 14 14 #include <linux/dma-mapping.h> 15 15 #include <linux/io.h> 16 + #include <linux/reboot.h> 16 17 17 18 #include <mach/hardware.h> 18 19 #include <linux/platform_data/i2c-davinci.h> ··· 308 307 .resource = wdt_resources, 309 308 }; 310 309 311 - void davinci_restart(char mode, const char *cmd) 310 + void davinci_restart(enum reboot_mode mode, const char *cmd) 312 311 { 313 312 davinci_watchdog_reset(&davinci_wdt_device); 314 313 }
+2 -1
arch/arm/mach-davinci/include/mach/common.h
··· 14 14 15 15 #include <linux/compiler.h> 16 16 #include <linux/types.h> 17 + #include <linux/reboot.h> 17 18 18 19 extern void davinci_timer_init(void); 19 20 ··· 82 81 83 82 extern void davinci_common_init(struct davinci_soc_info *soc_info); 84 83 extern void davinci_init_ide(void); 85 - void davinci_restart(char mode, const char *cmd); 84 + void davinci_restart(enum reboot_mode mode, const char *cmd); 86 85 void davinci_init_late(void); 87 86 88 87 #ifdef CONFIG_DAVINCI_RESET_CLOCKS
+2 -1
arch/arm/mach-davinci/include/mach/da8xx.h
··· 17 17 #include <linux/davinci_emac.h> 18 18 #include <linux/spi/spi.h> 19 19 #include <linux/platform_data/davinci_asp.h> 20 + #include <linux/reboot.h> 20 21 #include <linux/videodev2.h> 21 22 22 23 #include <mach/serial.h> ··· 107 106 (struct vpif_display_config *display_config); 108 107 int da850_register_vpif_capture 109 108 (struct vpif_capture_config *capture_config); 110 - void da8xx_restart(char mode, const char *cmd); 109 + void da8xx_restart(enum reboot_mode mode, const char *cmd); 111 110 void da8xx_rproc_reserve_cma(void); 112 111 int da8xx_register_rproc(void); 113 112
+2 -1
arch/arm/mach-davinci/include/mach/tnetv107x.h
··· 35 35 #include <linux/serial_8250.h> 36 36 #include <linux/input/matrix_keypad.h> 37 37 #include <linux/mfd/ti_ssp.h> 38 + #include <linux/reboot.h> 38 39 39 40 #include <linux/platform_data/mmc-davinci.h> 40 41 #include <linux/platform_data/mtd-davinci.h> ··· 55 54 extern void tnetv107x_init(void); 56 55 extern void tnetv107x_devices_init(struct tnetv107x_device_info *); 57 56 extern void tnetv107x_irq_init(void); 58 - void tnetv107x_restart(char mode, const char *cmd); 57 + void tnetv107x_restart(enum reboot_mode mode, const char *cmd); 59 58 60 59 #endif 61 60
+2 -1
arch/arm/mach-davinci/tnetv107x.c
··· 19 19 #include <linux/io.h> 20 20 #include <linux/err.h> 21 21 #include <linux/platform_device.h> 22 + #include <linux/reboot.h> 22 23 23 24 #include <asm/mach/map.h> 24 25 ··· 731 730 __raw_writel(1, &regs->kick); 732 731 } 733 732 734 - void tnetv107x_restart(char mode, const char *cmd) 733 + void tnetv107x_restart(enum reboot_mode mode, const char *cmd) 735 734 { 736 735 tnetv107x_watchdog_reset(&tnetv107x_wdt_device); 737 736 }
+1 -1
arch/arm/mach-dove/common.c
··· 381 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 387 * Enable soft reset to assert RSTOUTn.
+3 -1
arch/arm/mach-dove/common.h
··· 11 11 #ifndef __ARCH_DOVE_COMMON_H 12 12 #define __ARCH_DOVE_COMMON_H 13 13 14 + #include <linux/reboot.h> 15 + 14 16 struct mv643xx_eth_platform_data; 15 17 struct mv_sata_platform_data; 16 18 ··· 44 42 void dove_i2c_init(void); 45 43 void dove_sdio0_init(void); 46 44 void dove_sdio1_init(void); 47 - void dove_restart(char, const char *); 45 + void dove_restart(enum reboot_mode, const char *); 48 46 49 47 #endif
+1 -1
arch/arm/mach-ebsa110/core.c
··· 311 311 312 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 316 soft_restart(0x80000000); 317 317 }
+2 -1
arch/arm/mach-ep93xx/core.c
··· 35 35 #include <linux/spi/spi.h> 36 36 #include <linux/export.h> 37 37 #include <linux/irqchip/arm-vic.h> 38 + #include <linux/reboot.h> 38 39 39 40 #include <mach/hardware.h> 40 41 #include <linux/platform_data/video-ep93xx.h> ··· 922 921 gpio_led_register_device(-1, &ep93xx_led_data); 923 922 } 924 923 925 - void ep93xx_restart(char mode, const char *cmd) 924 + void ep93xx_restart(enum reboot_mode mode, const char *cmd) 926 925 { 927 926 /* 928 927 * Set then clear the SWRST bit to initiate a software reset
+3 -1
arch/arm/mach-ep93xx/include/mach/platform.h
··· 4 4 5 5 #ifndef __ASSEMBLY__ 6 6 7 + #include <linux/reboot.h> 8 + 7 9 struct i2c_gpio_platform_data; 8 10 struct i2c_board_info; 9 11 struct spi_board_info; ··· 57 55 void ep93xx_init_devices(void); 58 56 extern void ep93xx_timer_init(void); 59 57 60 - void ep93xx_restart(char, const char *); 58 + void ep93xx_restart(enum reboot_mode, const char *); 61 59 void ep93xx_init_late(void); 62 60 63 61 #ifdef CONFIG_CRUNCH
+2 -2
arch/arm/mach-exynos/common.c
··· 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 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 295 struct device_node *np; 296 296 u32 val;
+3 -2
arch/arm/mach-exynos/common.h
··· 12 12 #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H 13 13 #define __ARCH_ARM_MACH_EXYNOS_COMMON_H 14 14 15 + #include <linux/reboot.h> 15 16 #include <linux/of.h> 16 17 17 18 void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); ··· 21 20 22 21 struct map_desc; 23 22 void exynos_init_io(void); 24 - void exynos4_restart(char mode, const char *cmd); 25 - void exynos5_restart(char mode, const char *cmd); 23 + void exynos4_restart(enum reboot_mode mode, const char *cmd); 24 + void exynos5_restart(enum reboot_mode mode, const char *cmd); 26 25 void exynos_init_late(void); 27 26 28 27 /* ToDo: remove these after migrating legacy exynos4 platforms to dt */
+2 -2
arch/arm/mach-footbridge/common.c
··· 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 204 /* Jump into the ROM */ 205 205 soft_restart(0x41000000); 206 206 } else {
+2 -1
arch/arm/mach-footbridge/common.h
··· 1 + #include <linux/reboot.h> 1 2 2 3 extern void footbridge_timer_init(void); 3 4 extern void isa_timer_init(void); ··· 9 8 extern void footbridge_init_irq(void); 10 9 11 10 extern void isa_init_irq(unsigned int irq); 12 - extern void footbridge_restart(char, const char *); 11 + extern void footbridge_restart(enum reboot_mode, const char *);
+2 -2
arch/arm/mach-footbridge/netwinder-hw.c
··· 634 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 640 /* Jump into the ROM */ 641 641 soft_restart(0x41000000); 642 642 } else {
+3 -1
arch/arm/mach-highbank/core.h
··· 1 1 #ifndef __HIGHBANK_CORE_H 2 2 #define __HIGHBANK_CORE_H 3 3 4 + #include <linux/reboot.h> 5 + 4 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 8 extern void __iomem *scu_base_addr; 7 9 8 10 #ifdef CONFIG_PM_SLEEP
+3 -2
arch/arm/mach-highbank/system.c
··· 15 15 */ 16 16 #include <linux/io.h> 17 17 #include <asm/proc-fns.h> 18 + #include <linux/reboot.h> 18 19 19 20 #include "core.h" 20 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 26 highbank_set_pwr_hard_reset(); 26 27 else 27 28 highbank_set_pwr_soft_reset();
+3 -1
arch/arm/mach-imx/common.h
··· 11 11 #ifndef __ASM_ARCH_MXC_COMMON_H__ 12 12 #define __ASM_ARCH_MXC_COMMON_H__ 13 13 14 + #include <linux/reboot.h> 15 + 14 16 struct platform_device; 15 17 struct pt_regs; 16 18 struct clk; ··· 73 71 extern struct platform_device *mxc_register_gpio(char *name, int id, 74 72 resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); 75 73 extern void mxc_set_cpu_type(unsigned int type); 76 - extern void mxc_restart(char, const char *); 74 + extern void mxc_restart(enum reboot_mode, const char *); 77 75 extern void mxc_arch_reset_init(void __iomem *); 78 76 extern void mxc_arch_reset_init_dt(void); 79 77 extern int mx53_revision(void);
+2 -1
arch/arm/mach-imx/mach-imx6q.c
··· 27 27 #include <linux/of_platform.h> 28 28 #include <linux/opp.h> 29 29 #include <linux/phy.h> 30 + #include <linux/reboot.h> 30 31 #include <linux/regmap.h> 31 32 #include <linux/micrel_phy.h> 32 33 #include <linux/mfd/syscon.h> ··· 68 67 mxc_set_cpu_type(rev >> 16 & 0xff); 69 68 } 70 69 71 - static void imx6q_restart(char mode, const char *cmd) 70 + static void imx6q_restart(enum reboot_mode mode, const char *cmd) 72 71 { 73 72 struct device_node *np; 74 73 void __iomem *wdog_base;
+1 -1
arch/arm/mach-imx/system.c
··· 37 37 /* 38 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 42 unsigned int wcr_enable; 43 43
+2 -1
arch/arm/mach-integrator/common.h
··· 1 + #include <linux/reboot.h> 1 2 #include <linux/amba/serial.h> 2 3 extern struct amba_pl010_data ap_uart_data; 3 4 void integrator_init_early(void); 4 5 int integrator_init(bool is_cp); 5 6 void integrator_reserve(void); 6 - void integrator_restart(char, const char *); 7 + void integrator_restart(enum reboot_mode, const char *); 7 8 void integrator_init_sysfs(struct device *parent, u32 id);
+1 -1
arch/arm/mach-integrator/core.c
··· 124 124 /* 125 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 129 cm_control(CM_CTRL_RESET, CM_CTRL_RESET); 130 130 }
+4 -1
arch/arm/mach-iop13xx/include/mach/iop13xx.h
··· 2 2 #define _IOP13XX_HW_H_ 3 3 4 4 #ifndef __ASSEMBLY__ 5 + 6 + #include <linux/reboot.h> 7 + 5 8 /* The ATU offsets can change based on the strapping */ 6 9 extern u32 iop13xx_atux_pmmr_offset; 7 10 extern u32 iop13xx_atue_pmmr_offset; ··· 14 11 void iop13xx_platform_init(void); 15 12 void iop13xx_add_tpmi_devices(void); 16 13 void iop13xx_init_irq(void); 17 - void iop13xx_restart(char, const char *); 14 + void iop13xx_restart(enum reboot_mode, const char *); 18 15 19 16 /* CPUID CP6 R0 Page 0 */ 20 17 static inline int iop13xx_cpu_id(void)
+1 -1
arch/arm/mach-iop13xx/setup.c
··· 594 594 __setup("iop13xx_init_uart", iop13xx_init_uart_setup); 595 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 600 * Reset the internal bus (warning both cores are reset)
+1 -1
arch/arm/mach-iop32x/n2100.c
··· 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 291 gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW); 292 292 gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
+2 -2
arch/arm/mach-ixp4xx/common.c
··· 531 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 537 /* Jump into ROM at address 0 */ 538 538 soft_restart(0); 539 539 } else {
+1
arch/arm/mach-ixp4xx/dsmg600-setup.c
··· 27 27 #include <linux/i2c.h> 28 28 #include <linux/i2c-gpio.h> 29 29 30 + #include <mach/hardware.h> 30 31 #include <asm/mach-types.h> 31 32 #include <asm/mach/arch.h> 32 33 #include <asm/mach/flash.h>
+3 -1
arch/arm/mach-ixp4xx/include/mach/platform.h
··· 13 13 14 14 #ifndef __ASSEMBLY__ 15 15 16 + #include <linux/reboot.h> 17 + 16 18 #include <asm/types.h> 17 19 18 20 #ifndef __ARMEB__ ··· 125 123 extern void ixp4xx_init_irq(void); 126 124 extern void ixp4xx_sys_init(void); 127 125 extern void ixp4xx_timer_init(void); 128 - extern void ixp4xx_restart(char, const char *); 126 + extern void ixp4xx_restart(enum reboot_mode, const char *); 129 127 extern void ixp4xx_pci_preinit(void); 130 128 struct pci_sys_data; 131 129 extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
+2 -1
arch/arm/mach-kirkwood/common.c
··· 20 20 #include <linux/mv643xx_i2c.h> 21 21 #include <linux/timex.h> 22 22 #include <linux/kexec.h> 23 + #include <linux/reboot.h> 23 24 #include <net/dsa.h> 24 25 #include <asm/page.h> 25 26 #include <asm/mach/map.h> ··· 723 722 #endif 724 723 } 725 724 726 - void kirkwood_restart(char mode, const char *cmd) 725 + void kirkwood_restart(enum reboot_mode mode, const char *cmd) 727 726 { 728 727 /* 729 728 * Enable soft reset to assert RSTOUTn.
+3 -1
arch/arm/mach-kirkwood/common.h
··· 11 11 #ifndef __ARCH_KIRKWOOD_COMMON_H 12 12 #define __ARCH_KIRKWOOD_COMMON_H 13 13 14 + #include <linux/reboot.h> 15 + 14 16 struct dsa_platform_data; 15 17 struct mv643xx_eth_platform_data; 16 18 struct mv_sata_platform_data; ··· 55 53 void kirkwood_cpuidle_init(void); 56 54 void kirkwood_cpufreq_init(void); 57 55 58 - void kirkwood_restart(char, const char *); 56 + void kirkwood_restart(enum reboot_mode, const char *); 59 57 void kirkwood_clk_init(void); 60 58 61 59 /* board init functions for boards not fully converted to fdt */
+1 -1
arch/arm/mach-ks8695/generic.h
··· 12 12 13 13 extern __init void ks8695_map_io(void); 14 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 16 extern void ks8695_timer_init(void);
+2 -2
arch/arm/mach-ks8695/time.c
··· 154 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 159 unsigned int reg; 160 160 161 - if (mode == 's') 161 + if (reboot_mode == REBOOT_SOFT) 162 162 soft_restart(0); 163 163 164 164 /* disable timer0 */
+3 -3
arch/arm/mach-lpc32xx/common.c
··· 207 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 212 switch (mode) { 213 - case 's': 214 - case 'h': 213 + case REBOOT_SOFT: 214 + case REBOOT_HARD: 215 215 lpc32xx_watchdog_reset(); 216 216 break; 217 217
+2 -1
arch/arm/mach-lpc32xx/common.h
··· 21 21 22 22 #include <mach/board.h> 23 23 #include <linux/platform_device.h> 24 + #include <linux/reboot.h> 24 25 25 26 /* 26 27 * Other arch specific structures and functions ··· 30 29 extern void __init lpc32xx_init_irq(void); 31 30 extern void __init lpc32xx_map_io(void); 32 31 extern void __init lpc32xx_serial_init(void); 33 - extern void lpc23xx_restart(char, const char *); 32 + extern void lpc23xx_restart(enum reboot_mode, const char *); 34 33 35 34 36 35 /*
+1 -1
arch/arm/mach-mmp/common.c
··· 47 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 52 soft_restart(0); 53 53 }
+2 -1
arch/arm/mach-mmp/common.h
··· 1 + #include <linux/reboot.h> 1 2 #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) 2 3 3 4 extern void timer_init(int irq); 4 5 5 6 extern void __init icu_init_irq(void); 6 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 9 extern void __init pxa168_clk_init(void); 9 10 extern void __init pxa910_clk_init(void); 10 11 extern void __init mmp2_clk_init(void);
+3 -1
arch/arm/mach-mmp/include/mach/pxa168.h
··· 1 1 #ifndef __ASM_MACH_PXA168_H 2 2 #define __ASM_MACH_PXA168_H 3 3 4 + #include <linux/reboot.h> 5 + 4 6 extern void pxa168_timer_init(void); 5 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 9 extern void pxa168_clear_keypad_wakeup(void); 8 10 9 11 #include <linux/i2c.h>
+1 -1
arch/arm/mach-mmp/pxa168.c
··· 172 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 177 soft_restart(0xffff0000); 178 178 }
+1 -1
arch/arm/mach-mv78xx0/common.c
··· 413 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 419 * Enable soft reset to assert RSTOUTn.
+3 -1
arch/arm/mach-mv78xx0/common.h
··· 11 11 #ifndef __ARCH_MV78XX0_COMMON_H 12 12 #define __ARCH_MV78XX0_COMMON_H 13 13 14 + #include <linux/reboot.h> 15 + 14 16 struct mv643xx_eth_platform_data; 15 17 struct mv_sata_platform_data; 16 18 ··· 47 45 void mv78xx0_uart2_init(void); 48 46 void mv78xx0_uart3_init(void); 49 47 void mv78xx0_i2c_init(void); 50 - void mv78xx0_restart(char, const char *); 48 + void mv78xx0_restart(enum reboot_mode, const char *); 51 49 52 50 extern void mv78xx0_timer_init(void); 53 51
+3 -1
arch/arm/mach-mvebu/common.h
··· 17 17 18 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 24 void armada_370_xp_init_irq(void); 23 25 void armada_370_xp_handle_irq(struct pt_regs *regs);
+2 -1
arch/arm/mach-mvebu/system-controller.c
··· 26 26 #include <linux/init.h> 27 27 #include <linux/of_address.h> 28 28 #include <linux/io.h> 29 + #include <linux/reboot.h> 29 30 30 31 static void __iomem *system_controller_base; 31 32 ··· 64 63 { /* end of list */ }, 65 64 }; 66 65 67 - void mvebu_restart(char mode, const char *cmd) 66 + void mvebu_restart(enum reboot_mode mode, const char *cmd) 68 67 { 69 68 if (!system_controller_base) { 70 69 pr_err("Cannot restart, system-controller not available: check the device tree\n");
+2 -1
arch/arm/mach-mxs/mach-mxs.c
··· 20 20 #include <linux/gpio.h> 21 21 #include <linux/init.h> 22 22 #include <linux/irqchip/mxs.h> 23 + #include <linux/reboot.h> 23 24 #include <linux/micrel_phy.h> 24 25 #include <linux/of_address.h> 25 26 #include <linux/of_platform.h> ··· 501 500 /* 502 501 * Reset the system. It is called by machine_restart(). 503 502 */ 504 - static void mxs_restart(char mode, const char *cmd) 503 + static void mxs_restart(enum reboot_mode mode, const char *cmd) 505 504 { 506 505 struct device_node *np; 507 506 void __iomem *reset_addr;
+2 -1
arch/arm/mach-netx/generic.c
··· 24 24 #include <linux/platform_device.h> 25 25 #include <linux/io.h> 26 26 #include <linux/irqchip/arm-vic.h> 27 + #include <linux/reboot.h> 27 28 #include <mach/hardware.h> 28 29 #include <asm/mach/map.h> 29 30 #include <mach/netx-regs.h> ··· 188 187 189 188 subsys_initcall(netx_init); 190 189 191 - void netx_restart(char mode, const char *cmd) 190 + void netx_restart(enum reboot_mode mode, const char *cmd) 192 191 { 193 192 writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES, 194 193 NETX_SYSTEM_RES_CR);
+3 -1
arch/arm/mach-netx/generic.h
··· 17 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 */ 19 19 20 + #include <linux/reboot.h> 21 + 20 22 extern void __init netx_map_io(void); 21 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 26 extern void netx_timer_init(void);
+1 -1
arch/arm/mach-nomadik/cpu-8815.c
··· 103 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 108 void __iomem *srcbase = ioremap(NOMADIK_SRC_BASE, SZ_4K); 109 109
+2 -1
arch/arm/mach-omap1/board-voiceblue.c
··· 26 26 #include <linux/serial_reg.h> 27 27 #include <linux/smc91x.h> 28 28 #include <linux/export.h> 29 + #include <linux/reboot.h> 29 30 30 31 #include <asm/mach-types.h> 31 32 #include <asm/mach/arch.h> ··· 216 215 gpio_set_value(0, wdt_gpio_state); 217 216 } 218 217 219 - static void voiceblue_restart(char mode, const char *cmd) 218 + static void voiceblue_restart(enum reboot_mode mode, const char *cmd) 220 219 { 221 220 /* 222 221 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
+2 -1
arch/arm/mach-omap1/common.h
··· 28 28 29 29 #include <linux/mtd/mtd.h> 30 30 #include <linux/i2c-omap.h> 31 + #include <linux/reboot.h> 31 32 32 33 #include <plat/i2c.h> 33 34 ··· 71 70 void omap1_init_early(void); 72 71 void omap1_init_irq(void); 73 72 void omap1_init_late(void); 74 - void omap1_restart(char, const char *); 73 + void omap1_restart(enum reboot_mode, const char *); 75 74 76 75 extern void __init omap_check_revision(void); 77 76
+2 -1
arch/arm/mach-omap1/reset.c
··· 3 3 */ 4 4 #include <linux/kernel.h> 5 5 #include <linux/io.h> 6 + #include <linux/reboot.h> 6 7 7 8 #include <mach/hardware.h> 8 9 ··· 23 22 #define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5 24 23 25 24 26 - void omap1_restart(char mode, const char *cmd) 25 + void omap1_restart(enum reboot_mode mode, const char *cmd) 27 26 { 28 27 /* 29 28 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
+2 -1
arch/arm/mach-omap2/am33xx-restart.c
··· 6 6 * published by the Free Software Foundation. 7 7 */ 8 8 #include <linux/kernel.h> 9 + #include <linux/reboot.h> 9 10 10 11 #include "common.h" 11 12 #include "prm-regbits-33xx.h" ··· 20 19 * Resets the SoC. For @cmd, see the 'reboot' syscall in 21 20 * kernel/sys.c. No return value. 22 21 */ 23 - void am33xx_restart(char mode, const char *cmd) 22 + void am33xx_restart(enum reboot_mode mode, const char *cmd) 24 23 { 25 24 /* TODO: Handle mode and cmd if necessary */ 26 25
+9 -8
arch/arm/mach-omap2/common.h
··· 31 31 #include <linux/i2c.h> 32 32 #include <linux/i2c/twl.h> 33 33 #include <linux/i2c-omap.h> 34 + #include <linux/reboot.h> 34 35 35 36 #include <asm/proc-fns.h> 36 37 ··· 120 119 #endif 121 120 122 121 #if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) 123 - void omap2xxx_restart(char mode, const char *cmd); 122 + void omap2xxx_restart(enum reboot_mode mode, const char *cmd); 124 123 #else 125 - static inline void omap2xxx_restart(char mode, const char *cmd) 124 + static inline void omap2xxx_restart(enum reboot_mode mode, const char *cmd) 126 125 { 127 126 } 128 127 #endif 129 128 130 129 #ifdef CONFIG_SOC_AM33XX 131 - void am33xx_restart(char mode, const char *cmd); 130 + void am33xx_restart(enum reboot_mode mode, const char *cmd); 132 131 #else 133 - static inline void am33xx_restart(char mode, const char *cmd) 132 + static inline void am33xx_restart(enum reboot_mode mode, const char *cmd) 134 133 { 135 134 } 136 135 #endif 137 136 138 137 #ifdef CONFIG_ARCH_OMAP3 139 - void omap3xxx_restart(char mode, const char *cmd); 138 + void omap3xxx_restart(enum reboot_mode mode, const char *cmd); 140 139 #else 141 - static inline void omap3xxx_restart(char mode, const char *cmd) 140 + static inline void omap3xxx_restart(enum reboot_mode mode, const char *cmd) 142 141 { 143 142 } 144 143 #endif 145 144 146 145 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) 147 - void omap44xx_restart(char mode, const char *cmd); 146 + void omap44xx_restart(enum reboot_mode mode, const char *cmd); 148 147 #else 149 - static inline void omap44xx_restart(char mode, const char *cmd) 148 + static inline void omap44xx_restart(enum reboot_mode mode, const char *cmd) 150 149 { 151 150 } 152 151 #endif
+1 -1
arch/arm/mach-omap2/omap2-restart.c
··· 31 31 * Set the DPLL to bypass so that reboot completes successfully. No 32 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 36 u32 rate; 37 37
+2 -1
arch/arm/mach-omap2/omap3-restart.c
··· 12 12 */ 13 13 #include <linux/kernel.h> 14 14 #include <linux/init.h> 15 + #include <linux/reboot.h> 15 16 16 17 #include "iomap.h" 17 18 #include "common.h" ··· 29 28 * Resets the SoC. For @cmd, see the 'reboot' syscall in 30 29 * kernel/sys.c. No return value. 31 30 */ 32 - void omap3xxx_restart(char mode, const char *cmd) 31 + void omap3xxx_restart(enum reboot_mode mode, const char *cmd) 33 32 { 34 33 omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); 35 34 omap3xxx_prm_dpll3_reset(); /* never returns */
+1
arch/arm/mach-omap2/omap4-common.c
··· 23 23 #include <linux/export.h> 24 24 #include <linux/irqchip/arm-gic.h> 25 25 #include <linux/of_address.h> 26 + #include <linux/reboot.h> 26 27 27 28 #include <asm/hardware/cache-l2x0.h> 28 29 #include <asm/mach/map.h>
+2 -1
arch/arm/mach-omap2/omap4-restart.c
··· 8 8 */ 9 9 10 10 #include <linux/types.h> 11 + #include <linux/reboot.h> 11 12 #include "prminst44xx.h" 12 13 13 14 /** ··· 19 18 * Resets the SoC. For @cmd, see the 'reboot' syscall in 20 19 * kernel/sys.c. No return value. 21 20 */ 22 - void omap44xx_restart(char mode, const char *cmd) 21 + void omap44xx_restart(enum reboot_mode mode, const char *cmd) 23 22 { 24 23 /* XXX Should save 'cmd' into scratchpad for use after reboot */ 25 24 omap4_prminst_global_warm_sw_reset(); /* never returns */
+1 -1
arch/arm/mach-orion5x/common.c
··· 347 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 353 * Enable and issue soft reset
+3 -1
arch/arm/mach-orion5x/common.h
··· 1 1 #ifndef __ARCH_ORION5X_COMMON_H 2 2 #define __ARCH_ORION5X_COMMON_H 3 3 4 + #include <linux/reboot.h> 5 + 4 6 struct dsa_platform_data; 5 7 struct mv643xx_eth_platform_data; 6 8 struct mv_sata_platform_data; ··· 31 29 void orion5x_uart0_init(void); 32 30 void orion5x_uart1_init(void); 33 31 void orion5x_xor_init(void); 34 - void orion5x_restart(char, const char *); 32 + void orion5x_restart(enum reboot_mode, const char *); 35 33 36 34 /* 37 35 * PCIe/PCI functions.
+1 -1
arch/arm/mach-orion5x/ls-chl-setup.c
··· 139 139 140 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 /*****************************************************************************
+1 -1
arch/arm/mach-orion5x/ls_hgl-setup.c
··· 185 185 186 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
+1 -1
arch/arm/mach-orion5x/lsmini-setup.c
··· 185 185 186 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
+2 -1
arch/arm/mach-picoxcell/common.c
··· 11 11 #include <linux/of.h> 12 12 #include <linux/of_address.h> 13 13 #include <linux/of_platform.h> 14 + #include <linux/reboot.h> 14 15 15 16 #include <asm/mach/arch.h> 16 17 #include <asm/mach/map.h> ··· 64 63 NULL 65 64 }; 66 65 67 - static void picoxcell_wdt_restart(char mode, const char *cmd) 66 + static void picoxcell_wdt_restart(enum reboot_mode mode, const char *cmd) 68 67 { 69 68 /* 70 69 * Configure the watchdog to reset with the shortest possible timeout
+3 -1
arch/arm/mach-prima2/common.h
··· 10 10 #define __MACH_PRIMA2_COMMON_H__ 11 11 12 12 #include <linux/init.h> 13 + #include <linux/reboot.h> 14 + 13 15 #include <asm/mach/time.h> 14 16 #include <asm/exception.h> 15 17 ··· 24 22 25 23 extern void __init sirfsoc_of_irq_init(void); 26 24 extern void __init sirfsoc_of_clk_init(void); 27 - extern void sirfsoc_restart(char, const char *); 25 + extern void sirfsoc_restart(enum reboot_mode, const char *); 28 26 extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); 29 27 30 28 #ifndef CONFIG_DEBUG_LL
+2 -1
arch/arm/mach-prima2/rstc.c
··· 13 13 #include <linux/device.h> 14 14 #include <linux/of.h> 15 15 #include <linux/of_address.h> 16 + #include <linux/reboot.h> 16 17 17 18 void __iomem *sirfsoc_rstc_base; 18 19 static DEFINE_MUTEX(rstc_lock); ··· 85 84 86 85 #define SIRFSOC_SYS_RST_BIT BIT(31) 87 86 88 - void sirfsoc_restart(char mode, const char *cmd) 87 + void sirfsoc_restart(enum reboot_mode mode, const char *cmd) 89 88 { 90 89 writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); 91 90 }
+3 -3
arch/arm/mach-pxa/corgi.c
··· 663 663 /* Green LED off tells the bootloader to halt */ 664 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 671 if (!machine_is_corgi()) 672 672 /* Green LED on tells the bootloader to reboot */ 673 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 678 static void __init corgi_init(void)
+3 -1
arch/arm/mach-pxa/generic.h
··· 9 9 * published by the Free Software Foundation. 10 10 */ 11 11 12 + #include <linux/reboot.h> 13 + 12 14 struct irq_data; 13 15 14 16 extern void pxa_timer_init(void); ··· 58 56 void __init pxa_set_stuart_info(void *info); 59 57 void __init pxa_set_hwuart_info(void *info); 60 58 61 - void pxa_restart(char, const char *); 59 + void pxa_restart(enum reboot_mode, const char *);
+4 -3
arch/arm/mach-pxa/mioa701.c
··· 37 37 #include <linux/wm97xx.h> 38 38 #include <linux/mtd/physmap.h> 39 39 #include <linux/usb/gpio_vbus.h> 40 + #include <linux/reboot.h> 40 41 #include <linux/regulator/max1586.h> 41 42 #include <linux/slab.h> 42 43 #include <linux/i2c/pxa-i2c.h> ··· 697 696 static void mioa701_poweroff(void) 698 697 { 699 698 mioa701_machine_exit(); 700 - pxa_restart('s', NULL); 699 + pxa_restart(REBOOT_SOFT, NULL); 701 700 } 702 701 703 - static void mioa701_restart(char c, const char *cmd) 702 + static void mioa701_restart(enum reboot_mode c, const char *cmd) 704 703 { 705 704 mioa701_machine_exit(); 706 - pxa_restart('s', cmd); 705 + pxa_restart(REBOOT_SOFT, cmd); 707 706 } 708 707 709 708 static struct gpio global_gpios[] = {
+1 -1
arch/arm/mach-pxa/poodle.c
··· 422 422 423 423 static void poodle_poweroff(void) 424 424 { 425 - pxa_restart('h', NULL); 425 + pxa_restart(REBOOT_HARD, NULL); 426 426 } 427 427 428 428 static void __init poodle_init(void)
+4 -4
arch/arm/mach-pxa/reset.c
··· 83 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 88 local_irq_disable(); 89 89 local_fiq_disable(); ··· 91 91 clear_reset_status(RESET_STATUS_ALL); 92 92 93 93 switch (mode) { 94 - case 's': 94 + case REBOOT_SOFT: 95 95 /* Jump into ROM at address 0 */ 96 96 soft_restart(0); 97 97 break; 98 - case 'g': 98 + case REBOOT_GPIO: 99 99 do_gpio_reset(); 100 100 break; 101 - case 'h': 101 + case REBOOT_HARD: 102 102 default: 103 103 do_hw_reset(); 104 104 break;
+3 -2
arch/arm/mach-pxa/spitz.c
··· 31 31 #include <linux/regulator/machine.h> 32 32 #include <linux/io.h> 33 33 #include <linux/module.h> 34 + #include <linux/reboot.h> 34 35 35 36 #include <asm/setup.h> 36 37 #include <asm/mach-types.h> ··· 925 924 ******************************************************************************/ 926 925 static void spitz_poweroff(void) 927 926 { 928 - pxa_restart('g', NULL); 927 + pxa_restart(REBOOT_GPIO, NULL); 929 928 } 930 929 931 - static void spitz_restart(char mode, const char *cmd) 930 + static void spitz_restart(enum reboot_mode mode, const char *cmd) 932 931 { 933 932 uint32_t msc0 = __raw_readl(MSC0); 934 933 /* Bootloader magic for a reboot */
+3 -2
arch/arm/mach-pxa/tosa.c
··· 36 36 #include <linux/input/matrix_keypad.h> 37 37 #include <linux/i2c/pxa-i2c.h> 38 38 #include <linux/usb/gpio_vbus.h> 39 + #include <linux/reboot.h> 39 40 40 41 #include <asm/setup.h> 41 42 #include <asm/mach-types.h> ··· 912 911 913 912 static void tosa_poweroff(void) 914 913 { 915 - pxa_restart('g', NULL); 914 + pxa_restart(REBOOT_GPIO, NULL); 916 915 } 917 916 918 - static void tosa_restart(char mode, const char *cmd) 917 + static void tosa_restart(enum reboot_mode mode, const char *cmd) 919 918 { 920 919 uint32_t msc0 = __raw_readl(MSC0); 921 920
+2 -1
arch/arm/mach-realview/realview_eb.c
··· 29 29 #include <linux/io.h> 30 30 #include <linux/irqchip/arm-gic.h> 31 31 #include <linux/platform_data/clk-realview.h> 32 + #include <linux/reboot.h> 32 33 33 34 #include <mach/hardware.h> 34 35 #include <asm/irq.h> ··· 419 418 realview_eb_twd_init(); 420 419 } 421 420 422 - static void realview_eb_restart(char mode, const char *cmd) 421 + static void realview_eb_restart(enum reboot_mode mode, const char *cmd) 423 422 { 424 423 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 425 424 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
+2 -1
arch/arm/mach-realview/realview_pb1176.c
··· 31 31 #include <linux/io.h> 32 32 #include <linux/irqchip/arm-gic.h> 33 33 #include <linux/platform_data/clk-realview.h> 34 + #include <linux/reboot.h> 34 35 35 36 #include <mach/hardware.h> 36 37 #include <asm/irq.h> ··· 330 329 realview_timer_init(IRQ_DC1176_TIMER0); 331 330 } 332 331 333 - static void realview_pb1176_restart(char mode, const char *cmd) 332 + static void realview_pb1176_restart(enum reboot_mode mode, const char *cmd) 334 333 { 335 334 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 336 335 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
+2 -1
arch/arm/mach-realview/realview_pb11mp.c
··· 29 29 #include <linux/io.h> 30 30 #include <linux/irqchip/arm-gic.h> 31 31 #include <linux/platform_data/clk-realview.h> 32 + #include <linux/reboot.h> 32 33 33 34 #include <mach/hardware.h> 34 35 #include <asm/irq.h> ··· 317 316 realview_pb11mp_twd_init(); 318 317 } 319 318 320 - static void realview_pb11mp_restart(char mode, const char *cmd) 319 + static void realview_pb11mp_restart(enum reboot_mode mode, const char *cmd) 321 320 { 322 321 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 323 322 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
+2 -1
arch/arm/mach-realview/realview_pba8.c
··· 29 29 #include <linux/io.h> 30 30 #include <linux/irqchip/arm-gic.h> 31 31 #include <linux/platform_data/clk-realview.h> 32 + #include <linux/reboot.h> 32 33 33 34 #include <asm/irq.h> 34 35 #include <asm/mach-types.h> ··· 265 264 realview_timer_init(IRQ_PBA8_TIMER0_1); 266 265 } 267 266 268 - static void realview_pba8_restart(char mode, const char *cmd) 267 + static void realview_pba8_restart(enum reboot_mode mode, const char *cmd) 269 268 { 270 269 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 271 270 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
+2 -1
arch/arm/mach-realview/realview_pbx.c
··· 28 28 #include <linux/io.h> 29 29 #include <linux/irqchip/arm-gic.h> 30 30 #include <linux/platform_data/clk-realview.h> 31 + #include <linux/reboot.h> 31 32 32 33 #include <asm/irq.h> 33 34 #include <asm/mach-types.h> ··· 345 344 #endif 346 345 } 347 346 348 - static void realview_pbx_restart(char mode, const char *cmd) 347 + static void realview_pbx_restart(enum reboot_mode mode, const char *cmd) 349 348 { 350 349 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 351 350 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
+2 -1
arch/arm/mach-rpc/riscpc.c
··· 20 20 #include <linux/ata_platform.h> 21 21 #include <linux/io.h> 22 22 #include <linux/i2c.h> 23 + #include <linux/reboot.h> 23 24 24 25 #include <asm/elf.h> 25 26 #include <asm/mach-types.h> ··· 202 201 203 202 arch_initcall(rpc_init); 204 203 205 - static void rpc_restart(char mode, const char *cmd) 204 + static void rpc_restart(enum reboot_mode mode, const char *cmd) 206 205 { 207 206 iomd_writeb(0, IOMD_ROMCR0); 208 207
+7 -5
arch/arm/mach-s3c24xx/common.h
··· 12 12 #ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H 13 13 #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__ 14 14 15 + #include <linux/reboot.h> 16 + 15 17 struct s3c2410_uartcfg; 16 18 17 19 #ifdef CONFIG_CPU_S3C2410 ··· 22 20 extern void s3c2410_map_io(void); 23 21 extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); 24 22 extern void s3c2410_init_clocks(int xtal); 25 - extern void s3c2410_restart(char mode, const char *cmd); 23 + extern void s3c2410_restart(enum reboot_mode mode, const char *cmd); 26 24 extern void s3c2410_init_irq(void); 27 25 #else 28 26 #define s3c2410_init_clocks NULL ··· 38 36 extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); 39 37 extern void s3c2412_init_clocks(int xtal); 40 38 extern int s3c2412_baseclk_add(void); 41 - extern void s3c2412_restart(char mode, const char *cmd); 39 + extern void s3c2412_restart(enum reboot_mode mode, const char *cmd); 42 40 extern void s3c2412_init_irq(void); 43 41 #else 44 42 #define s3c2412_init_clocks NULL ··· 53 51 extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no); 54 52 extern void s3c2416_init_clocks(int xtal); 55 53 extern int s3c2416_baseclk_add(void); 56 - extern void s3c2416_restart(char mode, const char *cmd); 54 + extern void s3c2416_restart(enum reboot_mode mode, const char *cmd); 57 55 extern void s3c2416_init_irq(void); 58 56 59 57 extern struct syscore_ops s3c2416_irq_syscore_ops; ··· 68 66 extern void s3c244x_map_io(void); 69 67 extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); 70 68 extern void s3c244x_init_clocks(int xtal); 71 - extern void s3c244x_restart(char mode, const char *cmd); 69 + extern void s3c244x_restart(enum reboot_mode mode, const char *cmd); 72 70 #else 73 71 #define s3c244x_init_clocks NULL 74 72 #define s3c244x_init_uarts NULL ··· 98 96 extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); 99 97 extern void s3c2443_init_clocks(int xtal); 100 98 extern int s3c2443_baseclk_add(void); 101 - extern void s3c2443_restart(char mode, const char *cmd); 99 + extern void s3c2443_restart(enum reboot_mode mode, const char *cmd); 102 100 extern void s3c2443_init_irq(void); 103 101 #else 104 102 #define s3c2443_init_clocks NULL
+3 -2
arch/arm/mach-s3c24xx/s3c2410.c
··· 22 22 #include <linux/syscore_ops.h> 23 23 #include <linux/serial_core.h> 24 24 #include <linux/platform_device.h> 25 + #include <linux/reboot.h> 25 26 #include <linux/io.h> 26 27 27 28 #include <asm/mach/arch.h> ··· 197 196 return s3c2410_init(); 198 197 } 199 198 200 - void s3c2410_restart(char mode, const char *cmd) 199 + void s3c2410_restart(enum reboot_mode mode, const char *cmd) 201 200 { 202 - if (mode == 's') { 201 + if (mode == REBOOT_SOFT) { 203 202 soft_restart(0); 204 203 } 205 204
+3 -2
arch/arm/mach-s3c24xx/s3c2412.c
··· 22 22 #include <linux/serial_core.h> 23 23 #include <linux/platform_device.h> 24 24 #include <linux/io.h> 25 + #include <linux/reboot.h> 25 26 26 27 #include <asm/mach/arch.h> 27 28 #include <asm/mach/map.h> ··· 130 129 cpu_do_idle(); 131 130 } 132 131 133 - void s3c2412_restart(char mode, const char *cmd) 132 + void s3c2412_restart(enum reboot_mode mode, const char *cmd) 134 133 { 135 - if (mode == 's') 134 + if (mode == REBOOT_SOFT) 136 135 soft_restart(0); 137 136 138 137 /* errata "Watch-dog/Software Reset Problem" specifies that
+3 -2
arch/arm/mach-s3c24xx/s3c2416.c
··· 35 35 #include <linux/syscore_ops.h> 36 36 #include <linux/clk.h> 37 37 #include <linux/io.h> 38 + #include <linux/reboot.h> 38 39 39 40 #include <asm/mach/arch.h> 40 41 #include <asm/mach/map.h> ··· 80 79 .bus = &s3c2416_subsys, 81 80 }; 82 81 83 - void s3c2416_restart(char mode, const char *cmd) 82 + void s3c2416_restart(enum reboot_mode mode, const char *cmd) 84 83 { 85 - if (mode == 's') 84 + if (mode == REBOOT_SOFT) 86 85 soft_restart(0); 87 86 88 87 __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
+3 -2
arch/arm/mach-s3c24xx/s3c2443.c
··· 22 22 #include <linux/device.h> 23 23 #include <linux/clk.h> 24 24 #include <linux/io.h> 25 + #include <linux/reboot.h> 25 26 26 27 #include <asm/mach/arch.h> 27 28 #include <asm/mach/map.h> ··· 60 59 .bus = &s3c2443_subsys, 61 60 }; 62 61 63 - void s3c2443_restart(char mode, const char *cmd) 62 + void s3c2443_restart(enum reboot_mode mode, const char *cmd) 64 63 { 65 - if (mode == 's') 64 + if (mode == REBOOT_SOFT) 66 65 soft_restart(0); 67 66 68 67 __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
+3 -2
arch/arm/mach-s3c24xx/s3c244x.c
··· 18 18 #include <linux/init.h> 19 19 #include <linux/serial_core.h> 20 20 #include <linux/platform_device.h> 21 + #include <linux/reboot.h> 21 22 #include <linux/device.h> 22 23 #include <linux/syscore_ops.h> 23 24 #include <linux/clk.h> ··· 199 198 .resume = s3c244x_resume, 200 199 }; 201 200 202 - void s3c244x_restart(char mode, const char *cmd) 201 + void s3c244x_restart(enum reboot_mode mode, const char *cmd) 203 202 { 204 - if (mode == 's') 203 + if (mode == REBOOT_SOFT) 205 204 soft_restart(0); 206 205 207 206 samsung_wdt_reset();
+3 -2
arch/arm/mach-s3c64xx/common.c
··· 21 21 #include <linux/ioport.h> 22 22 #include <linux/serial_core.h> 23 23 #include <linux/platform_device.h> 24 + #include <linux/reboot.h> 24 25 #include <linux/io.h> 25 26 #include <linux/dma-mapping.h> 26 27 #include <linux/irq.h> ··· 382 381 } 383 382 arch_initcall(s3c64xx_init_irq_eint); 384 383 385 - void s3c64xx_restart(char mode, const char *cmd) 384 + void s3c64xx_restart(enum reboot_mode mode, const char *cmd) 386 385 { 387 - if (mode != 's') 386 + if (mode != REBOOT_SOFT) 388 387 samsung_wdt_reset(); 389 388 390 389 /* if all else fails, or mode was for soft, jump to 0 */
+3 -1
arch/arm/mach-s3c64xx/common.h
··· 17 17 #ifndef __ARCH_ARM_MACH_S3C64XX_COMMON_H 18 18 #define __ARCH_ARM_MACH_S3C64XX_COMMON_H 19 19 20 + #include <linux/reboot.h> 21 + 20 22 void s3c64xx_init_irq(u32 vic0, u32 vic1); 21 23 void s3c64xx_init_io(struct map_desc *mach_desc, int size); 22 24 23 25 void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit); 24 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 29 void s3c64xx_init_late(void); 28 30 29 31 #ifdef CONFIG_CPU_S3C6400
+3 -2
arch/arm/mach-s5p64x0/common.c
··· 24 24 #include <linux/dma-mapping.h> 25 25 #include <linux/gpio.h> 26 26 #include <linux/irq.h> 27 + #include <linux/reboot.h> 27 28 28 29 #include <asm/irq.h> 29 30 #include <asm/proc-fns.h> ··· 440 439 } 441 440 arch_initcall(s5p64x0_init_irq_eint); 442 441 443 - void s5p64x0_restart(char mode, const char *cmd) 442 + void s5p64x0_restart(enum reboot_mode mode, const char *cmd) 444 443 { 445 - if (mode != 's') 444 + if (mode != REBOOT_SOFT) 446 445 samsung_wdt_reset(); 447 446 448 447 soft_restart(0);
+3 -1
arch/arm/mach-s5p64x0/common.h
··· 12 12 #ifndef __ARCH_ARM_MACH_S5P64X0_COMMON_H 13 13 #define __ARCH_ARM_MACH_S5P64X0_COMMON_H 14 14 15 + #include <linux/reboot.h> 16 + 15 17 void s5p6440_init_irq(void); 16 18 void s5p6450_init_irq(void); 17 19 void s5p64x0_init_io(struct map_desc *mach_desc, int size); ··· 24 22 void s5p6450_register_clocks(void); 25 23 void s5p6450_setup_clocks(void); 26 24 27 - void s5p64x0_restart(char mode, const char *cmd); 25 + void s5p64x0_restart(enum reboot_mode mode, const char *cmd); 28 26 29 27 #ifdef CONFIG_CPU_S5P6440 30 28
+3 -2
arch/arm/mach-s5pc100/common.c
··· 24 24 #include <linux/serial_core.h> 25 25 #include <linux/platform_device.h> 26 26 #include <linux/sched.h> 27 + #include <linux/reboot.h> 27 28 28 29 #include <asm/irq.h> 29 30 #include <asm/proc-fns.h> ··· 218 217 s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); 219 218 } 220 219 221 - void s5pc100_restart(char mode, const char *cmd) 220 + void s5pc100_restart(enum reboot_mode mode, const char *cmd) 222 221 { 223 - if (mode != 's') 222 + if (mode != REBOOT_SOFT) 224 223 samsung_wdt_reset(); 225 224 226 225 soft_restart(0);
+3 -1
arch/arm/mach-s5pc100/common.h
··· 12 12 #ifndef __ARCH_ARM_MACH_S5PC100_COMMON_H 13 13 #define __ARCH_ARM_MACH_S5PC100_COMMON_H 14 14 15 + #include <linux/reboot.h> 16 + 15 17 void s5pc100_init_io(struct map_desc *mach_desc, int size); 16 18 void s5pc100_init_irq(void); 17 19 18 20 void s5pc100_register_clocks(void); 19 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 25 extern int s5pc100_init(void); 24 26 extern void s5pc100_map_io(void);
+1 -1
arch/arm/mach-s5pv210/common.c
··· 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 148 __raw_writel(0x1, S5P_SWRESET); 149 149 }
+3 -1
arch/arm/mach-s5pv210/common.h
··· 12 12 #ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H 13 13 #define __ARCH_ARM_MACH_S5PV210_COMMON_H 14 14 15 + #include <linux/reboot.h> 16 + 15 17 void s5pv210_init_io(struct map_desc *mach_desc, int size); 16 18 void s5pv210_init_irq(void); 17 19 18 20 void s5pv210_register_clocks(void); 19 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 25 extern int s5pv210_init(void); 24 26 extern void s5pv210_map_io(void);
+3 -2
arch/arm/mach-sa1100/generic.c
··· 19 19 #include <linux/cpufreq.h> 20 20 #include <linux/ioport.h> 21 21 #include <linux/platform_device.h> 22 + #include <linux/reboot.h> 22 23 23 24 #include <video/sa1100fb.h> 24 25 ··· 132 131 PMCR = PMCR_SF; 133 132 } 134 133 135 - void sa11x0_restart(char mode, const char *cmd) 134 + void sa11x0_restart(enum reboot_mode mode, const char *cmd) 136 135 { 137 - if (mode == 's') { 136 + if (mode == REBOOT_SOFT) { 138 137 /* Jump into ROM at address 0 */ 139 138 soft_restart(0); 140 139 } else {
+2 -1
arch/arm/mach-sa1100/generic.h
··· 3 3 * 4 4 * Author: Nicolas Pitre 5 5 */ 6 + #include <linux/reboot.h> 6 7 7 8 extern void sa1100_timer_init(void); 8 9 extern void __init sa1100_map_io(void); 9 10 extern void __init sa1100_init_irq(void); 10 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 13 extern void sa11x0_init_late(void); 13 14 14 15 #define SET_BANK(__nr,__start,__size) \
+2 -1
arch/arm/mach-shark/core.c
··· 11 11 #include <linux/serial_8250.h> 12 12 #include <linux/io.h> 13 13 #include <linux/cpu.h> 14 + #include <linux/reboot.h> 14 15 15 16 #include <asm/setup.h> 16 17 #include <asm/mach-types.h> ··· 25 24 #define ROMCARD_SIZE 0x08000000 26 25 #define ROMCARD_START 0x10000000 27 26 28 - static void shark_restart(char mode, const char *cmd) 27 + static void shark_restart(enum reboot_mode mode, const char *cmd) 29 28 { 30 29 short temp; 31 30 /* Reset the Machine via pc[3] of the sequoia chipset */
+2 -1
arch/arm/mach-shmobile/board-armadillo800eva.c
··· 42 42 #include <linux/mmc/sh_mmcif.h> 43 43 #include <linux/mmc/sh_mobile_sdhi.h> 44 44 #include <linux/i2c-gpio.h> 45 + #include <linux/reboot.h> 45 46 #include <mach/common.h> 46 47 #include <mach/irqs.h> 47 48 #include <mach/r8a7740.h> ··· 1260 1259 } 1261 1260 1262 1261 #define RESCNT2 IOMEM(0xe6188020) 1263 - static void eva_restart(char mode, const char *cmd) 1262 + static void eva_restart(enum reboot_mode mode, const char *cmd) 1264 1263 { 1265 1264 /* Do soft power on reset */ 1266 1265 writel((1 << 31), RESCNT2);
+2 -1
arch/arm/mach-shmobile/board-kzm9g.c
··· 34 34 #include <linux/pinctrl/machine.h> 35 35 #include <linux/pinctrl/pinconf-generic.h> 36 36 #include <linux/platform_device.h> 37 + #include <linux/reboot.h> 37 38 #include <linux/regulator/fixed.h> 38 39 #include <linux/regulator/machine.h> 39 40 #include <linux/smsc911x.h> ··· 891 890 sh73a0_pm_init(); 892 891 } 893 892 894 - static void kzm9g_restart(char mode, const char *cmd) 893 + static void kzm9g_restart(enum reboot_mode mode, const char *cmd) 895 894 { 896 895 #define RESCNT2 IOMEM(0xe6188020) 897 896 /* Do soft power on reset */
+3 -2
arch/arm/mach-socfpga/socfpga.c
··· 19 19 #include <linux/of_address.h> 20 20 #include <linux/of_irq.h> 21 21 #include <linux/of_platform.h> 22 + #include <linux/reboot.h> 22 23 23 24 #include <asm/hardware/cache-l2x0.h> 24 25 #include <asm/mach/arch.h> ··· 90 89 socfpga_sysmgr_init(); 91 90 } 92 91 93 - static void socfpga_cyclone5_restart(char mode, const char *cmd) 92 + static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd) 94 93 { 95 94 u32 temp; 96 95 97 96 temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL); 98 97 99 - if (mode == 'h') 98 + if (mode == REBOOT_HARD) 100 99 temp |= RSTMGR_CTRL_SWCOLDRSTREQ; 101 100 else 102 101 temp |= RSTMGR_CTRL_SWWARMRSTREQ;
+3 -1
arch/arm/mach-spear/generic.h
··· 16 16 #include <linux/dmaengine.h> 17 17 #include <linux/amba/pl08x.h> 18 18 #include <linux/init.h> 19 + #include <linux/reboot.h> 20 + 19 21 #include <asm/mach/time.h> 20 22 21 23 extern void spear13xx_timer_init(void); ··· 34 32 void __init spear13xx_map_io(void); 35 33 void __init spear13xx_l2x0_init(void); 36 34 37 - void spear_restart(char, const char *); 35 + void spear_restart(enum reboot_mode, const char *); 38 36 39 37 void spear13xx_secondary_startup(void); 40 38 void __cpuinit spear13xx_cpu_die(unsigned int cpu);
+3 -2
arch/arm/mach-spear/restart.c
··· 12 12 */ 13 13 #include <linux/io.h> 14 14 #include <linux/amba/sp810.h> 15 + #include <linux/reboot.h> 15 16 #include <asm/system_misc.h> 16 17 #include <mach/spear.h> 17 18 #include "generic.h" 18 19 19 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 24 /* software reset, Jump into ROM at address 0 */ 24 25 soft_restart(0); 25 26 } else {
+2 -1
arch/arm/mach-sunxi/sunxi.c
··· 18 18 #include <linux/of_irq.h> 19 19 #include <linux/of_platform.h> 20 20 #include <linux/io.h> 21 + #include <linux/reboot.h> 21 22 22 23 #include <linux/clk/sunxi.h> 23 24 ··· 34 33 35 34 static void __iomem *wdt_base; 36 35 37 - static void sun4i_restart(char mode, const char *cmd) 36 + static void sun4i_restart(enum reboot_mode mode, const char *cmd) 38 37 { 39 38 if (!wdt_base) 40 39 return;
+2 -1
arch/arm/mach-tegra/board.h
··· 23 23 #define __MACH_TEGRA_BOARD_H 24 24 25 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 30 void __init tegra_init_early(void); 30 31 void __init tegra_map_common_io(void);
+2 -1
arch/arm/mach-tegra/common.c
··· 22 22 #include <linux/io.h> 23 23 #include <linux/clk.h> 24 24 #include <linux/delay.h> 25 + #include <linux/reboot.h> 25 26 #include <linux/irqchip.h> 26 27 #include <linux/clk-provider.h> 27 28 ··· 69 68 } 70 69 #endif 71 70 72 - void tegra_assert_system_reset(char mode, const char *cmd) 71 + void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd) 73 72 { 74 73 void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0); 75 74 u32 reg;
+3 -3
arch/arm/mach-u300/core.c
··· 300 300 /* Forward declare this function from the watchdog */ 301 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 305 switch (mode) { 306 - case 's': 307 - case 'h': 306 + case REBOOT_SOFT: 307 + case REBOOT_HARD: 308 308 #ifdef CONFIG_COH901327_WATCHDOG 309 309 coh901327_watchdog_reset(); 310 310 #endif
+2 -1
arch/arm/mach-versatile/core.c
··· 38 38 #include <linux/clkdev.h> 39 39 #include <linux/mtd/physmap.h> 40 40 #include <linux/bitops.h> 41 + #include <linux/reboot.h> 41 42 42 43 #include <asm/irq.h> 43 44 #include <asm/hardware/arm_timer.h> ··· 734 733 } 735 734 #endif /* CONFIG_LEDS */ 736 735 737 - void versatile_restart(char mode, const char *cmd) 736 + void versatile_restart(enum reboot_mode mode, const char *cmd) 738 737 { 739 738 void __iomem *sys = __io_address(VERSATILE_SYS_BASE); 740 739 u32 val;
+2 -1
arch/arm/mach-versatile/core.h
··· 24 24 25 25 #include <linux/amba/bus.h> 26 26 #include <linux/of_platform.h> 27 + #include <linux/reboot.h> 27 28 28 29 extern void __init versatile_init(void); 29 30 extern void __init versatile_init_early(void); 30 31 extern void __init versatile_init_irq(void); 31 32 extern void __init versatile_map_io(void); 32 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 35 extern unsigned int mmc_status(struct device *dev); 35 36 #ifdef CONFIG_OF 36 37 extern struct of_dev_auxdata versatile_auxdata_lookup[];
+2 -1
arch/arm/mach-vt8500/vt8500.c
··· 21 21 #include <linux/clocksource.h> 22 22 #include <linux/io.h> 23 23 #include <linux/pm.h> 24 + #include <linux/reboot.h> 24 25 25 26 #include <asm/mach-types.h> 26 27 #include <asm/mach/arch.h> ··· 47 46 48 47 static void __iomem *pmc_base; 49 48 50 - void vt8500_restart(char mode, const char *cmd) 49 + void vt8500_restart(enum reboot_mode mode, const char *cmd) 51 50 { 52 51 if (pmc_base) 53 52 writel(1, pmc_base + VT8500_PMSR_REG);
+2 -2
arch/arm/mach-w90x900/cpu.c
··· 230 230 #define WTE (1 << 7) 231 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 236 /* Jump into ROM at address 0 */ 237 237 soft_restart(0); 238 238 } else {
+4 -1
arch/arm/mach-w90x900/nuc9xx.h
··· 14 14 * published by the Free Software Foundation. 15 15 * 16 16 */ 17 + 18 + #include <linux/reboot.h> 19 + 17 20 struct map_desc; 18 21 19 22 /* core initialisation functions */ 20 23 21 24 extern void nuc900_init_irq(void); 22 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 *);
+1
arch/arm/plat-iop/gpio.c
··· 17 17 #include <linux/gpio.h> 18 18 #include <linux/export.h> 19 19 #include <asm/hardware/iop3xx.h> 20 + #include <mach/gpio.h> 20 21 21 22 void gpio_line_config(int line, int direction) 22 23 {
+1 -1
arch/arm/plat-iop/restart.c
··· 11 11 #include <asm/system_misc.h> 12 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 16 *IOP3XX_PCSR = 0x30; 17 17
+2 -1
drivers/power/reset/restart-poweroff.c
··· 15 15 #include <linux/platform_device.h> 16 16 #include <linux/of_platform.h> 17 17 #include <linux/module.h> 18 + #include <linux/reboot.h> 18 19 #include <asm/system_misc.h> 19 20 20 21 static void restart_poweroff_do_poweroff(void) 21 22 { 22 - arm_pm_restart('h', NULL); 23 + arm_pm_restart(REBOOT_HARD, NULL); 23 24 } 24 25 25 26 static int restart_poweroff_probe(struct platform_device *pdev)
+1 -1
drivers/power/reset/vexpress-poweroff.c
··· 48 48 49 49 static struct device *vexpress_restart_device; 50 50 51 - static void vexpress_restart(char str, const char *cmd) 51 + static void vexpress_restart(enum reboot_mode reboot_mode, const char *cmd) 52 52 { 53 53 vexpress_reset_do(vexpress_restart_device, "restart"); 54 54 }
+1
include/linux/reboot.h
··· 15 15 REBOOT_WARM, 16 16 REBOOT_HARD, 17 17 REBOOT_SOFT, 18 + REBOOT_GPIO, 18 19 }; 19 20 20 21 extern int register_reboot_notifier(struct notifier_block *);
+1
include/linux/vexpress.h
··· 15 15 #define _LINUX_VEXPRESS_H 16 16 17 17 #include <linux/device.h> 18 + #include <linux/reboot.h> 18 19 19 20 #define VEXPRESS_SITE_MB 0 20 21 #define VEXPRESS_SITE_DB1 1