From patchwork Mon May 9 03:51:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damian Hobson-Garcia X-Patchwork-Id: 768282 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p494PEMj001252 for ; Mon, 9 May 2011 04:25:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751250Ab1EIEZN (ORCPT ); Mon, 9 May 2011 00:25:13 -0400 Received: from mailhost.igel.co.jp ([219.106.231.130]:34474 "EHLO mailhost.igel.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750704Ab1EIEZN (ORCPT ); Mon, 9 May 2011 00:25:13 -0400 Received: from v400.hq.igel.co.jp (unknown [10.16.150.2]) by mailhost.igel.co.jp (Postfix) with ESMTP id 98DB89603B7; Mon, 9 May 2011 12:31:39 +0900 (JST) From: Damian Hobson-Garcia To: magnus.damm@gmail.com, lethal@linux-sh.org Cc: linux-sh@vger.kernel.org, taki@igel.co.jp, matsu@igel.co.jp, Damian Hobson-Garcia Subject: [PATCH] sh_mobile: Use SYSC.RESCNT2 to perform soft reboot Date: Mon, 9 May 2011 12:51:29 +0900 Message-Id: <1304913089-10173-1-git-send-email-dhobsong@igel.co.jp> X-Mailer: git-send-email 1.7.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 09 May 2011 04:25:14 +0000 (UTC) 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