From patchwork Fri Jul 20 06:16:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuyuki Kobayashi X-Patchwork-Id: 1219631 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 020093FD48 for ; Fri, 20 Jul 2012 06:17:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829Ab2GTGRX (ORCPT ); Fri, 20 Jul 2012 02:17:23 -0400 Received: from vrgw1.firstserver.ne.jp ([164.46.1.44]:58406 "EHLO vrgw1.firstserver.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750752Ab2GTGRW (ORCPT ); Fri, 20 Jul 2012 02:17:22 -0400 Received: from fvrsp21.firstserver.ne.jp (fvrsp21.firstserver.ne.jp [203.183.196.3]) by vrgw1.firstserver.ne.jp (8.13.8/8.13.8/FirstServer) with ESMTP id q6K6H4e9013513; Fri, 20 Jul 2012 15:17:04 +0900 (envelope-from koba@kmckk.co.jp) Received: from 203.137.25.97 (203.137.25.97) by fvrsp21.firstserver.ne.jp (F-Secure/virusgw_smtp/407/fvrsp21.firstserver.ne.jp); Fri, 20 Jul 2012 15:17:04 +0900 (JST) X-Virus-Status: clean(F-Secure/virusgw_smtp/407/fvrsp21.firstserver.ne.jp) Received: from localhost (58-188-103-12f2.kns1.eonet.ne.jp [58.188.103.12]) (authenticated (0 bits)) by mail.kmckk.co.jp (8.14.3/8.11.3) with ESMTP id q6K6H2bN001115; Fri, 20 Jul 2012 15:17:03 +0900 From: Tetsuyuki Kobayshi To: linux-sh@vger.kernel.org Cc: rjw@sisk.pl, Tetsuyuki Kobayashi , Nobuhiro Iwamatsu , Kuninori Morimoto , Simon Horman Subject: [PATCH] ARM: shmobile: kzm9g: enable restarting Date: Fri, 20 Jul 2012 15:16:30 +0900 Message-Id: <1342764990-30715-1-git-send-email-koba@kmckk.co.jp> X-Mailer: git-send-email 1.7.9.5 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 Cc: Simon Horman Signed-off-by: Tetsuyuki Kobayashi Acked-by: Simon Horman --- This patch is based on renesas.git next branch. 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