From patchwork Thu Apr 11 11:24:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 2427341 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 19EAF3FD40 for ; Thu, 11 Apr 2013 11:24:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752808Ab3DKLYP (ORCPT ); Thu, 11 Apr 2013 07:24:15 -0400 Received: from mail-bk0-f53.google.com ([209.85.214.53]:50589 "EHLO mail-bk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752436Ab3DKLYP (ORCPT ); Thu, 11 Apr 2013 07:24:15 -0400 Received: by mail-bk0-f53.google.com with SMTP id e19so768950bku.12 for ; Thu, 11 Apr 2013 04:24:14 -0700 (PDT) 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=WdQW1oLohusnb67s0m8wupkahVH1RNqldWmP5oUYgYI=; b=XYiP1twfw7XI6z/PVYl1vapbGyf0ppxuqXJWXTHosEca9zm9vA/TBoFHbd6+KdLSH7 7/1yDvfYGLQ9jas3e020fxyw8wjjqBXIrkXPmxAycCX4xt7f4TdmyD6JhiM4PZO8njBp AKL78FC1cpmTC3qEmutBfwGZc8Wo/jwRsmpPzpwFBRTH0Ng3FU+PAR0eBIDkcqPsg1oW f29NNw38n27Xo6CHJHdXO6GJSA/2QBOT+3FhzzzAAUDR8IAaLrl08f446AdxzRaEXg77 lTK7wOzLi2grS+gWPgh20Y+v+ao8qFSNTQWGbMiuB94b5Mek8ZzRLrtK+NPpSc5s6MUm fOqQ== X-Received: by 10.204.231.73 with SMTP id jp9mr2276160bkb.116.1365679454067; Thu, 11 Apr 2013 04:24:14 -0700 (PDT) Received: from localhost.localdomain (g229146212.adsl.alicedsl.de. [92.229.146.212]) by mx.google.com with ESMTPS id uo3sm1665914bkb.11.2013.04.11.04.24.12 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 04:24:13 -0700 (PDT) From: Bastian Hecht To: linux-sh@vger.kernel.org Cc: Magnus Damm , Simon Horman , Paul Mundt , Mark Rutland , Sergei Shtylyov , linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 5/7] ARM: mach-shmobile: sh73a0: Setup the timer CMT10 using DT Date: Thu, 11 Apr 2013 13:24:01 +0200 Message-Id: <1365679443-25456-5-git-send-email-hechtb+renesas@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365679443-25456-1-git-send-email-hechtb+renesas@gmail.com> References: <1365679443-25456-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 --- v4: same. only patch 2 and 3 changed 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 ec40bf7..67b5089 100644 --- a/arch/arm/boot/dts/sh73a0.dtsi +++ b/arch/arm/boot/dts/sh73a0.dtsi @@ -222,4 +222,15 @@ cap-sd-highspeed; status = "disabled"; }; + + 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 d10ded0..024b7a6 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -235,37 +235,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", @@ -930,7 +899,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 = {