linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Russell King <rmk+kernel@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: [PATCH 4/6] ARM: imx: fix ksz9021rn_phy_fixup
Date: Wed, 22 Aug 2012 17:13:08 +0200	[thread overview]
Message-ID: <1345648390-4234-5-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1345648390-4234-1-git-send-email-arnd@arndb.de>

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 <arnd@arndb.de>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 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();
-- 
1.7.10


  parent reply	other threads:[~2012-08-22 15:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22 15:13 [PATCH 0/6] ARM: randconfig bugs Arnd Bergmann
2012-08-22 15:13 ` [PATCH 1/6] ARM: ux500: don't select LEDS_GPIO for snowball Arnd Bergmann
2012-08-23 14:26   ` Arnd Bergmann
2012-08-27 23:40     ` Linus Walleij
2012-08-22 15:13 ` [PATCH 2/6] ARM: omap: allow building omap44xx without SMP Arnd Bergmann
2012-08-22 15:36   ` Shilimkar, Santosh
2012-08-22 17:22     ` Arnd Bergmann
2012-08-23  7:05       ` Shilimkar, Santosh
2012-08-23 12:12         ` Arnd Bergmann
2012-08-23 13:00           ` Shilimkar, Santosh
2012-08-23 13:32             ` Arnd Bergmann
2012-08-22 15:13 ` [PATCH 3/6] ARM: imx: build pm-imx5 code only when PM is enabled Arnd Bergmann
2012-08-23  2:07   ` Shawn Guo
2012-08-22 15:13 ` Arnd Bergmann [this message]
2012-08-23  2:10   ` [PATCH 4/6] ARM: imx: fix ksz9021rn_phy_fixup Shawn Guo
2012-08-22 15:13 ` [PATCH 5/6] ARM: imx: select CPU_FREQ_TABLE when needed Arnd Bergmann
2012-08-23  2:13   ` Shawn Guo
2012-08-22 15:13 ` [PATCH 6/6] ARM: imx: select ARM_CPU_SUSPEND when necessary Arnd Bergmann
2012-08-23  2:41   ` Shawn Guo
2012-08-23 14:20     ` Arnd Bergmann
2012-08-23 14:55       ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345648390-4234-5-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=dedekind1@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).