From patchwork Wed Aug 22 15:13:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1362111 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 BD2CFDF280 for ; Wed, 22 Aug 2012 15:17:18 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4CdM-0008Hn-CI; Wed, 22 Aug 2012 15:14:16 +0000 Received: from moutng.kundenserver.de ([212.227.126.187]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4Cci-0008D0-74 for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2012 15:13:37 +0000 Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0Mddka-1TIQ781sdQ-00PN6i; Wed, 22 Aug 2012 17:13:34 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/6] ARM: imx: fix ksz9021rn_phy_fixup Date: Wed, 22 Aug 2012 17:13:08 +0200 Message-Id: <1345648390-4234-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1345648390-4234-1-git-send-email-arnd@arndb.de> References: <1345648390-4234-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:yeNTznFeg/AxPskmSMXnwocGpizSDBQzyf9vH6z4twR /HW/KT1MrZSlq2tDVlcj+3V33iaX4bNkujaY+7cPVnOagPdTWd mvAN3KudztF5LL37YPVjhTHzdl1LyXfAFxpywo265sXESFNuCT YDOVdHbbw32/QjavawUNGVmFgLKjvWD8KsGMWdb02u8xAgw38E bo+OKY/Zqzw4QHmcD3vwHng72wvGOBOgTcciJa1lNc5NOKk6cH 9/jxx7qKeRbOFL740c7RxZwD0yrwGv0gfhirfY8Cs9jHKx35Vt gh3hxaNl3YML5y9H1EgxXRFl3Br3MjdqDF4wWf9ZWvBnG5mIJt JlKPbU+eBsjAai1hm3ByiUEPUcgs9don5KudiEySwzHZan+QPE UQZd1kKyVRdzA== X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.187 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Arnd Bergmann , Artem Bityutskiy , Sascha Hauer , linux-kernel@vger.kernel.org, Russell King , 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 The ksz9021rn_phy_fixup and mx6q_sabrelite functions try to set up an ethernet phy if they can. They do check whether phylib is enabled, but unfortunately the functions can only be called from platform code if phylib is builtin, not if it is a module Without this patch, building with a modular phylib results in: arch/arm/mach-imx/mach-imx6q.c: In function 'imx6q_sabrelite_init': arch/arm/mach-imx/mach-imx6q.c:120:5: error: 'ksz9021rn_phy_fixup' undeclared (first use in this function) arch/arm/mach-imx/mach-imx6q.c:120:5: note: each undeclared identifier is reported only once for each function it appears in The bug was originally reported by Artem Bityutskiy but only partially fixed in ef441806 "ARM: imx6q: register phy fixup only when CONFIG_PHYLIB is enabled". Signed-off-by: Arnd Bergmann Cc: Artem Bityutskiy Cc: Shawn Guo Cc: Sascha Hauer Acked-by: Shawn Guo --- arch/arm/mach-imx/mach-imx6q.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 5ec0608..045b3f6 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -71,7 +71,7 @@ soft: /* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */ static int ksz9021rn_phy_fixup(struct phy_device *phydev) { - if (IS_ENABLED(CONFIG_PHYLIB)) { + if (IS_BUILTIN(CONFIG_PHYLIB)) { /* min rx data delay */ phy_write(phydev, 0x0b, 0x8105); phy_write(phydev, 0x0c, 0x0000); @@ -112,7 +112,7 @@ put_clk: static void __init imx6q_sabrelite_init(void) { - if (IS_ENABLED(CONFIG_PHYLIB)) + if (IS_BUILTIN(CONFIG_PHYLIB)) phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, ksz9021rn_phy_fixup); imx6q_sabrelite_cko1_setup();