From patchwork Wed Mar 19 19:29:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 3861231 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EF6E8BF540 for ; Wed, 19 Mar 2014 20:58:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2264F201FA for ; Wed, 19 Mar 2014 20:58:21 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 321CA201F4 for ; Wed, 19 Mar 2014 20:58:20 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMO8-0006Uw-Gz; Wed, 19 Mar 2014 19:42:58 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMMw-0006QE-Jo; Wed, 19 Mar 2014 19:41:42 +0000 Received: from moutng.kundenserver.de ([212.227.17.24]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMHd-00060y-0s for linux-arm-kernel@lists.infradead.org; Wed, 19 Mar 2014 19:36:19 +0000 Received: from wuerfel.lan (HSI-KBW-134-3-135-108.hsi14.kabel-badenwuerttemberg.de [134.3.135.108]) by mrelayeu.kundenserver.de (node=mreue105) with ESMTP (Nemesis) id 0MAulY-1WId3G3OK4-00A1qs; Wed, 19 Mar 2014 20:35:46 +0100 From: Arnd Bergmann To: arm@kernel.org Subject: [PATCH 60/62] ARM: shmobile: work around CONFIG_PHYLIB=m Date: Wed, 19 Mar 2014 20:29:57 +0100 Message-Id: <1395257399-359545-61-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395257399-359545-1-git-send-email-arnd@arndb.de> References: <1395257399-359545-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:kLiLz6cELEPJhvTfaIpL2hRnxVNrBYglJs/RH8f+Y74 6RYWbQxDPoLp3YEjWw0c1DHOlD36gzoNzPYAodfjoYvKmI7Xr+ 55HypANd4vUJMsWFzbJmyjRfMZ9++0zU/g6s5NdLokZhw1/j6o o3nP4zaHKk6WYKuZtdSUyj9RRwV9bfXFQV2nFBEVnUDealiXc+ 6TYcvsAxGbsR4IfKlqurPKcSqeiBpZH5Q/hpuu/Q8lCLEDHiJ7 KJrj1LuIilOPZoFQhQxntRX4rmise+nmmqf0vhTwWzQYqJ+PVv 1kjqySEaBgW9U+e2/AOLXxFVreCUvvnxujJBoXVfXSMWObORtr yt6lUWtQBb7unYzuKTSlDPVnbRNs6EaSSLnE4PjnY X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140319_153613_679104_45932ED4 X-CRM114-Status: GOOD ( 13.74 ) X-Spam-Score: -1.9 (-) Cc: Simon Horman , Magnus Damm , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When phylib is set to be built as a module, the lager and koelsch boards fail to build: arch/arm/mach-shmobile/built-in.o: In function `lager_ksz8041_fixup': :(.text+0x738): undefined reference to `mdiobus_read' :(.text+0x73c): undefined reference to `mdiobus_write' arch/arm/mach-shmobile/built-in.o: In function `koelsch_ksz8041_fixup': :(.text+0x7e8): undefined reference to `mdiobus_read' :(.text+0x7ec): undefined reference to `mdiobus_write' To work around that problem, this changes the code to check for IS_BUILTIN rather than IS_ENABLED, turning the error into a runtime problem. It's now possible to build random configurations, but the phy may be set up incorrectly in this case. Signed-off-by: Arnd Bergmann Cc: Simon Horman Cc: Magnus Damm Cc: linux-sh@vger.kernel.org --- arch/arm/mach-shmobile/board-koelsch.c | 2 +- arch/arm/mach-shmobile/board-lager.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index 5a034ff..b724f33 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c @@ -510,7 +510,7 @@ static void __init koelsch_init(void) irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW); - if (IS_ENABLED(CONFIG_PHYLIB)) + if (IS_BUILTIN(CONFIG_PHYLIB)) phy_register_fixup_for_id("r8a7791-ether-ff:01", koelsch_ksz8041_fixup); } diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index f0104bf..67b1069 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -869,7 +869,7 @@ static void __init lager_init(void) irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW); - if (IS_ENABLED(CONFIG_PHYLIB)) + if (IS_BUILTIN(CONFIG_PHYLIB)) phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup); }