From patchwork Sun Feb 1 14:47:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 5757141 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 4FAF4BF440 for ; Sun, 1 Feb 2015 14:48:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80D95201C0 for ; Sun, 1 Feb 2015 14:48:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC787202A1 for ; Sun, 1 Feb 2015 14:48:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753251AbbBAOsZ (ORCPT ); Sun, 1 Feb 2015 09:48:25 -0500 Received: from sauhun.de ([89.238.76.85]:49688 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753205AbbBAOsY (ORCPT ); Sun, 1 Feb 2015 09:48:24 -0500 Received: from p4fe2524a.dip0.t-ipconnect.de ([79.226.82.74]:40003 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YHvp1-0006Iu-Ai; Sun, 01 Feb 2015 15:48:23 +0100 From: Wolfram Sang To: linux-sh@vger.kernel.org Cc: Wolfram Sang , Magnus Damm , Simon Horman , Laurent Pinchart , Geert Uytterhoeven Subject: [RFC 4/5] ARM: shmobile: r8a7790: let rst module allow watchdog resets if desired Date: Sun, 1 Feb 2015 15:47:53 +0100 Message-Id: <1422802074-1921-5-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1422802074-1921-1-git-send-email-wsa@the-dreams.de> References: <1422802074-1921-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 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 e2b9bb46393d..0d408ac5b96a 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) { @@ -132,6 +143,9 @@ void __init rcar_gen2_timer_init(void) #ifdef CONFIG_COMMON_CLK rcar_gen2_clocks_init(mode); #endif + /* allow watchdog timers to trigger reset */ + rcar_gen2_wdt_rst_init(); + clocksource_of_init(); }