aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/loongson/common/reset.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/loongson/common/reset.c')
-rw-r--r--arch/mips/loongson/common/reset.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/mips/loongson/common/reset.c b/arch/mips/loongson/common/reset.c
index d57f1719da95..4bd9c18b07a5 100644
--- a/arch/mips/loongson/common/reset.c
+++ b/arch/mips/loongson/common/reset.c
@@ -6,8 +6,8 @@
6 * 6 *
7 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology 7 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
8 * Author: Fuxin Zhang, zhangfx@lemote.com 8 * Author: Fuxin Zhang, zhangfx@lemote.com
9 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology 9 * Copyright (C) 2009 Lemote, Inc.
10 * Author: Zhangjin Wu, wuzj@lemote.com 10 * Author: Zhangjin Wu, wuzhangjin@gmail.com
11 */ 11 */
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/pm.h> 13#include <linux/pm.h>
@@ -25,18 +25,26 @@ static void loongson_restart(char *command)
25 ((void (*)(void))ioremap_nocache(LOONGSON_BOOT_BASE, 4)) (); 25 ((void (*)(void))ioremap_nocache(LOONGSON_BOOT_BASE, 4)) ();
26} 26}
27 27
28static void loongson_halt(void) 28static void loongson_poweroff(void)
29{ 29{
30 mach_prepare_shutdown(); 30 mach_prepare_shutdown();
31 while (1) 31 unreachable();
32 ; 32}
33
34static void loongson_halt(void)
35{
36 pr_notice("\n\n** You can safely turn off the power now **\n\n");
37 while (1) {
38 if (cpu_wait)
39 cpu_wait();
40 }
33} 41}
34 42
35static int __init mips_reboot_setup(void) 43static int __init mips_reboot_setup(void)
36{ 44{
37 _machine_restart = loongson_restart; 45 _machine_restart = loongson_restart;
38 _machine_halt = loongson_halt; 46 _machine_halt = loongson_halt;
39 pm_power_off = loongson_halt; 47 pm_power_off = loongson_poweroff;
40 48
41 return 0; 49 return 0;
42} 50}