From patchwork Tue Jan 29 14:46:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 2073261 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 23BD13FD1A for ; Thu, 31 Jan 2013 12:30:54 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U0tCa-0002An-HJ; Thu, 31 Jan 2013 12:25:12 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U0CSC-0008DK-Rp for linux-arm-kernel@lists.infradead.org; Tue, 29 Jan 2013 14:46:30 +0000 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1U0CSB-0000xp-00; Tue, 29 Jan 2013 15:46:27 +0100 Received: from wsa by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1U0CSA-0003jh-Jx; Tue, 29 Jan 2013 15:46:26 +0100 From: Wolfram Sang To: linux-arm-kernel@lists.infradead.org Subject: [RFC 3/3] arm: mach-mxs: make enabling enet_out a legacy function Date: Tue, 29 Jan 2013 15:46:13 +0100 Message-Id: <1359470773-14290-4-git-send-email-w.sang@pengutronix.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359470773-14290-1-git-send-email-w.sang@pengutronix.de> References: <1359470773-14290-1-git-send-email-w.sang@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: w.sang@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130129_094629_358070_E718D2AC X-CRM114-Status: GOOD ( 13.41 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -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] X-Mailman-Approved-At: Thu, 31 Jan 2013 07:10:07 -0500 Cc: netdev@vger.kernel.org, Wolfram Sang , Shawn Guo 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 enet_out is now handled via the driver, so handling it in board init will print a warning. Signed-off-by: Wolfram Sang --- arch/arm/mach-mxs/mach-mxs.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index c66129b..1f2e3bf 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -252,17 +252,25 @@ static void __init imx23_evk_init(void) mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT; } -static inline void enable_clk_enet_out(void) +static inline void legacy_enable_clk_enet_out(void) { - struct clk *clk = clk_get_sys("enet_out", NULL); + struct device_node *np; + struct clk *clk; + + for_each_compatible_node(np, NULL, "fsl,imx28-fec") + if (of_property_match_string(np, "clock-names", "enet_out") >= 0) + return; + + WARN(1, "Please specify enet_out-clk in devicetree.\n"); + clk = clk_get_sys("enet_out", NULL); if (!IS_ERR(clk)) clk_prepare_enable(clk); } static void __init imx28_evk_init(void) { - enable_clk_enet_out(); + legacy_enable_clk_enet_out(); update_fec_mac_prop(OUI_FSL); mxsfb_pdata.mode_list = mx28evk_video_modes; @@ -292,7 +300,7 @@ static void __init m28evk_init(void) static void __init sc_sps1_init(void) { - enable_clk_enet_out(); + legacy_enable_clk_enet_out(); } static int apx4devkit_phy_fixup(struct phy_device *phy) @@ -303,7 +311,7 @@ static int apx4devkit_phy_fixup(struct phy_device *phy) static void __init apx4devkit_init(void) { - enable_clk_enet_out(); + legacy_enable_clk_enet_out(); if (IS_BUILTIN(CONFIG_PHYLIB)) phy_register_fixup_for_uid(PHY_ID_KSZ8051, MICREL_PHY_ID_MASK, @@ -351,7 +359,7 @@ static void __init tx28_post_init(void) struct pinctrl *pctl; int ret; - enable_clk_enet_out(); + legacy_enable_clk_enet_out(); np = of_find_compatible_node(NULL, NULL, "fsl,imx28-fec"); pdev = of_find_device_by_node(np); @@ -391,13 +399,13 @@ static void __init tx28_post_init(void) static void __init cfa10049_init(void) { - enable_clk_enet_out(); + legacy_enable_clk_enet_out(); update_fec_mac_prop(OUI_CRYSTALFONTZ); } static void __init apf28_init(void) { - enable_clk_enet_out(); + legacy_enable_clk_enet_out(); mxsfb_pdata.mode_list = apf28dev_video_modes; mxsfb_pdata.mode_count = ARRAY_SIZE(apf28dev_video_modes);