From patchwork Mon Oct 12 06:54:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 7372501 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 D2A68BEEA4 for ; Mon, 12 Oct 2015 06:55:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 097F9206D2 for ; Mon, 12 Oct 2015 06:55:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2C6CC206D0 for ; Mon, 12 Oct 2015 06:55:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751678AbbJLGzc (ORCPT ); Mon, 12 Oct 2015 02:55:32 -0400 Received: from sauhun.de ([89.238.76.85]:45777 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751663AbbJLGzc (ORCPT ); Mon, 12 Oct 2015 02:55:32 -0400 Received: from [109.77.187.228] (port=46748 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZlX18-0003Vf-Kt; Mon, 12 Oct 2015 08:55:31 +0200 From: Wolfram Sang To: linux-sh@vger.kernel.org Cc: Magnus Damm , Simon Horman , Laurent Pinchart , Geert Uytterhoeven , Wolfram Sang , Yoshihiro Shimoda Subject: [RFC v2 4/5] ARM: shmobile: r8a7790: let rst module allow watchdog resets if desired Date: Mon, 12 Oct 2015 07:54:35 +0100 Message-Id: <1444632876-2672-5-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444632876-2672-1-git-send-email-wsa@the-dreams.de> References: <1444632876-2672-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 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c index aa3339258d9c02..39976ae23a3df2 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) { @@ -128,6 +139,10 @@ void __init rcar_gen2_timer_init(void) #endif /* CONFIG_ARM_ARCH_TIMER */ rcar_gen2_clocks_init(mode); + + /* allow watchdog timers to trigger reset */ + rcar_gen2_wdt_rst_init(); + clocksource_of_init(); }