From patchwork Sat Apr 4 13:06:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 237164 List-Id: U-Boot discussion From: marek.vasut at gmail.com (Marek Vasut) Date: Sat, 4 Apr 2020 15:06:13 +0200 Subject: [PATCH] net: sh_eth: Init the hardware before PHY access Message-ID: <20200404130613.575632-1-marek.vasut+renesas@gmail.com> To access the PHY, the MAC registers must be initialized. Call the init function in probe() to make it so, otherwise the PHY ID readout returns all zeroes. Signed-off-by: Marek Vasut Cc: Joe Hershberger Cc: Nobuhiro Iwamatsu --- NOTE: This is for 2020.04 --- drivers/net/sh_eth.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 183e8e3083..f8e5d05722 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -859,6 +859,10 @@ static int sh_ether_probe(struct udevice *udev) goto err_mdio_register; #endif + ret = sh_eth_init_common(eth, pdata->enetaddr); + if (ret) + goto err_phy_config; + ret = sh_eth_phy_config(udev); if (ret) { printf(SHETHER_NAME ": phy config timeout\n");