summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@gmail.com>2020-04-04 15:01:22 +0200
committermarex <marex@desktop.lan>2020-04-04 15:06:37 +0200
commitb13da11255a01475d41bdc5d367d55ed3656bae8 (patch)
tree2e207991e598806231148a2fbea867feb39ed9f6 /drivers/net
parente0718b3ab754860bd47677e6b4fc5b70da42c4ab (diff)
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. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sh_eth.c4
1 files changed, 4 insertions, 0 deletions
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");