Skip to content

Commit 37e5c83

Browse files
paulburtonralfbaechle
authored andcommitted
MIPS: Malta: hang on halt
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>
1 parent 9e53481 commit 37e5c83

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,19 @@ static void mips_machine_restart(char *command)
2424

2525
static void mips_machine_halt(void)
2626
{
27-
unsigned int __iomem *softres_reg =
28-
ioremap(SOFTRES_REG, sizeof(unsigned int));
27+
while (true);
28+
}
2929

30-
__raw_writel(GORESET, softres_reg);
30+
static void mips_machine_power_off(void)
31+
{
32+
mips_machine_restart(NULL);
3133
}
3234

3335
static int __init mips_reboot_setup(void)
3436
{
3537
_machine_restart = mips_machine_restart;
3638
_machine_halt = mips_machine_halt;
37-
pm_power_off = mips_machine_halt;
39+
pm_power_off = mips_machine_power_off;
3840

3941
return 0;
4042
}

0 commit comments

Comments
 (0)