diff mbox series

[PATCHv6,02/18] net: fsl_mdio: Change to use virtual address

Message ID 20200922085017.47972-3-Zhiqiang.Hou@nxp.com
State Accepted
Commit c54f6139ede01116179bbf1aa2058bc409e59c8a
Delegated to: Priyanka Jain
Headers show
Series powerpc: convert p1010, p1020 and p2020 RDB boards to DM_ETH | expand

Commit Message

Z.q. Hou Sept. 22, 2020, 8:50 a.m. UTC
From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

Use virtual address to access the MII block registers instead
of physical address.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
V6:
 - No change.

 drivers/net/fsl_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/fsl_mdio.c b/drivers/net/fsl_mdio.c
index d2edd1751c..ae96ce4c7b 100644
--- a/drivers/net/fsl_mdio.c
+++ b/drivers/net/fsl_mdio.c
@@ -213,7 +213,7 @@  static int tsec_mdio_probe(struct udevice *dev)
 		printf("dev_get_priv(dev %p) = NULL\n", dev);
 		return -1;
 	}
-	priv->regs = (void *)(uintptr_t)dev_read_addr(dev);
+	priv->regs = dev_remap_addr(dev);
 	debug("%s priv %p @ regs %p, pdata %p\n", __func__,
 	      priv, priv->regs, pdata);