From patchwork Sun Nov 1 19:19:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 7532581 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 90CABBEEA4 for ; Sun, 1 Nov 2015 19:20:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B56F2205B9 for ; Sun, 1 Nov 2015 19:20:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C95E32055B for ; Sun, 1 Nov 2015 19:19:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751861AbbKATT7 (ORCPT ); Sun, 1 Nov 2015 14:19:59 -0500 Received: from sauhun.de ([89.238.76.85]:48173 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752583AbbKATT7 (ORCPT ); Sun, 1 Nov 2015 14:19:59 -0500 Received: from p4fe2433c.dip0.t-ipconnect.de ([79.226.67.60]:37748 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZsyAX-0002bw-Ks; Sun, 01 Nov 2015 20:19:57 +0100 From: Wolfram Sang To: linux-sh@vger.kernel.org Cc: Magnus Damm , Simon Horman , Laurent Pinchart , Geert Uytterhoeven , Wolfram Sang , Yoshihiro Shimoda Subject: [RFC v3 4/5] ARM: shmobile: r8a7790: let rst module allow watchdog resets if desired Date: Sun, 1 Nov 2015 20:19:38 +0100 Message-Id: <1446405579-5367-5-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1446405579-5367-1-git-send-email-wsa@the-dreams.de> References: <1446405579-5367-1-git-send-email-wsa@the-dreams.de> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wolfram Sang Just for testing, not for upstream! Signed-off-by: Wolfram Sang --- arch/arm/mach-shmobile/setup-rcar-gen2.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c index 9eccde3c7b1371..cb55b627cd8a0c 100644 --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c @@ -28,7 +28,18 @@ #include "common.h" #include "rcar-gen2.h" -#define MODEMR 0xe6160060 +#define WDTRSTCR 0xe6160054 +#define MODEMR 0xe6160060 + +void __init rcar_gen2_wdt_rst_init(void) +{ +#if defined(CONFIG_WATCHDOG) + void __iomem *p = ioremap_nocache(WDTRSTCR, 4); + BUG_ON(!p); + iowrite32(0xa55a0000, p); + iounmap(p); +#endif +} u32 rcar_gen2_read_mode_pins(void) { @@ -129,6 +140,9 @@ void __init rcar_gen2_timer_init(void) rcar_gen2_clocks_init(mode); clocksource_probe(); + + /* allow watchdog timers to trigger reset */ + rcar_gen2_wdt_rst_init(); } struct memory_reserve_config {