From patchwork Mon Feb 18 00:29:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 2154711 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 8B246DF283 for ; Mon, 18 Feb 2013 00:33:31 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U7EcV-0004zF-Mp; Mon, 18 Feb 2013 00:30:11 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U7Ec8-0004vp-09 for linux-arm-kernel@lists.infradead.org; Mon, 18 Feb 2013 00:29:50 +0000 Received: from ayumi.akashicho.tokyo.vergenet.net (p8120-ipbfp1001kobeminato.hyogo.ocn.ne.jp [118.10.137.120]) by kirsty.vergenet.net (Postfix) with ESMTP id E2D49266CEF; Mon, 18 Feb 2013 11:29:43 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 0152FEDE603; Mon, 18 Feb 2013 09:29:40 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org Subject: [PATCH 2/2 v3] [RFC] ARM: shmobile: r8a7779: Add TMU02 platform device Date: Mon, 18 Feb 2013 09:29:36 +0900 Message-Id: <1361147376-1228-3-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1361147376-1228-1-git-send-email-horms+renesas@verge.net.au> References: <1361147376-1228-1-git-send-email-horms+renesas@verge.net.au> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130217_192948_554301_A1164DB4 X-CRM114-Status: GOOD ( 14.60 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [202.4.237.240 listed in list.dnswl.org] -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Kuninori Morimoto , Magnus Damm , Denis Oliver Kropp , Magnus Damm , Paul Mundt , Simon Horman , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This is intended primarily to exercise the TMUO2 clock definition in clock-r8a7779.c. I would appreciate review before I queue it up or drop it. With this patch and "ARM: shmobile: r8a7779: Correct TMU clock support again" in place I see the following tmu related portions of the bootlog on the Marzen board. sh_tmu.0: used for clock events sh_tmu.0: used for periodic clock events sh_tmu.1: used as clock source Switching to clocksource sh_tmu.1 sh_tmu sh_tmu.0: kept as earlytimer sh_tmu sh_tmu.1: kept as earlytimer sh_tmu sh_tmu.2: used as clock source Cc: Denis Oliver Kropp Cc: Magnus Damm Cc: Kuninori Morimoto Cc: Paul Mundt Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-r8a7779.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 7b4c1eb..3cdb738 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c @@ -224,6 +224,36 @@ static struct platform_device tmu01_device = { .num_resources = ARRAY_SIZE(tmu01_resources), }; +static struct sh_timer_config tmu02_platform_data = { + .name = "TMU02", + .channel_offset = 0x1c, + .timer_bit = 1, + .clocksource_rating = 200, +}; + +static struct resource tmu02_resources[] = { + [0] = { + .name = "TMU02", + .start = 0xffd80020, + .end = 0xffd81003, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = gic_spi(34), + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device tmu02_device = { + .name = "sh_tmu", + .id = 2, + .dev = { + .platform_data = &tmu02_platform_data, + }, + .resource = tmu02_resources, + .num_resources = ARRAY_SIZE(tmu02_resources), +}; + /* I2C */ static struct resource rcar_i2c0_res[] = { { @@ -306,6 +336,7 @@ static struct platform_device *r8a7779_early_devices_dt[] __initdata = { &scif5_device, &tmu00_device, &tmu01_device, + &tmu02_device, }; static struct platform_device *r8a7779_early_devices[] __initdata = {