Skip to content

Commit dadaa1c

Browse files
paulburtonralfbaechle
authored andcommitted
MIPS: Malta: support powering down
This patch powers down the Malta in response to a power off command (eg. poweroff or shutdown -P). It may then be powered back up by pressing the "ON/NMI" button (S4) on the board. In cases where the power off state cannot be entered (eg. because the required PCI support is disabled) the current reset behaviour will be used as a fallback. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Tested-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6907/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 37e5c83 commit dadaa1c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎arch/mips/mti-malta/malta-reset.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/pm.h>
1111

1212
#include <asm/reboot.h>
13+
#include <asm/mach-malta/malta-pm.h>
1314

1415
#define SOFTRES_REG 0x1f000500
1516
#define GORESET 0x42
@@ -29,6 +30,9 @@ static void mips_machine_halt(void)
2930

3031
static void mips_machine_power_off(void)
3132
{
33+
mips_pm_suspend(PIIX4_FUNC3IO_PMCNTRL_SUS_TYP_SOFF);
34+
35+
pr_info("Failed to power down, resetting\n");
3236
mips_machine_restart(NULL);
3337
}
3438

0 commit comments

Comments
 (0)