From patchwork Sun Mar 17 15:43:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 2284091 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9C236E00E5 for ; Sun, 17 Mar 2013 15:43:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756324Ab3CQPnz (ORCPT ); Sun, 17 Mar 2013 11:43:55 -0400 Received: from mail-ee0-f52.google.com ([74.125.83.52]:42841 "EHLO mail-ee0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756283Ab3CQPny (ORCPT ); Sun, 17 Mar 2013 11:43:54 -0400 Received: by mail-ee0-f52.google.com with SMTP id b15so2216050eek.39 for ; Sun, 17 Mar 2013 08:43:53 -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=oLsqsEFnV1mikL7TqKTIEsMPDJRo3HurQG6hwjcGwhQ=; b=KKcMIdd9ef6cokQsZbkZzRk3hvh2uTZvRFVaWYsRdHUMgTmazzuOn4X3lUcJHJoybT pX0Bbaso8Eh+FObpUWUg3uFxk5LyfoAiRH9sE9W7W8dvX/CIeQXDOo0G8V96oaB6a+th fn6Kbvi4WadFe169dk8C58uftsCgKDz5DewYm7swrX4yUImoj56KwnEYBI6Vi4M8gdfz dbvLvug49NFwibAi4+9pLqwGQsAwqcGZhnu39yxmPAhl7isinEtIALhqAZ/CakPgx5n3 7DdgVVsXoK84MpbqLDJjkUU5dBlWa9HtTpIiPFzsCzpHs5eBKserA++wtDX6ly+4Pk5j RpPg== X-Received: by 10.15.67.134 with SMTP id u6mr39575495eex.6.1363535033729; Sun, 17 Mar 2013 08:43:53 -0700 (PDT) Received: from localhost.localdomain (p4FD22CAA.dip.t-dialin.net. [79.210.44.170]) by mx.google.com with ESMTPS id r4sm21999781eeo.12.2013.03.17.08.43.52 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Mar 2013 08:43:53 -0700 (PDT) From: Bastian Hecht To: linux-sh@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Paul Mundt , Mark Rutland , Sergei Shtylyov Subject: [PATCH v3 5/7] ARM: mach-shmobile: sh73a0: Setup the timer CMT10 using DT Date: Sun, 17 Mar 2013 16:43:49 +0100 Message-Id: <1363535031-21402-5-git-send-email-hechtb+renesas@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1363535031-21402-1-git-send-email-hechtb+renesas@gmail.com> References: <1363535031-21402-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 --- v3: same (only patch 0003 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 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 = {