All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][MIPS][1/2] vr41xx: add default restart routine
@ 2007-08-16 13:20 Yoichi Yuasa
  2007-08-16 13:27 ` [PATCH][MIPS][2/2] vr41xx: replace infinite loop with hibernate Yoichi Yuasa
  2007-08-22 22:31 ` [PATCH][MIPS][1/2] vr41xx: add default restart routine Ralf Baechle
  0 siblings, 2 replies; 4+ messages in thread
From: Yoichi Yuasa @ 2007-08-16 13:20 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips

Add vr41xx default restart routine.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/vr41xx/common/pmu.c mips/arch/mips/vr41xx/common/pmu.c
--- mips-orig/arch/mips/vr41xx/common/pmu.c	2007-08-06 13:07:41.877342750 +0900
+++ mips/arch/mips/vr41xx/common/pmu.c	2007-08-06 13:16:26.430125250 +0900
@@ -25,6 +25,7 @@
 #include <linux/sched.h>
 #include <linux/types.h>
 
+#include <asm/cacheflush.h>
 #include <asm/cpu.h>
 #include <asm/io.h>
 #include <asm/processor.h>
@@ -70,6 +71,11 @@ static inline void software_reset(void)
 		pmu_write(PMUCNT2REG, pmucnt2);
 		break;
 	default:
+		set_c0_status(ST0_BEV | ST0_ERL);
+		change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
+		flush_cache_all();
+		write_c0_wired(0);
+		__asm__("jr     %0"::"r"(0xbfc00000));
 		break;
 	}
 }
@@ -78,7 +84,6 @@ static void vr41xx_restart(char *command
 {
 	local_irq_disable();
 	software_reset();
-	printk(KERN_NOTICE "\nYou can reset your system\n");
 	while (1) ;
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH][MIPS][2/2] vr41xx: replace infinite loop with hibernate
  2007-08-16 13:20 [PATCH][MIPS][1/2] vr41xx: add default restart routine Yoichi Yuasa
@ 2007-08-16 13:27 ` Yoichi Yuasa
  2007-08-22 22:31   ` Ralf Baechle
  2007-08-22 22:31 ` [PATCH][MIPS][1/2] vr41xx: add default restart routine Ralf Baechle
  1 sibling, 1 reply; 4+ messages in thread
From: Yoichi Yuasa @ 2007-08-16 13:27 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips

Replace infinite loop with hibernate.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/vr41xx/common/pmu.c mips/arch/mips/vr41xx/common/pmu.c
--- mips-orig/arch/mips/vr41xx/common/pmu.c	2007-08-06 13:21:36.621511000 +0900
+++ mips/arch/mips/vr41xx/common/pmu.c	2007-08-06 13:22:17.712079000 +0900
@@ -91,14 +91,7 @@ static void vr41xx_halt(void)
 {
 	local_irq_disable();
 	printk(KERN_NOTICE "\nYou can turn off the power supply\n");
-	while (1) ;
-}
-
-static void vr41xx_power_off(void)
-{
-	local_irq_disable();
-	printk(KERN_NOTICE "\nYou can turn off the power supply\n");
-	while (1) ;
+	__asm__("hibernate;\n");
 }
 
 static int __init vr41xx_pmu_init(void)
@@ -134,7 +127,7 @@ static int __init vr41xx_pmu_init(void)
 	cpu_wait = vr41xx_cpu_wait;
 	_machine_restart = vr41xx_restart;
 	_machine_halt = vr41xx_halt;
-	pm_power_off = vr41xx_power_off;
+	pm_power_off = vr41xx_halt;
 
 	return 0;
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][MIPS][1/2] vr41xx: add default restart routine
  2007-08-16 13:20 [PATCH][MIPS][1/2] vr41xx: add default restart routine Yoichi Yuasa
  2007-08-16 13:27 ` [PATCH][MIPS][2/2] vr41xx: replace infinite loop with hibernate Yoichi Yuasa
@ 2007-08-22 22:31 ` Ralf Baechle
  1 sibling, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2007-08-22 22:31 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: linux-mips

On Thu, Aug 16, 2007 at 10:20:11PM +0900, Yoichi Yuasa wrote:

Thanks, queued up for 2.6.24.

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][MIPS][2/2] vr41xx: replace infinite loop with hibernate
  2007-08-16 13:27 ` [PATCH][MIPS][2/2] vr41xx: replace infinite loop with hibernate Yoichi Yuasa
@ 2007-08-22 22:31   ` Ralf Baechle
  0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2007-08-22 22:31 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: linux-mips

On Thu, Aug 16, 2007 at 10:27:05PM +0900, Yoichi Yuasa wrote:

> Replace infinite loop with hibernate.

Thanks, queued up for 2.6.24.

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-23 12:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-16 13:20 [PATCH][MIPS][1/2] vr41xx: add default restart routine Yoichi Yuasa
2007-08-16 13:27 ` [PATCH][MIPS][2/2] vr41xx: replace infinite loop with hibernate Yoichi Yuasa
2007-08-22 22:31   ` Ralf Baechle
2007-08-22 22:31 ` [PATCH][MIPS][1/2] vr41xx: add default restart routine Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.