MIPS: Alchemy: devboards: sit and spin after poweroff
authorManuel Lauss <manuel.lauss@gmail.com>
Wed, 20 Aug 2014 19:36:30 +0000 (21:36 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 22 Sep 2014 11:35:46 +0000 (13:35 +0200)
On boards which don't support poweroff, systemd complains about this fact.
In case poweroff fails, just sit and spin in the wait loop.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Manuel Lauss <manuel.lauss@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/7558/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/alchemy/devboards/platform.c

index 8df86eb94972e06c14971b21f565d241c43313d5..be139a0198b0bf40d3488dd7926f16cd58106afc 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/pm.h>
 
 #include <asm/bootinfo.h>
+#include <asm/idle.h>
 #include <asm/reboot.h>
 #include <asm/mach-au1x00/au1000.h>
 #include <asm/mach-db1x00/bcsr.h>
@@ -53,6 +54,8 @@ static void db1x_power_off(void)
 {
        bcsr_write(BCSR_RESETS, 0);
        bcsr_write(BCSR_SYSTEM, BCSR_SYSTEM_PWROFF | BCSR_SYSTEM_RESET);
+       while (1)               /* sit and spin */
+               cpu_wait();
 }
 
 static void db1x_reset(char *c)