From patchwork Fri Mar 8 11:29:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 2236991 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id F190ADF215 for ; Fri, 8 Mar 2013 11:36:48 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UDvX0-0001Rj-Hy; Fri, 08 Mar 2013 11:32:11 +0000 Received: from mail-ea0-x236.google.com ([2a00:1450:4013:c01::236]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UDvUs-0000sY-Ci for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2013 11:29:59 +0000 Received: by mail-ea0-f182.google.com with SMTP id q15so131518ead.27 for ; Fri, 08 Mar 2013 03:29:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=mvgQoxAI1NnCEV5Nxyvw4U7I1IGN1mY/k3XQSBWt9+8=; b=lLQAq+v7L2j6P6A/CYCc8AnS8e1wwUgx1DOSzDvqkBu/v3smyTo5atDuatFcrq1Uin qzlojhAl0W4AHPWr8DT6xb2QLLLxbdIaF9J8w6+5FkFmXO/6891AdtmEQY922z3W0aU1 ZQxDCJRsVLYVbhia+Dl8yXbJjsmQzfVwFSZDuAbXFWGyPTNEFWkYyfdKGhv2frmFmwzC TyRhtcqbq//dP2GOYtvo00fYGXcJ5NEC7/oFsl1xQ36NwGblI939WhJoXixzO2taEELa Vut6R99Xi+KnCZCAIBHk3j29Kxdkzm+nWDNdM0oYPMAYJA25wGpvWlFzLXU2BvaRX3eP qg8g== X-Received: by 10.14.0.135 with SMTP id 7mr4611156eeb.5.1362742195428; Fri, 08 Mar 2013 03:29:55 -0800 (PST) Received: from localhost.localdomain (p4FD23A77.dip.t-dialin.net. [79.210.58.119]) by mx.google.com with ESMTPS id q42sm7197626eem.14.2013.03.08.03.29.53 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Mar 2013 03:29:55 -0800 (PST) From: Bastian Hecht To: linux-sh@vger.kernel.org Subject: [PATCH v2 7/7] ARM: mach-shmobile: r8a7740: Setup the timer CMT10 using DT Date: Fri, 8 Mar 2013 12:29:41 +0100 Message-Id: <1362742181-19111-8-git-send-email-hechtb+renesas@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1362742181-19111-1-git-send-email-hechtb+renesas@gmail.com> References: <1362742181-19111-1-git-send-email-hechtb+renesas@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130308_062958_763680_106C32D3 X-CRM114-Status: GOOD ( 14.12 ) 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 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (hechtb[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: Mark Rutland , Paul Mundt , Magnus Damm , Sergei Shtylyov , 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 We can now use the Device Tree for bringing up our timer device CMT10 on the SoC r8a7740. Signed-off-by: Bastian Hecht --- v2: new I can rebase this on topic/intc-of if wanted. arch/arm/boot/dts/r8a7740.dtsi | 11 +++++++++++ arch/arm/mach-shmobile/setup-r8a7740.c | 33 -------------------------------- 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi index 798fa35..72f4c80 100644 --- a/arch/arm/boot/dts/r8a7740.dtsi +++ b/arch/arm/boot/dts/r8a7740.dtsi @@ -18,4 +18,15 @@ compatible = "arm,cortex-a9"; }; }; + + timer@e6138010 { + compatible = "renesas,cmt-timer"; + interrupt-parent = <&intca>; + reg = <0xe6138010 0xc>; + interrupts = <0x0b00>; + renesas,device-id = <1>; + renesas,channel-id = <0>; + renesas,source-quality = <3>; + renesas,event-quality = <3>; + }; }; diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 30ac79c..9db61a6 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c @@ -255,38 +255,6 @@ static struct platform_device scifb_device = { }, }; -/* CMT */ -static struct sh_timer_config cmt10_platform_data = { - .name = "CMT10", - .channel_offset = 0x10, - .timer_bit = 0, - .clockevent_rating = 125, - .clocksource_rating = 125, -}; - -static struct resource cmt10_resources[] = { - [0] = { - .name = "CMT10", - .start = 0xe6138010, - .end = 0xe613801b, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = evt2irq(0x0b00), - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device cmt10_device = { - .name = "sh_cmt", - .id = 10, - .dev = { - .platform_data = &cmt10_platform_data, - }, - .resource = cmt10_resources, - .num_resources = ARRAY_SIZE(cmt10_resources), -}; - /* TMU */ static struct sh_timer_config tmu00_platform_data = { .name = "TMU00", @@ -388,7 +356,6 @@ static struct platform_device *r8a7740_early_devices[] __initdata = { &scif6_device, &scif7_device, &scifb_device, - &cmt10_device, &tmu00_device, &tmu01_device, &tmu02_device,