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: 10883 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1146E23E00 for ; Wed, 22 Aug 2012 15:13:39 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id D24EEA18D88 for ; Wed, 22 Aug 2012 15:13:26 +0000 (UTC) Received: by ggmi2 with SMTP id i2so769414ggm.11 for ; Wed, 22 Aug 2012 08:13:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=wn9S9EEZGEzQi4Uw3VMjU+LBibBndi8ZvKi9H0GFl6Y=; b=X4pLjIDhKtSyIk4L27XZf0E5cPRHfWxwq6VjDJrlcQ37kanWwXmrFLpxjmUSTI8Ujc LVFIwnRKEIbwSovafdrGe0phGQDp+MNEU3hwgsbASyrZt4hYF5PzpKXSqXi1VPPGcPCB zp+3s67n2y2z++5U9/s3s9m9gH50Nxkc0gMRORwhHqObcJla2ZpdsFW+xHbYmCQdSuUc YbasZIAG3jISbsoqP7xdAIV6w43DPYKswViC1QoLPDk0hG0Z+la7qC2jSt4p6MW1YMY/ 4EyDU4rMSCHIjXgmjnuJdXWgrCPeAAvX0yMDnDGfYa+o/B3f8IyHXiUPZDKJ9WKzR3Ak AXqg== Received: by 10.50.207.106 with SMTP id lv10mr2600203igc.0.1345648417446; Wed, 22 Aug 2012 08:13:37 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp207629igc; Wed, 22 Aug 2012 08:13:36 -0700 (PDT) Received: by 10.204.154.202 with SMTP id p10mr6757917bkw.105.1345648415756; Wed, 22 Aug 2012 08:13:35 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.187]) by mx.google.com with ESMTP id hu14si2877583bkc.142.2012.08.22.08.13.35; Wed, 22 Aug 2012 08:13:35 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.187 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.187; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.187 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de 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 Cc: Russell King , linux-kernel@vger.kernel.org, Arnd Bergmann , Artem Bityutskiy , Shawn Guo , Sascha Hauer 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-Gm-Message-State: ALoCoQk91lRBlkF7cqHxocInqEw4De3vwFpL+DLvgwctfC6U1NDMyDTCNZ3iezJVFHzkI85woa/i 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 --- 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();