diff options
author | James Morris <james.l.morris@oracle.com> | 2014-07-17 02:10:27 +1000 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-07-17 02:10:27 +1000 |
commit | bd89bb78f35fd175db7a9cfc504d789b6ca0f7b0 (patch) | |
tree | dee9f8b31f3d6d2fb141541da88e1cc1329b017e /arch/mips/mti-malta/malta-reset.c | |
parent | Merge commit 'v3.15' into next (diff) | |
parent | Linux 3.16-rc5 (diff) | |
download | linux-dev-bd89bb78f35fd175db7a9cfc504d789b6ca0f7b0.tar.xz linux-dev-bd89bb78f35fd175db7a9cfc504d789b6ca0f7b0.zip |
Sync with the changes pushed by Serge in the last merge window.
Diffstat (limited to 'arch/mips/mti-malta/malta-reset.c')
-rw-r--r-- | arch/mips/mti-malta/malta-reset.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/mips/mti-malta/malta-reset.c b/arch/mips/mti-malta/malta-reset.c index d627d4b2b47f..2fd2cc2c5034 100644 --- a/arch/mips/mti-malta/malta-reset.c +++ b/arch/mips/mti-malta/malta-reset.c @@ -10,6 +10,7 @@ #include <linux/pm.h> #include <asm/reboot.h> +#include <asm/mach-malta/malta-pm.h> #define SOFTRES_REG 0x1f000500 #define GORESET 0x42 @@ -24,17 +25,22 @@ static void mips_machine_restart(char *command) static void mips_machine_halt(void) { - unsigned int __iomem *softres_reg = - ioremap(SOFTRES_REG, sizeof(unsigned int)); + while (true); +} - __raw_writel(GORESET, softres_reg); +static void mips_machine_power_off(void) +{ + mips_pm_suspend(PIIX4_FUNC3IO_PMCNTRL_SUS_TYP_SOFF); + + pr_info("Failed to power down, resetting\n"); + mips_machine_restart(NULL); } static int __init mips_reboot_setup(void) { _machine_restart = mips_machine_restart; _machine_halt = mips_machine_halt; - pm_power_off = mips_machine_halt; + pm_power_off = mips_machine_power_off; return 0; } |