From patchwork Thu Sep 12 00:42: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: 2875261 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A770B9F485 for ; Thu, 12 Sep 2013 00:42:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 821BE20176 for ; Thu, 12 Sep 2013 00:42:39 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86F3E2015B for ; Thu, 12 Sep 2013 00:42:38 +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 1VJuzS-00017Z-Hl; Thu, 12 Sep 2013 00:42:34 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJuzQ-0007L9-9a; Thu, 12 Sep 2013 00:42:32 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJuzN-0007KU-D8 for linux-arm-kernel@lists.infradead.org; Thu, 12 Sep 2013 00:42:30 +0000 Received: by mail-pa0-f53.google.com with SMTP id lb1so339500pab.26 for ; Wed, 11 Sep 2013 17:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=louznIF8IVIwrXpVFHUTbdjFDJE22Wtyn/Bm4NmxMwc=; b=1AeJ50bW0A4OyBeNnVhycThUUOIIvIy5TUNJnOKD/UHPbOfUJp7n7jVry0MgFFOfpJ i3hP85bkX/U+Ad1W5FWvJ20DpfKEtGFfBCaTUSb0BE3w85bVxbgOwEC+0ltj0Hfq+89q euZahClxkJGKId1OnR5jdVuB/wGIkeyZ1kFFlvjZdffWPPK1PyrgAZBWnO1WEUILk1O1 2VwNBR2LUJIt+dlazNpg034+VlKWRnjQPMxkneehY9fPyxEyRkTkLTXntaxPPrwJeZB7 neT2cBKXSHtinRqgjRHIG5cA9of/nmuOkGFL1aBr99te0xphk/IQQBiMxO1dw/D/hi0e ZDRA== X-Received: by 10.66.219.233 with SMTP id pr9mr6539538pac.45.1378946527950; Wed, 11 Sep 2013 17:42:07 -0700 (PDT) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id qp10sm6553411pab.13.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Sep 2013 17:42:06 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Thu, 12 Sep 2013 09:42:28 +0900 Message-Id: <20130912004228.24348.15536.sendpatchset@w520> Subject: [PATCH] ARM: shmobile: r8a7791 Architected timer support X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130911_204229_531060_623842D8 X-CRM114-Status: UNSURE ( 9.41 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: ryo.kataoka.wt@renesas.com, kuninori.morimoto.gx@renesas.com, arnd@arndb.de, Magnus Damm , hisashi.nakamura.ak@renesas.com, horms@verge.net.au, yoshikazu.fujikawa.ue@renesas.com, 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 X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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: Magnus Damm Enable the ARM architected timer included in the CA15 cluster. Also make use of the shared R-Car Gen2 code that initializes the arch timer frequency based on the MD pins. Signed-off-by: Magnus Damm --- Written against renesas-devel-20130906 and [PATCH] ARM: shmobile: Break out R-Car Gen2 setup code arch/arm/boot/dts/r8a7791.dtsi | 8 ++++++++ arch/arm/mach-shmobile/Makefile | 2 +- arch/arm/mach-shmobile/board-koelsch.c | 1 + arch/arm/mach-shmobile/include/mach/r8a7791.h | 2 ++ arch/arm/mach-shmobile/setup-r8a7791.c | 1 + 5 files changed, 13 insertions(+), 1 deletion(-) --- 0003/arch/arm/boot/dts/r8a7791.dtsi +++ work/arch/arm/boot/dts/r8a7791.dtsi 2013-09-12 09:12:16.000000000 +0900 @@ -39,6 +39,14 @@ interrupts = <1 9 0xf04>; }; + timer { + compatible = "arm,armv7-timer"; + interrupts = <1 13 0xf08>, + <1 14 0xf08>, + <1 11 0xf08>, + <1 10 0xf08>; + }; + irqc0: interrupt-controller@e61c0000 { compatible = "renesas,irqc"; #interrupt-cells = <2>; --- 0002/arch/arm/mach-shmobile/Makefile +++ work/arch/arm/mach-shmobile/Makefile 2013-09-12 09:10:42.000000000 +0900 @@ -15,7 +15,7 @@ obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7 obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o setup-rcar-gen2.o -obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o +obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o setup-rcar-gen2.o obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o # Clock objects --- 0003/arch/arm/mach-shmobile/board-koelsch.c +++ work/arch/arm/mach-shmobile/board-koelsch.c 2013-09-12 09:10:05.000000000 +0900 @@ -39,6 +39,7 @@ static const char * const koelsch_boards DT_MACHINE_START(KOELSCH_DT, "koelsch") .init_early = r8a7791_init_early, + .init_time = rcar_gen2_timer_init, .init_machine = koelsch_add_standard_devices, .dt_compat = koelsch_boards_compat_dt, MACHINE_END --- 0003/arch/arm/mach-shmobile/include/mach/r8a7791.h +++ work/arch/arm/mach-shmobile/include/mach/r8a7791.h 2013-09-12 09:09:22.000000000 +0900 @@ -1,6 +1,8 @@ #ifndef __ASM_R8A7791_H__ #define __ASM_R8A7791_H__ +#include + void r8a7791_add_standard_devices(void); void r8a7791_add_dt_devices(void); void r8a7791_clock_init(void); --- 0003/arch/arm/mach-shmobile/setup-r8a7791.c +++ work/arch/arm/mach-shmobile/setup-r8a7791.c 2013-09-12 09:10:20.000000000 +0900 @@ -176,6 +176,7 @@ static const char *r8a7791_boards_compat DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)") .init_early = r8a7791_init_early, + .init_time = rcar_gen2_timer_init, .dt_compat = r8a7791_boards_compat_dt, MACHINE_END #endif /* CONFIG_USE_OF */