diff options
author | Robin Holt <holt@sgi.com> | 2013-07-08 19:01:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-09 13:33:29 -0400 |
commit | 7b6d864b48d95e6ea1df7df64475b9cb9616dcf9 (patch) | |
tree | bc5b3c1c6021e19e51f7f5afe5fb0fbbaef9f7a3 /arch/arm/mach-pxa | |
parent | 16d6d5b00ee75307bab7e4ede9452c97b28f30e2 (diff) |
reboot: arm: change reboot_mode to use enum reboot_mode
Preparing to move the parsing of reboot= to generic kernel code forces
the change in reboot_mode handling to use the enum.
[akpm@linux-foundation.org: fix arch/arm/mach-socfpga/socfpga.c]
Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Russ Anderson <rja@sgi.com>
Cc: Robin Holt <holt@sgi.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-pxa/generic.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/mioa701.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-pxa/poodle.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/reset.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 5 |
7 files changed, 21 insertions, 16 deletions
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index a5b8fead7d61..f162f1b77cd2 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -663,16 +663,16 @@ static void corgi_poweroff(void) | |||
663 | /* Green LED off tells the bootloader to halt */ | 663 | /* Green LED off tells the bootloader to halt */ |
664 | gpio_set_value(CORGI_GPIO_LED_GREEN, 0); | 664 | gpio_set_value(CORGI_GPIO_LED_GREEN, 0); |
665 | 665 | ||
666 | pxa_restart('h', NULL); | 666 | pxa_restart(REBOOT_HARD, NULL); |
667 | } | 667 | } |
668 | 668 | ||
669 | static void corgi_restart(char mode, const char *cmd) | 669 | static void corgi_restart(enum reboot_mode mode, const char *cmd) |
670 | { | 670 | { |
671 | if (!machine_is_corgi()) | 671 | if (!machine_is_corgi()) |
672 | /* Green LED on tells the bootloader to reboot */ | 672 | /* Green LED on tells the bootloader to reboot */ |
673 | gpio_set_value(CORGI_GPIO_LED_GREEN, 1); | 673 | gpio_set_value(CORGI_GPIO_LED_GREEN, 1); |
674 | 674 | ||
675 | pxa_restart('h', cmd); | 675 | pxa_restart(REBOOT_HARD, cmd); |
676 | } | 676 | } |
677 | 677 | ||
678 | static void __init corgi_init(void) | 678 | static void __init corgi_init(void) |
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h index fd7ea39b78c0..8963984d1f43 100644 --- a/arch/arm/mach-pxa/generic.h +++ b/arch/arm/mach-pxa/generic.h | |||
@@ -9,6 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/reboot.h> | ||
13 | |||
12 | struct irq_data; | 14 | struct irq_data; |
13 | 15 | ||
14 | extern void pxa_timer_init(void); | 16 | extern void pxa_timer_init(void); |
@@ -56,4 +58,4 @@ void __init pxa_set_btuart_info(void *info); | |||
56 | void __init pxa_set_stuart_info(void *info); | 58 | void __init pxa_set_stuart_info(void *info); |
57 | void __init pxa_set_hwuart_info(void *info); | 59 | void __init pxa_set_hwuart_info(void *info); |
58 | 60 | ||
59 | void pxa_restart(char, const char *); | 61 | void pxa_restart(enum reboot_mode, const char *); |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index e6b0a936c150..acc9d3cc0762 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/wm97xx.h> | 37 | #include <linux/wm97xx.h> |
38 | #include <linux/mtd/physmap.h> | 38 | #include <linux/mtd/physmap.h> |
39 | #include <linux/usb/gpio_vbus.h> | 39 | #include <linux/usb/gpio_vbus.h> |
40 | #include <linux/reboot.h> | ||
40 | #include <linux/regulator/max1586.h> | 41 | #include <linux/regulator/max1586.h> |
41 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
42 | #include <linux/i2c/pxa-i2c.h> | 43 | #include <linux/i2c/pxa-i2c.h> |
@@ -696,13 +697,13 @@ static void mioa701_machine_exit(void); | |||
696 | static void mioa701_poweroff(void) | 697 | static void mioa701_poweroff(void) |
697 | { | 698 | { |
698 | mioa701_machine_exit(); | 699 | mioa701_machine_exit(); |
699 | pxa_restart('s', NULL); | 700 | pxa_restart(REBOOT_SOFT, NULL); |
700 | } | 701 | } |
701 | 702 | ||
702 | static void mioa701_restart(char c, const char *cmd) | 703 | static void mioa701_restart(enum reboot_mode c, const char *cmd) |
703 | { | 704 | { |
704 | mioa701_machine_exit(); | 705 | mioa701_machine_exit(); |
705 | pxa_restart('s', cmd); | 706 | pxa_restart(REBOOT_SOFT, cmd); |
706 | } | 707 | } |
707 | 708 | ||
708 | static struct gpio global_gpios[] = { | 709 | static struct gpio global_gpios[] = { |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 50ccd5f1d560..711d37e26bd8 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -422,7 +422,7 @@ static struct i2c_board_info __initdata poodle_i2c_devices[] = { | |||
422 | 422 | ||
423 | static void poodle_poweroff(void) | 423 | static void poodle_poweroff(void) |
424 | { | 424 | { |
425 | pxa_restart('h', NULL); | 425 | pxa_restart(REBOOT_HARD, NULL); |
426 | } | 426 | } |
427 | 427 | ||
428 | static void __init poodle_init(void) | 428 | static void __init poodle_init(void) |
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c index 3fab583755d4..0d5dd646f61f 100644 --- a/arch/arm/mach-pxa/reset.c +++ b/arch/arm/mach-pxa/reset.c | |||
@@ -83,7 +83,7 @@ static void do_hw_reset(void) | |||
83 | writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); | 83 | writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); |
84 | } | 84 | } |
85 | 85 | ||
86 | void pxa_restart(char mode, const char *cmd) | 86 | void pxa_restart(enum reboot_mode mode, const char *cmd) |
87 | { | 87 | { |
88 | local_irq_disable(); | 88 | local_irq_disable(); |
89 | local_fiq_disable(); | 89 | local_fiq_disable(); |
@@ -91,14 +91,14 @@ void pxa_restart(char mode, const char *cmd) | |||
91 | clear_reset_status(RESET_STATUS_ALL); | 91 | clear_reset_status(RESET_STATUS_ALL); |
92 | 92 | ||
93 | switch (mode) { | 93 | switch (mode) { |
94 | case 's': | 94 | case REBOOT_SOFT: |
95 | /* Jump into ROM at address 0 */ | 95 | /* Jump into ROM at address 0 */ |
96 | soft_restart(0); | 96 | soft_restart(0); |
97 | break; | 97 | break; |
98 | case 'g': | 98 | case REBOOT_GPIO: |
99 | do_gpio_reset(); | 99 | do_gpio_reset(); |
100 | break; | 100 | break; |
101 | case 'h': | 101 | case REBOOT_HARD: |
102 | default: | 102 | default: |
103 | do_hw_reset(); | 103 | do_hw_reset(); |
104 | break; | 104 | break; |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index c3c00424bb35..2125df0444e7 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/regulator/machine.h> | 31 | #include <linux/regulator/machine.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/reboot.h> | ||
34 | 35 | ||
35 | #include <asm/setup.h> | 36 | #include <asm/setup.h> |
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
@@ -924,10 +925,10 @@ static inline void spitz_i2c_init(void) {} | |||
924 | ******************************************************************************/ | 925 | ******************************************************************************/ |
925 | static void spitz_poweroff(void) | 926 | static void spitz_poweroff(void) |
926 | { | 927 | { |
927 | pxa_restart('g', NULL); | 928 | pxa_restart(REBOOT_GPIO, NULL); |
928 | } | 929 | } |
929 | 930 | ||
930 | static void spitz_restart(char mode, const char *cmd) | 931 | static void spitz_restart(enum reboot_mode mode, const char *cmd) |
931 | { | 932 | { |
932 | uint32_t msc0 = __raw_readl(MSC0); | 933 | uint32_t msc0 = __raw_readl(MSC0); |
933 | /* Bootloader magic for a reboot */ | 934 | /* Bootloader magic for a reboot */ |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index a41992fea720..0206b915a6f6 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/input/matrix_keypad.h> | 36 | #include <linux/input/matrix_keypad.h> |
37 | #include <linux/i2c/pxa-i2c.h> | 37 | #include <linux/i2c/pxa-i2c.h> |
38 | #include <linux/usb/gpio_vbus.h> | 38 | #include <linux/usb/gpio_vbus.h> |
39 | #include <linux/reboot.h> | ||
39 | 40 | ||
40 | #include <asm/setup.h> | 41 | #include <asm/setup.h> |
41 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
@@ -911,10 +912,10 @@ static struct platform_device *devices[] __initdata = { | |||
911 | 912 | ||
912 | static void tosa_poweroff(void) | 913 | static void tosa_poweroff(void) |
913 | { | 914 | { |
914 | pxa_restart('g', NULL); | 915 | pxa_restart(REBOOT_GPIO, NULL); |
915 | } | 916 | } |
916 | 917 | ||
917 | static void tosa_restart(char mode, const char *cmd) | 918 | static void tosa_restart(enum reboot_mode mode, const char *cmd) |
918 | { | 919 | { |
919 | uint32_t msc0 = __raw_readl(MSC0); | 920 | uint32_t msc0 = __raw_readl(MSC0); |
920 | 921 | ||