From patchwork Wed Mar 6 00:22:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2222611 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 5A360DF24C for ; Wed, 6 Mar 2013 00:19:57 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UD22N-0001ec-98; Wed, 06 Mar 2013 00:16:51 +0000 Received: from mail-pb0-f45.google.com ([209.85.160.45]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UD22I-0001dd-Rk for linux-arm-kernel@lists.infradead.org; Wed, 06 Mar 2013 00:16:47 +0000 Received: by mail-pb0-f45.google.com with SMTP id ro8so5187495pbb.32 for ; Tue, 05 Mar 2013 16:16:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:date:message-id:in-reply-to:references :subject; bh=rUiZz8n07KGY9Ehonf66CR8nHsRVvyISeBaRKFSYn6E=; b=Q+U0qTx/n9+ur1VJz9ImqLXo2Vv4bDOhOt1RoEfQ7EhGjIpWOEVSnno6uYuaeByu31 Rj3AZXu2HeAyhgNPWd1hoNsLoc63xhwabTNV3uw/Sy79Xn/IvUon3uXFP7opTnUiIYd+ Wn4sPSnxTBm4iniUka3SuGxDhML08g2UMuFLV5OJFdvipS9iKC53vOX4QbTg+EPawT5Y fLrZVIxP23JD3W+TgC+4Pp3tibGB0Eb7pdtrAmkJCxdHN5SIZsTsBHEvwh4eCiZm82y3 GwsGAp1aZ4YqRQc7ZshlhKqkP17XE7JTL3Dcbr+bcihN0yjh1HinQRgnJUbehKw7t5Iq JSvA== X-Received: by 10.68.234.100 with SMTP id ud4mr40680369pbc.8.1362529005296; Tue, 05 Mar 2013 16:16:45 -0800 (PST) Received: from [127.0.0.1] (FL1-122-135-132-124.tky.mesh.ad.jp. [122.135.132.124]) by mx.google.com with ESMTPS id gf6sm28740676pbc.24.2013.03.05.16.16.42 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Mar 2013 16:16:44 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 06 Mar 2013 09:22:33 +0900 Message-Id: <20130306002233.5430.86.sendpatchset@w520> In-Reply-To: <20130306002214.5430.43766.sendpatchset@w520> References: <20130306002214.5430.43766.sendpatchset@w520> Subject: [PATCH 02/04] ARM: shmobile: Add EMEV2 specific timer_init X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130305_191646_960445_9F26F8B0 X-CRM114-Status: GOOD ( 11.88 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.45 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (magnus.damm[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 From: Magnus Damm Add a emev2_timer_init() function to the EMEV2 setup code. This is preparation work for EMEV2 TWD support. To allow registration of the TWD driver from the ->timer_init() callback the init code for EMEV2 clocks is from ->init_machine() to ->init_time(). This affects EMEV2 clock init order on the KZM9D board but leaves the generic EMEV2 DT case as-is due to no setup code for clocks in the DT case. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/board-kzm9d.c | 2 +- arch/arm/mach-shmobile/include/mach/emev2.h | 1 + arch/arm/mach-shmobile/setup-emev2.c | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) --- 0001/arch/arm/mach-shmobile/board-kzm9d.c +++ work/arch/arm/mach-shmobile/board-kzm9d.c 2013-03-05 18:31:45.000000000 +0900 @@ -90,6 +90,6 @@ DT_MACHINE_START(KZM9D_DT, "kzm9d") .init_irq = emev2_init_irq, .init_machine = kzm9d_add_standard_devices, .init_late = shmobile_init_late, - .init_time = shmobile_timer_init, + .init_time = emev2_timer_init, .dt_compat = kzm9d_boards_compat_dt, MACHINE_END --- 0001/arch/arm/mach-shmobile/include/mach/emev2.h +++ work/arch/arm/mach-shmobile/include/mach/emev2.h 2013-03-05 18:31:45.000000000 +0900 @@ -5,6 +5,7 @@ extern void emev2_map_io(void); extern void emev2_init_irq(void); extern void emev2_add_early_devices(void); extern void emev2_add_standard_devices(void); +extern void emev2_timer_init(void); extern void emev2_clock_init(void); extern void emev2_set_boot_vector(unsigned long value); --- 0004/arch/arm/mach-shmobile/setup-emev2.c +++ work/arch/arm/mach-shmobile/setup-emev2.c 2013-03-05 18:34:09.000000000 +0900 @@ -395,8 +395,6 @@ static struct platform_device *emev2_lat void __init emev2_add_standard_devices(void) { - emev2_clock_init(); - platform_add_devices(emev2_early_devices, ARRAY_SIZE(emev2_early_devices)); @@ -404,6 +402,12 @@ void __init emev2_add_standard_devices(v ARRAY_SIZE(emev2_late_devices)); } +void __init emev2_timer_init(void) +{ + emev2_clock_init(); + shmobile_timer_init(); +} + static void __init emev2_init_delay(void) { shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */