[PATCH 04/11] MIPS: use the common machine reset handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Domenico Andreoli <domenico.andreoli@xxxxxxxxx>

Proof of concept: MIPS as a consumer of the machine reset hooks.

Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Cc: linux-arch@xxxxxxxxxxxxxxx
Cc: linux-mips@xxxxxxxxxxxxxxx
Signed-off-by: Domenico Andreoli <domenico.andreoli@xxxxxxxxx>
---
 arch/mips/kernel/reset.c |    7 +++++++
 kernel/power/Kconfig     |    2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

Index: b/arch/mips/kernel/reset.c
===================================================================
--- a/arch/mips/kernel/reset.c
+++ b/arch/mips/kernel/reset.c
@@ -11,6 +11,7 @@
 #include <linux/pm.h>
 #include <linux/types.h>
 #include <linux/reboot.h>
+#include <linux/machine_reset.h>
 
 #include <asm/reboot.h>
 
@@ -29,16 +30,22 @@ void machine_restart(char *command)
 {
 	if (_machine_restart)
 		_machine_restart(command);
+	else
+		default_restart(reboot_mode, command);
 }
 
 void machine_halt(void)
 {
 	if (_machine_halt)
 		_machine_halt();
+	else
+		default_halt();
 }
 
 void machine_power_off(void)
 {
 	if (pm_power_off)
 		pm_power_off();
+	else
+		default_power_off();
 }
Index: b/kernel/power/Kconfig
===================================================================
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -297,4 +297,4 @@ config CPU_PM
 config MACHINE_RESET
 	bool
 	default n
-	depends on ARM || ARM64
+	depends on ARM || ARM64 || MIPS

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux