Skip to content

Commit

Permalink
MIPS: Malta: hang on halt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Burton authored and Ralf Baechle committed May 30, 2014
1 parent 9e53481 commit 37e5c83
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions arch/mips/mti-malta/malta-reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 37e5c83

Please sign in to comment.