[MIPS] add cpu_wait() to machine_halt()
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Wed, 12 Dec 2007 13:23:13 +0000 (22:23 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 29 Jan 2008 10:15:00 +0000 (10:15 +0000)
Added cpu_wait() to machine_halt().
For the power reduction in halt.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/cobalt/reset.c

index c3d1baa5bcf1ee92d9dadfb5b033a83a011a528c..516b4428df4ecd3ac5b45a6397f8ffe4a2e070c1 100644 (file)
@@ -12,6 +12,8 @@
 #include <linux/io.h>
 #include <linux/leds.h>
 
+#include <asm/processor.h>
+
 #include <cobalt.h>
 
 #define RESET_PORT     ((void __iomem *)CKSEG1ADDR(0x1c000000))
@@ -34,7 +36,10 @@ void cobalt_machine_halt(void)
        led_trigger_event(power_off_led_trigger, LED_FULL);
 
        local_irq_disable();
-       while (1) ;
+       while (1) {
+               if (cpu_wait)
+                       cpu_wait();
+       }
 }
 
 void cobalt_machine_restart(char *command)