From patchwork Wed Mar 19 19:29:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 3860641 Return-Path: X-Original-To: patchwork-davinci@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 CD867BF540 for ; Wed, 19 Mar 2014 19:32:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B65F201F4 for ; Wed, 19 Mar 2014 19:32:17 +0000 (UTC) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C4256201E7 for ; Wed, 19 Mar 2014 19:32:15 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2JJV44g023981; Wed, 19 Mar 2014 14:31:05 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2JJV30t032204; Wed, 19 Mar 2014 14:31:03 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 19 Mar 2014 14:31:02 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2JJV2mO007207; Wed, 19 Mar 2014 14:31:02 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 0D38B80627; Wed, 19 Mar 2014 13:31:02 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflxv17.itg.ti.com (dflxv17.itg.ti.com [128.247.5.93]) by linux.omap.com (Postfix) with ESMTP id 6F6DA80627 for ; Wed, 19 Mar 2014 13:31:01 -0600 (CST) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflxv17.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2JJV1k7019182 for ; Wed, 19 Mar 2014 14:31:01 -0500 Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by neches.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2JJV0D6018228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 19 Mar 2014 14:31:01 -0500 Received: from [216.82.250.51:20315] by server-10.bemta-12.messagelabs.com id C8/8F-19645-470F9235; Wed, 19 Mar 2014 19:31:00 +0000 X-Env-Sender: arnd@arndb.de X-Msg-Ref: server-16.tower-108.messagelabs.com!1395257458!7566144!1 X-Originating-IP: [212.227.17.24] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18282 invoked from network); 19 Mar 2014 19:30:59 -0000 Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.17.24) by server-16.tower-108.messagelabs.com with DHE-RSA-AES128-SHA encrypted SMTP; 19 Mar 2014 19:30:59 -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 0MDxhX-1WL64U3NWx-00HQe9; Wed, 19 Mar 2014 20:30:34 +0100 From: Arnd Bergmann To: Subject: [PATCH 07/62] ARM: davinci: make dm644x-evm phy fixup conditional Date: Wed, 19 Mar 2014 20:29:04 +0100 Message-ID: <1395257399-359545-8-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:D5GhcGu1KzhhaXIKhLNZ2DtDMQZs/ep3G5DgURDm9H6 QmtodBvhIvOI2S0aXV+Y3vhsSba+4vheA+cpSWd0Px2fdpdey8 EtSMcLAyfptvNtsQYTttc5cE+wfyfxd5O37WMAMbEXRJTTC9kA 7O/yPgLYwIlWT3cpu7RPV+2IdYEYZyl4TzDmclzF3mzJVmj1U+ PHlfru1gXRji4FcXwjxMDCT2bxA4UOqPMR4ZXCYuxdIFoegNFA gAF4/6gzHmSZ9WjS9AQqJXzspdwYVG85ABYp3ndYK2oV5tf9H2 GchzDP9FdpE0tt35FDkzBMoOwImEgNTJnz6k88vbHIw3AfgAFy 7aAal6k64zOsKiJmxKDU+i5XsKOS2CxP2LiP102yJ CC: Kevin Hilman , , Arnd Bergmann , X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 We cannot call phy_register_fixup_for_uid() if CONFIG_PHYLIB is not built into the kernel, and we should not enforce that to be built into vmlinux either, because one might want to disable the entire network stack. This change uses a compile-time condition on CONFIG_PHYLIB to remove the call in the cases where it cannot work. Signed-off-by: Arnd Bergmann Cc: Sekhar Nori Cc: Kevin Hilman Cc: davinci-linux-open-source@linux.davincidsp.com Acked-by: Sekhar Nori --- arch/arm/mach-davinci/board-dm644x-evm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 5602957..e583e58 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -804,11 +804,12 @@ static __init void davinci_evm_init(void) /* irlml6401 switches over 1A, in under 8 msec */ davinci_setup_usb(1000, 8); - soc_info->emac_pdata->phy_id = DM644X_EVM_PHY_ID; - /* Register the fixup for PHY on DaVinci */ - phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK, - davinci_phy_fixup); - + if (IS_BUILTIN(CONFIG_PHYLIB)) { + soc_info->emac_pdata->phy_id = DM644X_EVM_PHY_ID; + /* Register the fixup for PHY on DaVinci */ + phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK, + davinci_phy_fixup); + } } MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM")