]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: fsl_mdio: Change to use virtual address
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Thu, 16 Jul 2020 10:09:10 +0000 (18:09 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 24 Sep 2020 12:27:44 +0000 (08:27 -0400)
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>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/net/fsl_mdio.c

index d2edd1751c3ef4db2805f8ae767cb1281e9a6576..ae96ce4c7bf9777bef3407e90e61901af4f6d128 100644 (file)
@@ -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);