Thread (7 messages) 7 messages, 4 authors, 2012-10-01
STALE4991d

[PATCH] ARM: shmobile: kzm9g: enable restarting

From: Simon Horman <horms@verge.net.au>
Date: 2012-08-28 00:18:36
Also in: linux-arm-kernel
Subsystem: arm port, arm/risc-v/renesas architecture, the rest · Maintainers: Russell King, Geert Uytterhoeven, Magnus Damm, Linus Torvalds

From: Tetsuyuki Kobayashi <redacted>

Do soft-power-on-reset in sys_reboot system call.

How to test this patch
  Execute "sudo reboot" from command line. The system will start shutdown
  sequence and finally reboot and U-Boot restarts.

Cc: Nobuhiro Iwamatsu <redacted>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <redacted>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 arch/arm/mach-shmobile/board-kzm9g.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 53b7ea9..fd21fb6 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -763,6 +763,13 @@ static void __init kzm_init(void)
 	platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
 }
 
+static void kzm9g_restart(char mode, const char *cmd)
+{
+#define RESCNT2 0xe6188020
+	/* Do soft power on reset */
+	writel((1 << 31), RESCNT2);
+}
+
 static const char *kzm9g_boards_compat_dt[] __initdata = {
 	"renesas,kzm9g",
 	NULL,
@@ -777,5 +784,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g")
 	.init_machine	= kzm_init,
 	.init_late	= shmobile_init_late,
 	.timer		= &shmobile_timer,
+	.restart	= kzm9g_restart,
 	.dt_compat	= kzm9g_boards_compat_dt,
 MACHINE_END
-- 
1.7.10.2.484.gcd07cc5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help