From patchwork Mon Apr 8 01:23:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2404651 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 05E5E3FC71 for ; Mon, 8 Apr 2013 01:18:46 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UP0ia-0005eZ-JU; Mon, 08 Apr 2013 01:17:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UP0iT-0005Bo-A2; Mon, 08 Apr 2013 01:17:49 +0000 Received: from mail-pd0-f175.google.com ([209.85.192.175]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UP0i9-0005A0-75 for linux-arm-kernel@lists.infradead.org; Mon, 08 Apr 2013 01:17:30 +0000 Received: by mail-pd0-f175.google.com with SMTP id g10so2717278pdj.34 for ; Sun, 07 Apr 2013 18:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:date:message-id:in-reply-to:references :subject; bh=sxqe7WXDHWgSSl0sZujcSZr6BhRuiNtr94TPZ0GIMPI=; b=x+LvKek/Vp+HyvvOe6DbYvAjlevsXkO+9dfrfylP9f3YpI2BQ7EyoEEfC22gjoiSPA YufITYyU5xsQ4l+Oe5plXea283b62EYl67P9CURolY3JnBN+c/S1fFJUicGEZHzXRtS0 jwk2TtlMRtFCVvh4bxDlasg4Q3OEAo8upL1iDI+k0khZ2Mkf9BBdAnw35pDQub31RbOZ Anf/d4qIgfP3YH24iUAvmR+ArAlSGCJ3ZAmfUZqgZxBPCG9an4Ps0BFavsj+QS+noK4E Ohk33wlNo+yFO7yTpGzp6jQwOB04/T3uB34UJkRIIRBtqBwhGQHRCr8l1zRZqq1yLDHl Xi7Q== X-Received: by 10.66.20.230 with SMTP id q6mr31636295pae.210.1365383847448; Sun, 07 Apr 2013 18:17:27 -0700 (PDT) Received: from [127.0.0.1] (FLH1All083.tky.mesh.ad.jp. [211.13.49.83]) by mx.google.com with ESMTPS id yp2sm34639054pab.10.2013.04.07.18.17.24 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Apr 2013 18:17:26 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Mon, 08 Apr 2013 10:23:28 +0900 Message-Id: <20130408012328.13555.44487.sendpatchset@w520> In-Reply-To: <20130408012318.13555.58237.sendpatchset@w520> References: <20130408012318.13555.58237.sendpatchset@w520> Subject: [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130407_211729_394171_3EAA9CA7 X-CRM114-Status: GOOD ( 10.63 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.175 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (magnus.damm[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: laurent.pinchart+renesas@ideasonboard.com, kuninori.morimoto.gx@renesas.com, arnd@arndb.de, Magnus Damm , horms@verge.net.au, olof@lixom.net, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Magnus Damm Implement a SoC-specific timer init function for r8a7790 that makes sure the architected timer is started regardless of boot loader setting. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 + arch/arm/mach-shmobile/setup-r8a7790.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) --- 0001/arch/arm/mach-shmobile/include/mach/r8a7790.h +++ work/arch/arm/mach-shmobile/include/mach/r8a7790.h 2013-04-08 10:13:38.000000000 +0900 @@ -4,5 +4,6 @@ void r8a7790_add_standard_devices(void); void r8a7790_clock_init(void); void r8a7790_pinmux_init(void); +void r8a7790_timer_init(void); #endif /* __ASM_R8A7790_H__ */ --- 0001/arch/arm/mach-shmobile/setup-r8a7790.c +++ work/arch/arm/mach-shmobile/setup-r8a7790.c 2013-04-08 10:13:38.000000000 +0900 @@ -117,6 +117,18 @@ void __init r8a7790_add_standard_devices r8a7790_register_irqc(0); } +void __init r8a7790_timer_init(void) +{ + void __iomem *cntcr; + + /* make sure arch timer is started by setting bit 0 of CNTCT */ + cntcr = ioremap(0xe6080000, PAGE_SIZE); + iowrite32(1, cntcr); + iounmap(cntcr); + + shmobile_timer_init(); +} + #ifdef CONFIG_USE_OF void __init r8a7790_add_standard_devices_dt(void) { @@ -131,7 +143,7 @@ static const char *r8a7790_boards_compat DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") .init_irq = irqchip_init, .init_machine = r8a7790_add_standard_devices_dt, - .init_time = shmobile_timer_init, + .init_time = r8a7790_timer_init, .dt_compat = r8a7790_boards_compat_dt, MACHINE_END #endif /* CONFIG_USE_OF */