[PATCHv5 03/18] net: fsl_mdio: Change to use virtual address

Zhiqiang Hou Zhiqiang.Hou at nxp.com
Thu Jul 16 12:09:10 CEST 2020


From: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>

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

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

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

diff --git a/drivers/net/fsl_mdio.c b/drivers/net/fsl_mdio.c
index 43040d4c3f..e52daa214d 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);
 
-- 
2.25.1



More information about the U-Boot mailing list