diff mbox series

[PATCHv3,01/15] net: fsl_mdio: Change to use virtual address

Message ID 20200612151735.49048-2-Zhiqiang.Hou@nxp.com
State New
Headers show
Series powerpc: covert p1010, p1020 and p2020 RDB board to DM_ETH | expand

Commit Message

Zhiqiang Hou June 12, 2020, 3:17 p.m. UTC
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>
---
V3:
 - New patch.

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

Comments

Vladimir Oltean June 12, 2020, 8:28 p.m. UTC | #1
On Fri, 12 Jun 2020 at 18:23, Zhiqiang Hou <Zhiqiang.Hou at nxp.com> wrote:
>
> 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>

> V3:
>  - New patch.
>
>  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
>
Zhiqiang Hou June 15, 2020, 8:54 a.m. UTC | #2
Hi Vladimir,

Thanks a lot for your review!

Regards,
Zhiqiang

> -----Original Message-----
> From: Vladimir Oltean <olteanv at gmail.com>
> Sent: 2020?6?13? 4:29
> To: Z.q. Hou <zhiqiang.hou at nxp.com>
> Cc: u-boot <u-boot at lists.denx.de>; Priyanka Jain <priyanka.jain at nxp.com>;
> Bin Meng <bmeng.cn at gmail.com>
> Subject: Re: [PATCHv3 01/15] net: fsl_mdio: Change to use virtual address
> 
> On Fri, 12 Jun 2020 at 18:23, Zhiqiang Hou <Zhiqiang.Hou at nxp.com> wrote:
> >
> > 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>
> 
> > V3:
> >  - New patch.
> >
> >  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
> >
diff mbox series

Patch

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);