From patchwork Fri Mar 8 11:29:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 2236881 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 221E64006E for ; Fri, 8 Mar 2013 11:29:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753389Ab3CHL3x (ORCPT ); Fri, 8 Mar 2013 06:29:53 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:36582 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753261Ab3CHL3x (ORCPT ); Fri, 8 Mar 2013 06:29:53 -0500 Received: by mail-ee0-f45.google.com with SMTP id b57so985499eek.32 for ; Fri, 08 Mar 2013 03:29:52 -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=ReK8TDOW/JozykFBxYtdrgMWVDl/lquBity/VDnzOUw=; b=XTdb/H/r4Rwycu+02LosMdOCjstduEMCblHGk6a69h85vFuhhxjKXPvWnhACIk0fas B3saLx4vLO6vxcEbdbDXLBbrtk5COs65tR4m1itpMBaHQpkS/AHu55D0XcfKk0RK7+nw cBVw4pClLu32DhYCbU525c+aXUzfa3nUsAs8/DRNLzshD927CMaFLP74GFqMdEu6abJv reBF/tpXc9F1iHu9Pdad1QGCAmw8e+2BUfNbskD428x0rDEXULXWEdxkbLWfbKa/nrk2 5AdL2/Vg9hVBQfA40TCZDpa/haz9UPH6mdgZ2SFsOPe2IqLiW3yCar7upRt1RxrzYEMe KAQQ== X-Received: by 10.14.215.193 with SMTP id e41mr4512752eep.32.1362742192125; Fri, 08 Mar 2013 03:29:52 -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.50 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Mar 2013 03:29:51 -0800 (PST) From: Bastian Hecht To: linux-sh@vger.kernel.org Cc: Magnus Damm , Paul Mundt , linux-arm-kernel@lists.infradead.org, Mark Rutland , Sergei Shtylyov Subject: [PATCH v2 5/7] ARM: mach-shmobile: sh73a0: Setup the timer CMT10 using DT Date: Fri, 8 Mar 2013 12:29:39 +0100 Message-Id: <1362742181-19111-6-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> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org We can now use the Device Tree for bringing up our timer device CMT10 on the SoC sh73a0. Signed-off-by: Bastian Hecht --- v2: - Moved the definition from the board .dts to the SoC .dtsi - Renamed cmt@0xe6138010 to timer@e6138010 arch/arm/boot/dts/sh73a0.dtsi | 11 +++++++++++ arch/arm/mach-shmobile/setup-sh73a0.c | 32 -------------------------------- 2 files changed, 11 insertions(+), 32 deletions(-) diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi index 8a59465..6549d6c 100644 --- a/arch/arm/boot/dts/sh73a0.dtsi +++ b/arch/arm/boot/dts/sh73a0.dtsi @@ -97,4 +97,15 @@ 0 189 0x4 0 190 0x4>; }; + + timer@e6138010 { + compatible = "renesas,cmt-timer"; + interrupt-parent = <&gic>; + reg = <0xe6138010 0xc>; + interrupts = <0 65 0x4>; + renesas,device-id = <1>; + renesas,channel-id = <0>; + renesas,source-quality = <3>; + renesas,event-quality = <3>; + }; }; diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 95a75af..64bc2c5 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -247,37 +247,6 @@ static struct platform_device scif8_device = { }, }; -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 = gic_spi(65), - .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", @@ -913,7 +882,6 @@ static struct platform_device *sh73a0_devices_dt[] __initdata = { &scif6_device, &scif7_device, &scif8_device, - &cmt10_device, }; static struct platform_device *sh73a0_early_devices[] __initdata = {