All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh_mobile: Use SYSC.RESCNT2 to perform soft reboot
@ 2011-05-09  3:51 Damian Hobson-Garcia
  0 siblings, 0 replies; only message in thread
From: Damian Hobson-Garcia @ 2011-05-09  3:51 UTC (permalink / raw)
  To: linux-sh

Use the Soft Power On Reset to reset the CPU instead of cpu_reset.
This allows for the system to properly reboot from a 'shutdown' or
'reboot' command.
---
 arch/arm/mach-shmobile/include/mach/system.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
index 76a687e..6dde0b7 100644
--- a/arch/arm/mach-shmobile/include/mach/system.h
+++ b/arch/arm/mach-shmobile/include/mach/system.h
@@ -1,6 +1,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#define RESCNT2 0xE6188020
+#define PRES (1 << 31)
+
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -8,7 +11,7 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	cpu_reset(0);
+	__raw_writel(__raw_readl(RESCNT2) | PRES, RESCNT2);
 }
 
 #endif
-- 
1.7.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-09  3:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-09  3:51 [PATCH] sh_mobile: Use SYSC.RESCNT2 to perform soft reboot Damian Hobson-Garcia

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.