blob: 1b730cfad80a2c5a15a9e4664309d8cfc71a7b67 [file] [log] [blame]
From koba@kmckk.co.jp Mon Nov 19 00:51:36 2012
From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Date: Mon, 19 Nov 2012 17:51:03 +0900
Subject: [PATCH 1/5] ARM: shmobile: kzm9g: enable restarting
To: gregkh@linuxfoundation.org
Cc: ltsi-dev@lists.linuxfoundation.org, Tetsuyuki Kobayashi <koba@kmckk.co.jp>, Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>, Simon Horman <horms@verge.net.au>
Message-ID: <1353315067-7771-2-git-send-email-koba@kmckk.co.jp>
This is back port to LTSI 3.4.
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.
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
(cherry picked from commit 7952717adb69efc1d2443a1858f96d23c2fb93e0)
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
---
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 212c524..9b69a95 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -731,6 +731,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,
@@ -744,5 +751,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g")
.handle_irq = gic_handle_irq,
.init_machine = kzm_init,
.timer = &shmobile_timer,
+ .restart = kzm9g_restart,
.dt_compat = kzm9g_boards_compat_dt,
MACHINE_END
--
1.7.9.5