From patchwork Tue Aug 28 00:18:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 1378821 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 2238F3FCAE for ; Tue, 28 Aug 2012 00:18:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755102Ab2H1ASx (ORCPT ); Mon, 27 Aug 2012 20:18:53 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:47557 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755087Ab2H1ASx (ORCPT ); Mon, 27 Aug 2012 20:18:53 -0400 Received: from ayumi.akashicho.tokyo.vergenet.net (p6117-ipbfp1901kobeminato.hyogo.ocn.ne.jp [114.172.117.117]) by kirsty.vergenet.net (Postfix) with ESMTP id 988C225BFBC; Tue, 28 Aug 2012 10:18:51 +1000 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 575EDEDE093; Tue, 28 Aug 2012 09:18:47 +0900 (JST) From: Simon Horman To: Arnd Bergmann , Olof Johansson Cc: linux-sh@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, Magnus Damm , Paul Mundt , Tetsuyuki Kobayashi , Nobuhiro Iwamatsu , Kuninori Morimoto , Simon Horman Subject: [PATCH] ARM: shmobile: kzm9g: enable restarting Date: Tue, 28 Aug 2012 09:18:36 +0900 Message-Id: <1346113116-20252-2-git-send-email-horms@verge.net.au> X-Mailer: git-send-email 1.7.10.2.484.gcd07cc5 In-Reply-To: <1346113116-20252-1-git-send-email-horms@verge.net.au> References: <1346113116-20252-1-git-send-email-horms@verge.net.au> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Tetsuyuki Kobayashi 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 Cc: Kuninori Morimoto Signed-off-by: Tetsuyuki Kobayashi Signed-off-by: Simon Horman --- 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