52 lines
1.5 KiB
Diff
52 lines
1.5 KiB
Diff
From: Paul Burton <paul.burton@imgtec.com>
|
|
Date: Wed, 7 May 2014 12:20:59 +0100
|
|
Subject: [4/5] MIPS: Malta: hang on halt
|
|
Origin: https://git.kernel.org/linus/37e5c835bbbce4fde11cccc30dfe6c7b853ea964
|
|
|
|
When the system is halted it makes little sense to reset it. Instead,
|
|
hang by executing an infinite loop.
|
|
|
|
[ralf@linux-mips.org: Remove printk from mips_machine_halt() - this is not
|
|
the place to communicate with the user.]
|
|
|
|
Suggested-by: Maciej W. Rozycki <macro@linux-mips.org>
|
|
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
|
|
Cc: linux-mips@linux-mips.org
|
|
Patchwork: https://patchwork.linux-mips.org/patch/6906/
|
|
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
---
|
|
arch/mips/mti-malta/malta-reset.c | 10 ++++++----
|
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/arch/mips/mti-malta/malta-reset.c b/arch/mips/mti-malta/malta-reset.c
|
|
index d627d4b..199ed280 100644
|
|
--- a/arch/mips/mti-malta/malta-reset.c
|
|
+++ b/arch/mips/mti-malta/malta-reset.c
|
|
@@ -24,17 +24,19 @@ 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_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;
|
|
}
|
|
--
|
|
2.0.0
|
|
|