Skip to contentSkip to conversation

net: sh_eth: Init the hardware before PHY access

PATCH New Marek Vasut 1 participant 1 message Apr 4, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: sh_eth: Init the hardware before PHY access

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.

Cc Joe Hershberger <[email protected]>
Cc Nobuhiro Iwamatsu <[email protected]>

---
NOTE: This is for 2020.04

---
 drivers/net/sh_eth.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/sh_eth.c +4 -0
index 183e8e3083..f8e5d05722 100644
@@ -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");
Signature · 1 line
2.25.1