From patchwork Tue Apr 5 01:22:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685821 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p351MZZ7007090 for ; Tue, 5 Apr 2011 01:22:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751373Ab1DEBWe (ORCPT ); Mon, 4 Apr 2011 21:22:34 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:62980 "EHLO relmlor3.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260Ab1DEBWe (ORCPT ); Mon, 4 Apr 2011 21:22:34 -0400 Received: from relmlir1.idc.renesas.com ([10.200.68.151]) by relmlor3.idc.renesas.com ( SJSMS) with ESMTP id <0LJ5005VJNTLLU10@relmlor3.idc.renesas.com> for linux-sh@vger.kernel.org; Tue, 05 Apr 2011 10:22:33 +0900 (JST) Received: from relmlac1.idc.renesas.com ([10.200.69.21]) by relmlir1.idc.renesas.com (SJSMS) with ESMTP id <0LJ500L1QNTL7I10@relmlir1.idc.renesas.com> for linux-sh@vger.kernel.org; Tue, 05 Apr 2011 10:22:33 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 5E0FD80088; Tue, 05 Apr 2011 10:22:33 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 560FE800BE; Tue, 05 Apr 2011 10:22:33 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id LAD22268; Tue, 05 Apr 2011 10:22:33 +0900 Date: Tue, 05 Apr 2011 10:22:33 +0900 X-IronPort-AV: E=Sophos; i="4.63,300,1299423600"; d="scan'208"; a="19941096" Received: from unknown (HELO PG10870.renesas.com) ([172.30.8.159]) by relmlii2.idc.renesas.com with ESMTP; Tue, 05 Apr 2011 10:22:33 +0900 Message-id: From: Kuninori Morimoto To: Paul Mundt Cc: Magnus , Linux-SH Subject: [PATCH/RFC] ARM: arch-shmobile: only run FSI init on respective boards User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-2022-JP-2?B?U2Fuag==?= =?ISO-2022-JP-2?B?GyQoRCtXGyhC?=) APEL/10.6 Emacs/23.2 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO) MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 05 Apr 2011 01:22:42 +0000 (UTC) If several boards are enabled in the kernel configuration, fsi_init_pm_clock() functions from board-ap4evb.c will run on any of them. Prevent this by calling these functions from the .init_machine() callback instead of using device_initcall(). Signed-off-by: Kuninori Morimoto Cc: Magnus Damm --- This patch is depend on Guennadi's [PATCH/RFC] ARM: arch-shmobile: only run HDMI init on respective boards arch/arm/mach-shmobile/board-ap4evb.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 53c15e1..1e35fa9 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -996,7 +996,7 @@ out: clk_put(hdmi_ick); } -static int __init fsi_init_pm_clock(void) +static void __init fsi_init_pm_clock(void) { struct clk *fsia_ick; int ret; @@ -1005,7 +1005,7 @@ static int __init fsi_init_pm_clock(void) if (IS_ERR(fsia_ick)) { ret = PTR_ERR(fsia_ick); pr_err("Cannot get FSI ICK: %d\n", ret); - return ret; + return; } ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk); @@ -1013,10 +1013,7 @@ static int __init fsi_init_pm_clock(void) pr_err("Cannot set FSI-A parent: %d\n", ret); clk_put(fsia_ick); - - return ret; } -device_initcall(fsi_init_pm_clock); /* * FIXME !! @@ -1345,6 +1342,7 @@ static void __init ap4evb_init(void) platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); hdmi_init_pm_clock(); + fsi_init_pm_clock(); } static void __init ap4evb_timer_init(void)