From patchwork Sun Mar 17 15:43:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 2284111 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 D4C29E00E5 for ; Sun, 17 Mar 2013 15:43:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756355Ab3CQPn6 (ORCPT ); Sun, 17 Mar 2013 11:43:58 -0400 Received: from mail-ea0-f169.google.com ([209.85.215.169]:52776 "EHLO mail-ea0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756337Ab3CQPn6 (ORCPT ); Sun, 17 Mar 2013 11:43:58 -0400 Received: by mail-ea0-f169.google.com with SMTP id z7so2249571eaf.0 for ; Sun, 17 Mar 2013 08:43:56 -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=pWBiwXnDXq0TYe1BtNt++WEJNO3OSI2W93RoB79jkig=; b=FkREebJWmNP0K/k7Wruaaz+xRd9zkb6LeUiORtkRwneUimewrscKCl9EWK3oiyGBk3 H2ZGWH5IerDnXOSxWEwYtAjQFqrOv8zI9eZB5l+NReloHrg+OGHNywjyx33rXD4Rky4Q RjMxEueSkQqTiWLgfkoeMEDLrVaObL15kJkoVl8FnWlXjy9DkmGdADgCwXDBjby1zBfj 5uVf0pyz95QeLCYBbu1TFbbdeyT7aAZWyaXAp7QR4o02+GLa6VTQRQ1EGlSgtJ5zfASm YkIvMKjw6ewcmr2TeCxHXGziTtinxcCILlkZqVeN4ML6StDfOdH8ZGMDTQA040eE9yd0 KClg== X-Received: by 10.14.184.68 with SMTP id r44mr39331428eem.40.1363535036876; Sun, 17 Mar 2013 08:43:56 -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.55 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Mar 2013 08:43:56 -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 7/7] ARM: mach-shmobile: r8a7740: Setup the timer CMT10 using DT Date: Sun, 17 Mar 2013 16:43:51 +0100 Message-Id: <1363535031-21402-7-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 r8a7740. Signed-off-by: Bastian Hecht --- v3: same (only patch 0003 changed) 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,