From patchwork Wed Nov 6 10:43:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3146311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F3E079F3C4 for ; Wed, 6 Nov 2013 10:43:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CFC1A2049B for ; Wed, 6 Nov 2013 10:43:28 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B821201CB for ; Wed, 6 Nov 2013 10:43:27 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve0a3-0003aN-PV; Wed, 06 Nov 2013 10:43:23 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve0a1-0003Hp-Bs; Wed, 06 Nov 2013 10:43:21 +0000 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve0Zw-0003GN-RV for linux-arm-kernel@lists.infradead.org; Wed, 06 Nov 2013 10:43:17 +0000 Received: by mail-pa0-f49.google.com with SMTP id lj1so10227814pab.8 for ; Wed, 06 Nov 2013 02:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=CWT9Rgy1JLjWpoShBpz8G8YrScS522K8899pevclsSs=; b=I8u64v4Fs7sUWLnnsPWfbKsp0AKKdsvVBh2CSzc3GGRRWy0K7RIp1FlwSeL8Ab/DN8 NwXXoJn/YJqFf78xMmYn7LPHXawbdnH/QyR+De8AlzY34Nt9c5pVT5zR5G6rGJtZyXOK owrys812TZr10A4K+7NTKJZxiD7VrljmyckB0UwK9KdtWaENk7DGEu4EgB0lCKBcbPdp yBFhvB0gZURKim/DPiNmH1kA7PpwEVa6/beJxuEDsBLT0+gqsnpCxx++DVI2YxqdU9uB kT9Oa3WD0wpEfxExTb96hoMVQQWueFpvYAGTPKwAQe6ji/lKf06knUdFmzLXso+yn+pQ xS2g== X-Received: by 10.66.175.133 with SMTP id ca5mr3365310pac.40.1383734575139; Wed, 06 Nov 2013 02:42:55 -0800 (PST) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id ja5sm40525335pbc.14.2013.11.06.02.42.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Nov 2013 02:42:54 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 06 Nov 2013 19:43:32 +0900 Message-Id: <20131106104332.6327.73303.sendpatchset@w520> Subject: [PATCH] ARM: shmobile: Enable MTU2 on r7s72100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131106_054317_019305_089AE1D4 X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: horms@verge.net.au, Magnus Damm , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Add MTU2 as r7s72100 system timer. Signed-off-by: Magnus Damm --- Built on top of "renesas-devel-v3.12-rc7-20131101" arch/arm/mach-shmobile/clock-r7s72100.c | 1 + arch/arm/mach-shmobile/setup-r7s72100.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) --- 0001/arch/arm/mach-shmobile/clock-r7s72100.c +++ work/arch/arm/mach-shmobile/clock-r7s72100.c 2013-11-05 21:07:13.000000000 +0900 @@ -178,6 +178,7 @@ static struct clk_lookup lookups[] = { CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]), CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]), CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]), + CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]), }; void __init r7s72100_clock_init(void) --- 0001/arch/arm/mach-shmobile/setup-r7s72100.c +++ work/arch/arm/mach-shmobile/setup-r7s72100.c 2013-11-05 21:07:13.000000000 +0900 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -58,6 +59,26 @@ static inline void r7s72100_register_sci sizeof(struct plat_sci_port)); } + +static struct sh_timer_config mtu2_0_platform_data __initdata = { + .name = "MTU2_0", + .timer_bit = 0, + .channel_offset = -0x80, + .clockevent_rating = 200, +}; + +static struct resource mtu2_0_resources[] __initdata = { + DEFINE_RES_MEM(0xfcff0300, 0x27), + DEFINE_RES_IRQ(gic_iid(139)), /* MTU2 TGI0A */ +}; + +#define r7s72100_register_mtu2(idx) \ + platform_device_register_resndata(&platform_bus, "sh_mtu2", \ + idx, mtu2_##idx##_resources, \ + ARRAY_SIZE(mtu2_##idx##_resources), \ + &mtu2_##idx##_platform_data, \ + sizeof(struct sh_timer_config)) + void __init r7s72100_add_dt_devices(void) { r7s72100_register_scif(SCIF0); @@ -68,6 +89,7 @@ void __init r7s72100_add_dt_devices(void r7s72100_register_scif(SCIF5); r7s72100_register_scif(SCIF6); r7s72100_register_scif(SCIF7); + r7s72100_register_mtu2(0); } void __init r7s72100_init_early(void)