@@ -3,6 +3,7 @@ obj-y += identify.o
obj-y += intc-irq.o
obj-y += irq.o
obj-y += memory.o
+obj-y += reboot.o
obj-y += rom.o
obj-m += rom-sysfs.o
obj-y += scmd.o
new file mode 100644
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * PlayStation 2 power off
+ *
+ * Copyright (C) 2019 Fredrik Noring
+ */
+
+#include <linux/init.h>
+#include <linux/pm.h>
+
+#include <asm/processor.h>
+#include <asm/reboot.h>
+
+#include <asm/mach-ps2/scmd.h>
+
+static void __noreturn power_off(void)
+{
+ scmd_power_off();
+
+ cpu_relax_forever();
+}
+
+static int __init ps2_init_reboot(void)
+{
+ pm_power_off = power_off;
+
+ return 0;
+}
+subsys_initcall(ps2_init_reboot);
Signed-off-by: Fredrik Noring <noring@nocrew.org> --- arch/mips/ps2/Makefile | 1 + arch/mips/ps2/reboot.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 arch/mips/ps2/reboot.c