From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3DD0EC433F5 for ; Wed, 27 Apr 2022 10:45:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1CC2683F00; Wed, 27 Apr 2022 12:43:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="V/aUkftE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2BD9D83E4F; Wed, 27 Apr 2022 12:43:11 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6D40E83EDF for ; Wed, 27 Apr 2022 12:42:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 254B0B82530; Wed, 27 Apr 2022 10:42:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D9D5C385A9; Wed, 27 Apr 2022 10:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651056167; bh=fFYADkBCfPIDeBjOTRZNXGDylqJOVWgFDfHoQnMVJi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V/aUkftEnKuRSA0DcnOBe7xNYu4f/RHKKIYOxtwbQcj7kDvoJ8/Lb4w1Kz8N7KgE1 /Cse7qu+JoQx1IIdTTjvzOuha3H/Wp0+yYVNLQJk5varcCWrPS+31hNq4J/s4Q8SqU LftGAY/TLj66S6blpn+Ak5qIZBu5htQyowKsijnTpXuPiTcgixx7pVKtL5vLN56HrZ 74uXvF3Xh2rupEcS5F+20TCREDvPGpL61iZ5n3uBP5NROblOuGQxyA8i4U3J05l68v HUFUrfmr9QQCte0trPbynjWYwOptUFCNcag0nytjtjN+Cnbliq6Y15nAmtj/T1As4V GVHkq8IFogOTA== From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: Stefan Roese Cc: Robert Marko , =?UTF-8?q?Pali=20Roh=C3=A1r?= , U-Boot-Denx , Ramon Fried , Joe Hershberger , =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 18/19] net: mvneta: Disable fixed PHY code if PHY_FIXED is not compiled in Date: Wed, 27 Apr 2022 12:42:01 +0200 Message-Id: <20220427104202.1205-19-kabel@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220427104202.1205-1-kabel@kernel.org> References: <20220427104202.1205-1-kabel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean From: Marek BehĂșn Guard the code handling the fixed PHY case by CONFIG_IS_ENABLED(PHY_FIXED). Signed-off-by: Marek BehĂșn --- drivers/net/mvneta.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 378789b632..292c364e5e 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -812,7 +812,8 @@ static void mvneta_defaults_set(struct mvneta_port *pp) mvreg_write(pp, MVNETA_SDMA_CONFIG, val); /* Enable PHY polling in hardware if not in fixed-link mode */ - if (pp->phydev->phy_id != PHY_FIXED_ID) { + if (!CONFIG_IS_ENABLED(PHY_FIXED) || + pp->phydev->phy_id != PHY_FIXED_ID) { mvreg_write(pp, MVNETA_PHY_ADDR, pp->phydev->addr); val = mvreg_read(pp, MVNETA_UNIT_CONTROL); @@ -1172,7 +1173,8 @@ static void mvneta_adjust_link(struct udevice *dev) * be added). Also, why is ADVERT_FC enabled if we don't enable * inband AN at all? */ - if (pp->phydev->phy_id == PHY_FIXED_ID) + if (CONFIG_IS_ENABLED(PHY_FIXED) && + pp->phydev->phy_id == PHY_FIXED_ID) val = MVNETA_GMAC_FORCE_LINK_UP | MVNETA_GMAC_IB_BYPASS_AN_EN | MVNETA_GMAC_SET_FC_EN | -- 2.35.1