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: 3860701 Return-Path: X-Original-To: patchwork-linux-sh@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 DD973BF540 for ; Wed, 19 Mar 2014 19:35:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0D687201F9 for ; Wed, 19 Mar 2014 19:35:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 85824201F5 for ; Wed, 19 Mar 2014 19:35:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751761AbaCSTf4 (ORCPT ); Wed, 19 Mar 2014 15:35:56 -0400 Received: from moutng.kundenserver.de ([212.227.17.24]:54700 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751305AbaCSTfz (ORCPT ); Wed, 19 Mar 2014 15:35:55 -0400 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 Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Simon Horman , Magnus Damm , linux-sh@vger.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 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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); }