[PATCH][2/2][MIPS] add cpu_wait() to machine_halt()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Added cpu_wait() to machine_halt().
For the power reduction in halt.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@xxxxxxxxxxxxxx>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/reset.c mips/arch/mips/cobalt/reset.c
--- mips-orig/arch/mips/cobalt/reset.c	2007-10-22 09:32:10.074729000 +0900
+++ mips/arch/mips/cobalt/reset.c	2007-10-22 09:59:23.092786250 +0900
@@ -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))
@@ -35,7 +37,10 @@ void cobalt_machine_halt(void)
 
 	local_irq_disable();
 	printk(KERN_INFO "You can switch the machine off now.\n");
-	while (1) ;
+	while (1) {
+		if (cpu_wait)
+			cpu_wait();
+	}
 }
 
 void cobalt_machine_restart(char *command)


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux