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 AA4C3C433F5 for ; Wed, 27 Apr 2022 10:45:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5294683EF9; Wed, 27 Apr 2022 12:43: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=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="UMFtZpxX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0B66983E3A; Wed, 27 Apr 2022 12:43:02 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 6FD8083ECA for ; Wed, 27 Apr 2022 12:42:45 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 5A0E161C19; Wed, 27 Apr 2022 10:42:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C54AC385A7; Wed, 27 Apr 2022 10:42:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651056163; bh=v9BoBRgZW3UK9kuO0aEbvyn2Lubqcx8xZge/UBP/vdE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UMFtZpxXK7cvGSs3rdxNsHV6ULk219gTfGHavI1VPTVpwQ6rHZC2usHcBd7I5Hbio hC1Ija2nY9i6Qr3lUfYoVwmdBZr8qWcFk+NHZR+k6J8gH64iX4ZN+SB+wZFmBtqEOQ mXFnhyyOkS4YhLAhXThX+7SdQB6Z3GRU9Jd6G5loViIVgsgdNx4cBJrLIdXBaF6TOl 0PlBidQJaX4WxTPCFtDsQdAQ5zQjSQcbOCWRNwFP1BllZXrEH/ZqIrkKNfRf2DjZ6s OqFe6fPGDa6fA/JxIYe2Cx3/MRKlHp6ToK2YpIxwDs7/FJrNAt574hAJmKBjzRv4dv 1lHw9DvQOG9yQ== 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 16/19] net: mvneta: Write PHY address just before enabling HW polling Date: Wed, 27 Apr 2022 12:41:59 +0200 Message-Id: <20220427104202.1205-17-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 Write PHY address just before enabling HW polling of the PHY. Signed-off-by: Marek BehĂșn --- drivers/net/mvneta.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 5b1c4fe5fc..4917857681 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -814,6 +814,8 @@ static void mvneta_defaults_set(struct mvneta_port *pp) /* Enable PHY polling in hardware if not in fixed-link mode */ if (!pp->fixed_link) { + mvreg_write(pp, MVNETA_PHY_ADDR, pp->phydev->addr); + val = mvreg_read(pp, MVNETA_UNIT_CONTROL); val |= MVNETA_PHY_POLLING_ENABLE; mvreg_write(pp, MVNETA_UNIT_CONTROL, val); @@ -1431,10 +1433,6 @@ static int mvneta_start(struct udevice *dev) pp->fixed_link = phydev->phy_id == PHY_FIXED_ID; - /* Set PHY address in case we will enable HW polling */ - if (!pp->fixed_link) - mvreg_write(pp, MVNETA_PHY_ADDR, phydev->addr); - pp->phydev = phydev; phy_config(phydev); phy_startup(phydev); -- 2.35.1