From patchwork Sun Apr 15 19:45:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 898309 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40PMTL3Y20z9s1l for ; Mon, 16 Apr 2018 05:46:29 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 45CE9C21E39; Sun, 15 Apr 2018 19:46:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 35D1CC21E08; Sun, 15 Apr 2018 19:46:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 46C09C21C27; Sun, 15 Apr 2018 19:46:11 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id B0337C21C27 for ; Sun, 15 Apr 2018 19:46:10 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 40PMSx5Tjhz1qvV5; Sun, 15 Apr 2018 21:46:09 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 40PMSx4pbKz1qqkh; Sun, 15 Apr 2018 21:46:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id hrhRzst7dvPb; Sun, 15 Apr 2018 21:46:08 +0200 (CEST) X-Auth-Info: khruC2IK2GSdSO87ss0RkzsDtilzixJ4bwaHHQjTWLM= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 15 Apr 2018 21:46:08 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Joe Hershberger , Simon Glass Date: Sun, 15 Apr 2018 21:45:54 +0200 Message-Id: <20180415194554.4859-1-lukma@denx.de> X-Mailer: git-send-email 2.11.0 Cc: Marek Vasut , Jagan Teki Subject: [U-Boot] [PATCH] eth: dm: fec: Change FEC PHY mask setting from CONFIG_PHYLIB to CONFIG_FEC_MXC_PHYADDR X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Without this commit we do have an explicit dependency on CONFIG_PHYLIB when one wants to set PHY ADDR on a iMX board (FEC + driver model). This shall be changed to CONFIG_FEC_MXC_PHYADDR, as only when we do have it set, we shall mask out other devices. As a side effect, when CONFIG_FEC_MXC_PHYADDR is not set, we scan PHY bus for connected PHY devices. Signed-off-by: Lukasz Majewski --- drivers/net/fec_mxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 3dc2816da0..2027d17fac 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1215,7 +1215,7 @@ static int fec_phy_init(struct fec_priv *priv, struct udevice *dev) struct phy_device *phydev; int mask = 0xffffffff; -#ifdef CONFIG_PHYLIB +#ifdef CONFIG_FEC_MXC_PHYADDR mask = 1 << CONFIG_FEC_MXC_PHYADDR; #endif