All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree
@ 2018-07-06 10:10 Siva Durga Prasad Paladugu
  2018-07-06 10:10 ` [U-Boot] [PATCH 2/3] net: phy: xilinx_phy: Add suuport for livetree Siva Durga Prasad Paladugu
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Siva Durga Prasad Paladugu @ 2018-07-06 10:10 UTC (permalink / raw)
  To: u-boot

This patch adds support for livetree by using
dev_.. calls instead of fdtdec_..

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
---
 drivers/net/phy/ti.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c
index 8f3ed8a..945d9e9 100644
--- a/drivers/net/phy/ti.c
+++ b/drivers/net/phy/ti.c
@@ -173,24 +173,22 @@ static int dp83867_of_init(struct phy_device *phydev)
 {
 	struct dp83867_private *dp83867 = phydev->priv;
 	struct udevice *dev = phydev->dev;
-	int node = dev_of_offset(dev);
 	const void *fdt = gd->fdt_blob;
 
-	if (fdtdec_get_bool(fdt, node, "ti,max-output-impedance"))
+	if (dev_read_bool(dev, "ti,max-output-impedance"))
 		dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
-	else if (fdtdec_get_bool(fdt, node, "ti,min-output-impedance"))
+	else if (dev_read_bool(dev, "ti,min-output-impedance"))
 		dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN;
 	else
 		dp83867->io_impedance = -EINVAL;
 
-	dp83867->rx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
-				 "ti,rx-internal-delay", -1);
+	dp83867->rx_id_delay = dev_read_u32_default(dev, "ti,rx-internal-delay",
+						    -1);
 
-	dp83867->tx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
-				 "ti,tx-internal-delay", -1);
+	dp83867->tx_id_delay = dev_read_u32_default(dev, "ti,tx-internal-delay",
+						    -1);
 
-	dp83867->fifo_depth = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
-				 "ti,fifo-depth", -1);
+	dp83867->fifo_depth = dev_read_u32_default(dev, "ti,fifo-depth", -1);
 
 	return 0;
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 2/3] net: phy: xilinx_phy: Add suuport for livetree
  2018-07-06 10:10 [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree Siva Durga Prasad Paladugu
@ 2018-07-06 10:10 ` Siva Durga Prasad Paladugu
  2018-07-09  8:48   ` Michal Simek
  2018-07-09 17:22   ` Grygorii Strashko
  2018-07-06 10:10 ` [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree Siva Durga Prasad Paladugu
  2018-07-09 17:20 ` [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree Grygorii Strashko
  2 siblings, 2 replies; 12+ messages in thread
From: Siva Durga Prasad Paladugu @ 2018-07-06 10:10 UTC (permalink / raw)
  To: u-boot

This patch adds support for livetree by using dev_..
calls instead of fdtdec_.. .

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
---
 drivers/net/phy/xilinx_phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
index 004cfcf..2e2a5cd 100644
--- a/drivers/net/phy/xilinx_phy.c
+++ b/drivers/net/phy/xilinx_phy.c
@@ -103,8 +103,8 @@ static int xilinxphy_of_init(struct phy_device *phydev)
 	u32 phytype;
 
 	debug("%s\n", __func__);
-	phytype = fdtdec_get_int(gd->fdt_blob, dev_of_offset(phydev->dev),
-				 "xlnx,phy-type", -1);
+	phytype = dev_read_u32_default(phydev->dev,
+				       "xlnx,phy-type", -1);
 	if (phytype == XAE_PHY_TYPE_1000BASE_X)
 		phydev->flags |= XAE_PHY_TYPE_1000BASE_X;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree
  2018-07-06 10:10 [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree Siva Durga Prasad Paladugu
  2018-07-06 10:10 ` [U-Boot] [PATCH 2/3] net: phy: xilinx_phy: Add suuport for livetree Siva Durga Prasad Paladugu
@ 2018-07-06 10:10 ` Siva Durga Prasad Paladugu
  2018-07-11 18:56   ` Joe Hershberger
  2018-07-09 17:20 ` [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree Grygorii Strashko
  2 siblings, 1 reply; 12+ messages in thread
From: Siva Durga Prasad Paladugu @ 2018-07-06 10:10 UTC (permalink / raw)
  To: u-boot

This patch updates the zynq gem driver to support
livetree.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
---
 drivers/net/zynq_gem.c | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index a817f2e..b9858e4 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -178,7 +178,7 @@ struct zynq_gem_priv {
 	struct zynq_gem_regs *iobase;
 	phy_interface_t interface;
 	struct phy_device *phydev;
-	int phy_of_handle;
+	ofnode phy_of_node;
 	struct mii_dev *bus;
 	struct clk clk;
 	u32 max_speed;
@@ -349,8 +349,7 @@ static int zynq_phy_init(struct udevice *dev)
 
 	priv->phydev->advertising = priv->phydev->supported;
 
-	if (priv->phy_of_handle > 0)
-		dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle);
+	priv->phydev->dev->node = priv->phy_of_node;
 
 	return phy_config(priv->phydev);
 }
@@ -693,21 +692,23 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
 {
 	struct eth_pdata *pdata = dev_get_platdata(dev);
 	struct zynq_gem_priv *priv = dev_get_priv(dev);
-	int node = dev_of_offset(dev);
+	struct ofnode_phandle_args phandle_args;
 	const char *phy_mode;
 
-	pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
+	pdata->iobase = (phys_addr_t)dev_read_addr(dev);
 	priv->iobase = (struct zynq_gem_regs *)pdata->iobase;
 	/* Hardcode for now */
 	priv->phyaddr = -1;
 
-	priv->phy_of_handle = fdtdec_lookup_phandle(gd->fdt_blob, node,
-						    "phy-handle");
-	if (priv->phy_of_handle > 0)
-		priv->phyaddr = fdtdec_get_int(gd->fdt_blob,
-					priv->phy_of_handle, "reg", -1);
+	if (dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0,
+				       &phandle_args)) {
+		debug("phy-handle does not exist %s\n", dev->name);
+		return -ENOENT;
+	}
 
-	phy_mode = fdt_getprop(gd->fdt_blob, node, "phy-mode", NULL);
+	priv->phyaddr = ofnode_read_u32_default(phandle_args.node, "reg", -1);
+	priv->phy_of_node = phandle_args.node;
+	phy_mode = dev_read_prop(dev, "phy-mode", NULL);
 	if (phy_mode)
 		pdata->phy_interface = phy_get_interface_by_name(phy_mode);
 	if (pdata->phy_interface == -1) {
@@ -716,10 +717,8 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
 	}
 	priv->interface = pdata->phy_interface;
 
-	priv->max_speed = fdtdec_get_uint(gd->fdt_blob, priv->phy_of_handle,
-					  "max-speed", SPEED_1000);
-	priv->int_pcs = fdtdec_get_bool(gd->fdt_blob, node,
-					"is-internal-pcspma");
+	priv->max_speed = dev_read_u32_default(dev, "max-speed", SPEED_1000);
+	priv->int_pcs = dev_read_bool(dev, "is-internal-pcspma");
 
 	printf("ZYNQ GEM: %lx, phyaddr %x, interface %s\n", (ulong)priv->iobase,
 	       priv->phyaddr, phy_string_for_interface(priv->interface));
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 2/3] net: phy: xilinx_phy: Add suuport for livetree
  2018-07-06 10:10 ` [U-Boot] [PATCH 2/3] net: phy: xilinx_phy: Add suuport for livetree Siva Durga Prasad Paladugu
@ 2018-07-09  8:48   ` Michal Simek
  2018-07-09 17:22   ` Grygorii Strashko
  1 sibling, 0 replies; 12+ messages in thread
From: Michal Simek @ 2018-07-09  8:48 UTC (permalink / raw)
  To: u-boot

On 6.7.2018 12:10, Siva Durga Prasad Paladugu wrote:
> This patch adds support for livetree by using dev_..
> calls instead of fdtdec_.. .
> 

typo in subject.

M

> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> ---
>  drivers/net/phy/xilinx_phy.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
> index 004cfcf..2e2a5cd 100644
> --- a/drivers/net/phy/xilinx_phy.c
> +++ b/drivers/net/phy/xilinx_phy.c
> @@ -103,8 +103,8 @@ static int xilinxphy_of_init(struct phy_device *phydev)
>  	u32 phytype;
>  
>  	debug("%s\n", __func__);
> -	phytype = fdtdec_get_int(gd->fdt_blob, dev_of_offset(phydev->dev),
> -				 "xlnx,phy-type", -1);
> +	phytype = dev_read_u32_default(phydev->dev,
> +				       "xlnx,phy-type", -1);
>  	if (phytype == XAE_PHY_TYPE_1000BASE_X)
>  		phydev->flags |= XAE_PHY_TYPE_1000BASE_X;
>  
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree
  2018-07-06 10:10 [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree Siva Durga Prasad Paladugu
  2018-07-06 10:10 ` [U-Boot] [PATCH 2/3] net: phy: xilinx_phy: Add suuport for livetree Siva Durga Prasad Paladugu
  2018-07-06 10:10 ` [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree Siva Durga Prasad Paladugu
@ 2018-07-09 17:20 ` Grygorii Strashko
  2018-07-10  4:01   ` Siva Durga Prasad Paladugu
  2 siblings, 1 reply; 12+ messages in thread
From: Grygorii Strashko @ 2018-07-09 17:20 UTC (permalink / raw)
  To: u-boot



On 07/06/2018 05:10 AM, Siva Durga Prasad Paladugu wrote:
> This patch adds support for livetree by using
> dev_.. calls instead of fdtdec_..
> 
> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> ---
>   drivers/net/phy/ti.c | 16 +++++++---------
>   1 file changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c
> index 8f3ed8a..945d9e9 100644
> --- a/drivers/net/phy/ti.c
> +++ b/drivers/net/phy/ti.c
> @@ -173,24 +173,22 @@ static int dp83867_of_init(struct phy_device *phydev)
>   {
>   	struct dp83867_private *dp83867 = phydev->priv;
>   	struct udevice *dev = phydev->dev;
> -	int node = dev_of_offset(dev);
>   	const void *fdt = gd->fdt_blob;
>   
> -	if (fdtdec_get_bool(fdt, node, "ti,max-output-impedance"))
> +	if (dev_read_bool(dev, "ti,max-output-impedance"))
>   		dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
> -	else if (fdtdec_get_bool(fdt, node, "ti,min-output-impedance"))
> +	else if (dev_read_bool(dev, "ti,min-output-impedance"))
>   		dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN;
>   	else
>   		dp83867->io_impedance = -EINVAL;
>   
> -	dp83867->rx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
> -				 "ti,rx-internal-delay", -1);
> +	dp83867->rx_id_delay = dev_read_u32_default(dev, "ti,rx-internal-delay",
> +						    -1);
>   
> -	dp83867->tx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
> -				 "ti,tx-internal-delay", -1);
> +	dp83867->tx_id_delay = dev_read_u32_default(dev, "ti,tx-internal-delay",
> +						    -1);
>   
> -	dp83867->fifo_depth = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
> -				 "ti,fifo-depth", -1);
> +	dp83867->fifo_depth = dev_read_u32_default(dev, "ti,fifo-depth", -1);
>   
>   	return 0;
>   }
> 

NACK. Pls, check
https://patchwork.ozlabs.org/cover/936370/
and
https://patchwork.ozlabs.org/cover/936380/

any comments, tested-by are very welcome.

-- 
regards,
-grygorii

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 2/3] net: phy: xilinx_phy: Add suuport for livetree
  2018-07-06 10:10 ` [U-Boot] [PATCH 2/3] net: phy: xilinx_phy: Add suuport for livetree Siva Durga Prasad Paladugu
  2018-07-09  8:48   ` Michal Simek
@ 2018-07-09 17:22   ` Grygorii Strashko
  1 sibling, 0 replies; 12+ messages in thread
From: Grygorii Strashko @ 2018-07-09 17:22 UTC (permalink / raw)
  To: u-boot



On 07/06/2018 05:10 AM, Siva Durga Prasad Paladugu wrote:
> This patch adds support for livetree by using dev_..
> calls instead of fdtdec_.. .
> 
> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> ---
>   drivers/net/phy/xilinx_phy.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
> index 004cfcf..2e2a5cd 100644
> --- a/drivers/net/phy/xilinx_phy.c
> +++ b/drivers/net/phy/xilinx_phy.c
> @@ -103,8 +103,8 @@ static int xilinxphy_of_init(struct phy_device *phydev)
>   	u32 phytype;
>   
>   	debug("%s\n", __func__);
> -	phytype = fdtdec_get_int(gd->fdt_blob, dev_of_offset(phydev->dev),
> -				 "xlnx,phy-type", -1);
> +	phytype = dev_read_u32_default(phydev->dev,
> +				       "xlnx,phy-type", -1);
>   	if (phytype == XAE_PHY_TYPE_1000BASE_X)
>   		phydev->flags |= XAE_PHY_TYPE_1000BASE_X;
>   
> 

The same. NACK. Pls, check
https://patchwork.ozlabs.org/cover/936370/
and
https://patchwork.ozlabs.org/cover/936380/

any comments, tested-by are very welcome.


-- 
regards,
-grygorii

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree
  2018-07-09 17:20 ` [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree Grygorii Strashko
@ 2018-07-10  4:01   ` Siva Durga Prasad Paladugu
  2018-07-10  4:05     ` Siva Durga Prasad Paladugu
  0 siblings, 1 reply; 12+ messages in thread
From: Siva Durga Prasad Paladugu @ 2018-07-10  4:01 UTC (permalink / raw)
  To: u-boot

Hi,

> -----Original Message-----
> From: Grygorii Strashko [mailto:grygorii.strashko at ti.com]
> Sent: Monday, July 09, 2018 10:51 PM
> To: Siva Durga Prasad Paladugu <sivadur@xilinx.com>; u-
> boot at lists.denx.de
> Cc: joe.hershberger at ni.com; Michal Simek <michals@xilinx.com>
> Subject: Re: [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree
> 
> 
> 
> On 07/06/2018 05:10 AM, Siva Durga Prasad Paladugu wrote:
> > This patch adds support for livetree by using dev_.. calls instead of
> > fdtdec_..
> >
> > Signed-off-by: Siva Durga Prasad Paladugu
> > <siva.durga.paladugu@xilinx.com>
> > ---
> >   drivers/net/phy/ti.c | 16 +++++++---------
> >   1 file changed, 7 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c index
> > 8f3ed8a..945d9e9 100644
> > --- a/drivers/net/phy/ti.c
> > +++ b/drivers/net/phy/ti.c
> > @@ -173,24 +173,22 @@ static int dp83867_of_init(struct phy_device
> *phydev)
> >   {
> >   	struct dp83867_private *dp83867 = phydev->priv;
> >   	struct udevice *dev = phydev->dev;
> > -	int node = dev_of_offset(dev);
> >   	const void *fdt = gd->fdt_blob;
> >
> > -	if (fdtdec_get_bool(fdt, node, "ti,max-output-impedance"))
> > +	if (dev_read_bool(dev, "ti,max-output-impedance"))
> >   		dp83867->io_impedance =
> DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
> > -	else if (fdtdec_get_bool(fdt, node, "ti,min-output-impedance"))
> > +	else if (dev_read_bool(dev, "ti,min-output-impedance"))
> >   		dp83867->io_impedance =
> DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN;
> >   	else
> >   		dp83867->io_impedance = -EINVAL;
> >
> > -	dp83867->rx_id_delay = fdtdec_get_uint(gd->fdt_blob,
> dev_of_offset(dev),
> > -				 "ti,rx-internal-delay", -1);
> > +	dp83867->rx_id_delay = dev_read_u32_default(dev, "ti,rx-internal-
> delay",
> > +						    -1);
> >
> > -	dp83867->tx_id_delay = fdtdec_get_uint(gd->fdt_blob,
> dev_of_offset(dev),
> > -				 "ti,tx-internal-delay", -1);
> > +	dp83867->tx_id_delay = dev_read_u32_default(dev, "ti,tx-internal-
> delay",
> > +						    -1);
> >
> > -	dp83867->fifo_depth = fdtdec_get_uint(gd->fdt_blob,
> dev_of_offset(dev),
> > -				 "ti,fifo-depth", -1);
> > +	dp83867->fifo_depth = dev_read_u32_default(dev, "ti,fifo-depth",
> > +-1);
> >
> >   	return 0;
> >   }
> >
> 
> NACK. Pls, check
> https://patchwork.ozlabs.org/cover/936370/
> and
> https://patchwork.ozlabs.org/cover/936380/
> 
> any comments, tested-by are very welcome.

Do you mean to say that this patch has to be rebased and tested on the top of your patch.

Thanks,
Siva

> 
> --
> regards,
> -grygorii

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree
  2018-07-10  4:01   ` Siva Durga Prasad Paladugu
@ 2018-07-10  4:05     ` Siva Durga Prasad Paladugu
  0 siblings, 0 replies; 12+ messages in thread
From: Siva Durga Prasad Paladugu @ 2018-07-10  4:05 UTC (permalink / raw)
  To: u-boot

Hi,


> -----Original Message-----
> From: Siva Durga Prasad Paladugu
> Sent: Tuesday, July 10, 2018 9:32 AM
> To: Grygorii Strashko <grygorii.strashko@ti.com>; u-boot at lists.denx.de
> Cc: joe.hershberger at ni.com; Michal Simek <michals@xilinx.com>
> Subject: RE: [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree
> 
> Hi,
> 
> > -----Original Message-----
> > From: Grygorii Strashko [mailto:grygorii.strashko at ti.com]
> > Sent: Monday, July 09, 2018 10:51 PM
> > To: Siva Durga Prasad Paladugu <sivadur@xilinx.com>; u-
> > boot at lists.denx.de
> > Cc: joe.hershberger at ni.com; Michal Simek <michals@xilinx.com>
> > Subject: Re: [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support
> > livetree
> >
> >
> >
> > On 07/06/2018 05:10 AM, Siva Durga Prasad Paladugu wrote:
> > > This patch adds support for livetree by using dev_.. calls instead
> > > of fdtdec_..
> > >
> > > Signed-off-by: Siva Durga Prasad Paladugu
> > > <siva.durga.paladugu@xilinx.com>
> > > ---
> > >   drivers/net/phy/ti.c | 16 +++++++---------
> > >   1 file changed, 7 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c index
> > > 8f3ed8a..945d9e9 100644
> > > --- a/drivers/net/phy/ti.c
> > > +++ b/drivers/net/phy/ti.c
> > > @@ -173,24 +173,22 @@ static int dp83867_of_init(struct phy_device
> > *phydev)
> > >   {
> > >   	struct dp83867_private *dp83867 = phydev->priv;
> > >   	struct udevice *dev = phydev->dev;
> > > -	int node = dev_of_offset(dev);
> > >   	const void *fdt = gd->fdt_blob;
> > >
> > > -	if (fdtdec_get_bool(fdt, node, "ti,max-output-impedance"))
> > > +	if (dev_read_bool(dev, "ti,max-output-impedance"))
> > >   		dp83867->io_impedance =
> > DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
> > > -	else if (fdtdec_get_bool(fdt, node, "ti,min-output-impedance"))
> > > +	else if (dev_read_bool(dev, "ti,min-output-impedance"))
> > >   		dp83867->io_impedance =
> > DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN;
> > >   	else
> > >   		dp83867->io_impedance = -EINVAL;
> > >
> > > -	dp83867->rx_id_delay = fdtdec_get_uint(gd->fdt_blob,
> > dev_of_offset(dev),
> > > -				 "ti,rx-internal-delay", -1);
> > > +	dp83867->rx_id_delay = dev_read_u32_default(dev, "ti,rx-internal-
> > delay",
> > > +						    -1);
> > >
> > > -	dp83867->tx_id_delay = fdtdec_get_uint(gd->fdt_blob,
> > dev_of_offset(dev),
> > > -				 "ti,tx-internal-delay", -1);
> > > +	dp83867->tx_id_delay = dev_read_u32_default(dev, "ti,tx-internal-
> > delay",
> > > +						    -1);
> > >
> > > -	dp83867->fifo_depth = fdtdec_get_uint(gd->fdt_blob,
> > dev_of_offset(dev),
> > > -				 "ti,fifo-depth", -1);
> > > +	dp83867->fifo_depth = dev_read_u32_default(dev, "ti,fifo-depth",
> > > +-1);
> > >
> > >   	return 0;
> > >   }
> > >
> >
> > NACK. Pls, check
> > https://patchwork.ozlabs.org/cover/936370/
> > and
> > https://patchwork.ozlabs.org/cover/936380/
> >
> > any comments, tested-by are very welcome.
> 
> Do you mean to say that this patch has to be rebased and tested on the top
> of your patch.

Oops, I missed your second thread(936380) and replied. 
Please ignore my last mail. 
I will review, test with your series and let you know if any.

Thanks,
Siva

> 
> Thanks,
> Siva
> 
> >
> > --
> > regards,
> > -grygorii

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree
  2018-07-06 10:10 ` [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree Siva Durga Prasad Paladugu
@ 2018-07-11 18:56   ` Joe Hershberger
  2018-07-16  9:01     ` Siva Durga Prasad Paladugu
  2018-07-16 12:40     ` Siva Durga Prasad Paladugu
  0 siblings, 2 replies; 12+ messages in thread
From: Joe Hershberger @ 2018-07-11 18:56 UTC (permalink / raw)
  To: u-boot

Hi Siva,

On Fri, Jul 6, 2018 at 5:10 AM, Siva Durga Prasad Paladugu
<siva.durga.paladugu@xilinx.com> wrote:
> This patch updates the zynq gem driver to support
> livetree.
>
> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
> ---
>  drivers/net/zynq_gem.c | 29 ++++++++++++++---------------
>  1 file changed, 14 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
> index a817f2e..b9858e4 100644
> --- a/drivers/net/zynq_gem.c
> +++ b/drivers/net/zynq_gem.c
> @@ -178,7 +178,7 @@ struct zynq_gem_priv {
>         struct zynq_gem_regs *iobase;
>         phy_interface_t interface;
>         struct phy_device *phydev;
> -       int phy_of_handle;
> +       ofnode phy_of_node;
>         struct mii_dev *bus;
>         struct clk clk;
>         u32 max_speed;
> @@ -349,8 +349,7 @@ static int zynq_phy_init(struct udevice *dev)
>
>         priv->phydev->advertising = priv->phydev->supported;
>
> -       if (priv->phy_of_handle > 0)
> -               dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle);
> +       priv->phydev->dev->node = priv->phy_of_node;
>
>         return phy_config(priv->phydev);
>  }
> @@ -693,21 +692,23 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
>  {
>         struct eth_pdata *pdata = dev_get_platdata(dev);
>         struct zynq_gem_priv *priv = dev_get_priv(dev);
> -       int node = dev_of_offset(dev);
> +       struct ofnode_phandle_args phandle_args;
>         const char *phy_mode;
>
> -       pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
> +       pdata->iobase = (phys_addr_t)dev_read_addr(dev);
>         priv->iobase = (struct zynq_gem_regs *)pdata->iobase;
>         /* Hardcode for now */
>         priv->phyaddr = -1;
>
> -       priv->phy_of_handle = fdtdec_lookup_phandle(gd->fdt_blob, node,
> -                                                   "phy-handle");
> -       if (priv->phy_of_handle > 0)
> -               priv->phyaddr = fdtdec_get_int(gd->fdt_blob,
> -                                       priv->phy_of_handle, "reg", -1);
> +       if (dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0,
> +                                      &phandle_args)) {
> +               debug("phy-handle does not exist %s\n", dev->name);
> +               return -ENOENT;
> +       }
>
> -       phy_mode = fdt_getprop(gd->fdt_blob, node, "phy-mode", NULL);
> +       priv->phyaddr = ofnode_read_u32_default(phandle_args.node, "reg", -1);
> +       priv->phy_of_node = phandle_args.node;
> +       phy_mode = dev_read_prop(dev, "phy-mode", NULL);

I want to make sure we are in sync here. I plan to take Grygorii's series.

Thanks!

>         if (phy_mode)
>                 pdata->phy_interface = phy_get_interface_by_name(phy_mode);
>         if (pdata->phy_interface == -1) {
> @@ -716,10 +717,8 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
>         }
>         priv->interface = pdata->phy_interface;
>
> -       priv->max_speed = fdtdec_get_uint(gd->fdt_blob, priv->phy_of_handle,
> -                                         "max-speed", SPEED_1000);
> -       priv->int_pcs = fdtdec_get_bool(gd->fdt_blob, node,
> -                                       "is-internal-pcspma");
> +       priv->max_speed = dev_read_u32_default(dev, "max-speed", SPEED_1000);
> +       priv->int_pcs = dev_read_bool(dev, "is-internal-pcspma");
>
>         printf("ZYNQ GEM: %lx, phyaddr %x, interface %s\n", (ulong)priv->iobase,
>                priv->phyaddr, phy_string_for_interface(priv->interface));
> --
> 2.7.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree
  2018-07-11 18:56   ` Joe Hershberger
@ 2018-07-16  9:01     ` Siva Durga Prasad Paladugu
  2018-07-16 12:40     ` Siva Durga Prasad Paladugu
  1 sibling, 0 replies; 12+ messages in thread
From: Siva Durga Prasad Paladugu @ 2018-07-16  9:01 UTC (permalink / raw)
  To: u-boot

Hi Joe,

> -----Original Message-----
> From: Joe Hershberger [mailto:joe.hershberger at ni.com]
> Sent: Thursday, July 12, 2018 12:26 AM
> To: Siva Durga Prasad Paladugu <sivadur@xilinx.com>; Grygorii Strashko
> <grygorii.strashko@ti.com>
> Cc: u-boot <u-boot@lists.denx.de>; Joe Hershberger
> <joe.hershberger@ni.com>; Michal Simek <michals@xilinx.com>; Vipul
> Kumar <vipulk@xilinx.com>
> Subject: Re: [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree
> 
> Hi Siva,
> 
> On Fri, Jul 6, 2018 at 5:10 AM, Siva Durga Prasad Paladugu
> <siva.durga.paladugu@xilinx.com> wrote:
> > This patch updates the zynq gem driver to support livetree.
> >
> > Signed-off-by: Siva Durga Prasad Paladugu
> > <siva.durga.paladugu@xilinx.com>
> > Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
> > ---
> >  drivers/net/zynq_gem.c | 29 ++++++++++++++---------------
> >  1 file changed, 14 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index
> > a817f2e..b9858e4 100644
> > --- a/drivers/net/zynq_gem.c
> > +++ b/drivers/net/zynq_gem.c
> > @@ -178,7 +178,7 @@ struct zynq_gem_priv {
> >         struct zynq_gem_regs *iobase;
> >         phy_interface_t interface;
> >         struct phy_device *phydev;
> > -       int phy_of_handle;
> > +       ofnode phy_of_node;
> >         struct mii_dev *bus;
> >         struct clk clk;
> >         u32 max_speed;
> > @@ -349,8 +349,7 @@ static int zynq_phy_init(struct udevice *dev)
> >
> >         priv->phydev->advertising = priv->phydev->supported;
> >
> > -       if (priv->phy_of_handle > 0)
> > -               dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle);
> > +       priv->phydev->dev->node = priv->phy_of_node;
> >
> >         return phy_config(priv->phydev);  } @@ -693,21 +692,23 @@
> > static int zynq_gem_ofdata_to_platdata(struct udevice *dev)  {
> >         struct eth_pdata *pdata = dev_get_platdata(dev);
> >         struct zynq_gem_priv *priv = dev_get_priv(dev);
> > -       int node = dev_of_offset(dev);
> > +       struct ofnode_phandle_args phandle_args;
> >         const char *phy_mode;
> >
> > -       pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
> > +       pdata->iobase = (phys_addr_t)dev_read_addr(dev);
> >         priv->iobase = (struct zynq_gem_regs *)pdata->iobase;
> >         /* Hardcode for now */
> >         priv->phyaddr = -1;
> >
> > -       priv->phy_of_handle = fdtdec_lookup_phandle(gd->fdt_blob, node,
> > -                                                   "phy-handle");
> > -       if (priv->phy_of_handle > 0)
> > -               priv->phyaddr = fdtdec_get_int(gd->fdt_blob,
> > -                                       priv->phy_of_handle, "reg", -1);
> > +       if (dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0,
> > +                                      &phandle_args)) {
> > +               debug("phy-handle does not exist %s\n", dev->name);
> > +               return -ENOENT;
> > +       }
> >
> > -       phy_mode = fdt_getprop(gd->fdt_blob, node, "phy-mode", NULL);
> > +       priv->phyaddr = ofnode_read_u32_default(phandle_args.node,
> "reg", -1);
> > +       priv->phy_of_node = phandle_args.node;
> > +       phy_mode = dev_read_prop(dev, "phy-mode", NULL);
> 
> I want to make sure we are in sync here. I plan to take Grygorii's series.
> 
> Thanks!

Thanks for informing. No problem, I will make changes as per Grygorii's series and will test it sometime this week.

Thanks,
Siva

> 
> >         if (phy_mode)
> >                 pdata->phy_interface =
> phy_get_interface_by_name(phy_mode);
> >         if (pdata->phy_interface == -1) { @@ -716,10 +717,8 @@ static
> > int zynq_gem_ofdata_to_platdata(struct udevice *dev)
> >         }
> >         priv->interface = pdata->phy_interface;
> >
> > -       priv->max_speed = fdtdec_get_uint(gd->fdt_blob, priv-
> >phy_of_handle,
> > -                                         "max-speed", SPEED_1000);
> > -       priv->int_pcs = fdtdec_get_bool(gd->fdt_blob, node,
> > -                                       "is-internal-pcspma");
> > +       priv->max_speed = dev_read_u32_default(dev, "max-speed",
> SPEED_1000);
> > +       priv->int_pcs = dev_read_bool(dev, "is-internal-pcspma");
> >
> >         printf("ZYNQ GEM: %lx, phyaddr %x, interface %s\n", (ulong)priv-
> >iobase,
> >                priv->phyaddr,
> > phy_string_for_interface(priv->interface));
> > --
> > 2.7.4
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree
  2018-07-11 18:56   ` Joe Hershberger
  2018-07-16  9:01     ` Siva Durga Prasad Paladugu
@ 2018-07-16 12:40     ` Siva Durga Prasad Paladugu
  2018-07-16 20:47       ` Joe Hershberger
  1 sibling, 1 reply; 12+ messages in thread
From: Siva Durga Prasad Paladugu @ 2018-07-16 12:40 UTC (permalink / raw)
  To: u-boot

HI Joe,

> -----Original Message-----
> From: Siva Durga Prasad Paladugu
> Sent: Monday, July 16, 2018 2:32 PM
> To: 'joe.hershberger at ni.com' <joe.hershberger@ni.com>; Grygorii Strashko
> <grygorii.strashko@ti.com>
> Cc: u-boot <u-boot@lists.denx.de>; Michal Simek <michals@xilinx.com>;
> Vipul Kumar <vipulk@xilinx.com>
> Subject: RE: [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree
> 
> Hi Joe,
> 
> > -----Original Message-----
> > From: Joe Hershberger [mailto:joe.hershberger at ni.com]
> > Sent: Thursday, July 12, 2018 12:26 AM
> > To: Siva Durga Prasad Paladugu <sivadur@xilinx.com>; Grygorii Strashko
> > <grygorii.strashko@ti.com>
> > Cc: u-boot <u-boot@lists.denx.de>; Joe Hershberger
> > <joe.hershberger@ni.com>; Michal Simek <michals@xilinx.com>; Vipul
> > Kumar <vipulk@xilinx.com>
> > Subject: Re: [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use
> > livetree
> >
> > Hi Siva,
> >
> > On Fri, Jul 6, 2018 at 5:10 AM, Siva Durga Prasad Paladugu
> > <siva.durga.paladugu@xilinx.com> wrote:
> > > This patch updates the zynq gem driver to support livetree.
> > >
> > > Signed-off-by: Siva Durga Prasad Paladugu
> > > <siva.durga.paladugu@xilinx.com>
> > > Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
> > > ---
> > >  drivers/net/zynq_gem.c | 29 ++++++++++++++---------------
> > >  1 file changed, 14 insertions(+), 15 deletions(-)
> > >
> > > diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index
> > > a817f2e..b9858e4 100644
> > > --- a/drivers/net/zynq_gem.c
> > > +++ b/drivers/net/zynq_gem.c
> > > @@ -178,7 +178,7 @@ struct zynq_gem_priv {
> > >         struct zynq_gem_regs *iobase;
> > >         phy_interface_t interface;
> > >         struct phy_device *phydev;
> > > -       int phy_of_handle;
> > > +       ofnode phy_of_node;
> > >         struct mii_dev *bus;
> > >         struct clk clk;
> > >         u32 max_speed;
> > > @@ -349,8 +349,7 @@ static int zynq_phy_init(struct udevice *dev)
> > >
> > >         priv->phydev->advertising = priv->phydev->supported;
> > >
> > > -       if (priv->phy_of_handle > 0)
> > > -               dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle);
> > > +       priv->phydev->dev->node = priv->phy_of_node;
> > >
> > >         return phy_config(priv->phydev);  } @@ -693,21 +692,23 @@
> > > static int zynq_gem_ofdata_to_platdata(struct udevice *dev)  {
> > >         struct eth_pdata *pdata = dev_get_platdata(dev);
> > >         struct zynq_gem_priv *priv = dev_get_priv(dev);
> > > -       int node = dev_of_offset(dev);
> > > +       struct ofnode_phandle_args phandle_args;
> > >         const char *phy_mode;
> > >
> > > -       pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
> > > +       pdata->iobase = (phys_addr_t)dev_read_addr(dev);
> > >         priv->iobase = (struct zynq_gem_regs *)pdata->iobase;
> > >         /* Hardcode for now */
> > >         priv->phyaddr = -1;
> > >
> > > -       priv->phy_of_handle = fdtdec_lookup_phandle(gd->fdt_blob,
> node,
> > > -                                                   "phy-handle");
> > > -       if (priv->phy_of_handle > 0)
> > > -               priv->phyaddr = fdtdec_get_int(gd->fdt_blob,
> > > -                                       priv->phy_of_handle, "reg", -1);
> > > +       if (dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0,
> > > +                                      &phandle_args)) {
> > > +               debug("phy-handle does not exist %s\n", dev->name);
> > > +               return -ENOENT;
> > > +       }
> > >
> > > -       phy_mode = fdt_getprop(gd->fdt_blob, node, "phy-mode", NULL);
> > > +       priv->phyaddr = ofnode_read_u32_default(phandle_args.node,
> > "reg", -1);
> > > +       priv->phy_of_node = phandle_args.node;
> > > +       phy_mode = dev_read_prop(dev, "phy-mode", NULL);
> >
> > I want to make sure we are in sync here. I plan to take Grygorii's series.
> >
> > Thanks!
> 
> Thanks for informing. No problem, I will make changes as per Grygorii's
> series and will test it sometime this week.

I tested by applying both series on ZynqMP zcu102 board(it has ti phy) and its working fine.
I also tested by modifying the zynq_gem to support live tree for which I will be sending patch soon.

Grygorii,
You can add my tested-by to TI phy and zynq_gem patches in your series.
Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

Thanks,
Siva

> 
> Thanks,
> Siva
> 
> >
> > >         if (phy_mode)
> > >                 pdata->phy_interface =
> > phy_get_interface_by_name(phy_mode);
> > >         if (pdata->phy_interface == -1) { @@ -716,10 +717,8 @@
> > > static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
> > >         }
> > >         priv->interface = pdata->phy_interface;
> > >
> > > -       priv->max_speed = fdtdec_get_uint(gd->fdt_blob, priv-
> > >phy_of_handle,
> > > -                                         "max-speed", SPEED_1000);
> > > -       priv->int_pcs = fdtdec_get_bool(gd->fdt_blob, node,
> > > -                                       "is-internal-pcspma");
> > > +       priv->max_speed = dev_read_u32_default(dev, "max-speed",
> > SPEED_1000);
> > > +       priv->int_pcs = dev_read_bool(dev, "is-internal-pcspma");
> > >
> > >         printf("ZYNQ GEM: %lx, phyaddr %x, interface %s\n",
> > >(ulong)priv- iobase,
> > >                priv->phyaddr,
> > > phy_string_for_interface(priv->interface));
> > > --
> > > 2.7.4
> > >
> > > _______________________________________________
> > > U-Boot mailing list
> > > U-Boot at lists.denx.de
> > > https://lists.denx.de/listinfo/u-boot

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree
  2018-07-16 12:40     ` Siva Durga Prasad Paladugu
@ 2018-07-16 20:47       ` Joe Hershberger
  0 siblings, 0 replies; 12+ messages in thread
From: Joe Hershberger @ 2018-07-16 20:47 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 16, 2018 at 7:40 AM, Siva Durga Prasad Paladugu
<sivadur@xilinx.com> wrote:
> HI Joe,
>
>> -----Original Message-----
>> From: Siva Durga Prasad Paladugu
>> Sent: Monday, July 16, 2018 2:32 PM
>> To: 'joe.hershberger at ni.com' <joe.hershberger@ni.com>; Grygorii Strashko
>> <grygorii.strashko@ti.com>
>> Cc: u-boot <u-boot@lists.denx.de>; Michal Simek <michals@xilinx.com>;
>> Vipul Kumar <vipulk@xilinx.com>
>> Subject: RE: [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree
>>
>> Hi Joe,
>>
>> > -----Original Message-----
>> > From: Joe Hershberger [mailto:joe.hershberger at ni.com]
>> > Sent: Thursday, July 12, 2018 12:26 AM
>> > To: Siva Durga Prasad Paladugu <sivadur@xilinx.com>; Grygorii Strashko
>> > <grygorii.strashko@ti.com>
>> > Cc: u-boot <u-boot@lists.denx.de>; Joe Hershberger
>> > <joe.hershberger@ni.com>; Michal Simek <michals@xilinx.com>; Vipul
>> > Kumar <vipulk@xilinx.com>
>> > Subject: Re: [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use
>> > livetree
>> >
>> > Hi Siva,
>> >
>> > On Fri, Jul 6, 2018 at 5:10 AM, Siva Durga Prasad Paladugu
>> > <siva.durga.paladugu@xilinx.com> wrote:
>> > > This patch updates the zynq gem driver to support livetree.
>> > >
>> > > Signed-off-by: Siva Durga Prasad Paladugu
>> > > <siva.durga.paladugu@xilinx.com>
>> > > Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
>> > > ---
>> > >  drivers/net/zynq_gem.c | 29 ++++++++++++++---------------
>> > >  1 file changed, 14 insertions(+), 15 deletions(-)
>> > >
>> > > diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index
>> > > a817f2e..b9858e4 100644
>> > > --- a/drivers/net/zynq_gem.c
>> > > +++ b/drivers/net/zynq_gem.c
>> > > @@ -178,7 +178,7 @@ struct zynq_gem_priv {
>> > >         struct zynq_gem_regs *iobase;
>> > >         phy_interface_t interface;
>> > >         struct phy_device *phydev;
>> > > -       int phy_of_handle;
>> > > +       ofnode phy_of_node;
>> > >         struct mii_dev *bus;
>> > >         struct clk clk;
>> > >         u32 max_speed;
>> > > @@ -349,8 +349,7 @@ static int zynq_phy_init(struct udevice *dev)
>> > >
>> > >         priv->phydev->advertising = priv->phydev->supported;
>> > >
>> > > -       if (priv->phy_of_handle > 0)
>> > > -               dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle);
>> > > +       priv->phydev->dev->node = priv->phy_of_node;
>> > >
>> > >         return phy_config(priv->phydev);  } @@ -693,21 +692,23 @@
>> > > static int zynq_gem_ofdata_to_platdata(struct udevice *dev)  {
>> > >         struct eth_pdata *pdata = dev_get_platdata(dev);
>> > >         struct zynq_gem_priv *priv = dev_get_priv(dev);
>> > > -       int node = dev_of_offset(dev);
>> > > +       struct ofnode_phandle_args phandle_args;
>> > >         const char *phy_mode;
>> > >
>> > > -       pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
>> > > +       pdata->iobase = (phys_addr_t)dev_read_addr(dev);
>> > >         priv->iobase = (struct zynq_gem_regs *)pdata->iobase;
>> > >         /* Hardcode for now */
>> > >         priv->phyaddr = -1;
>> > >
>> > > -       priv->phy_of_handle = fdtdec_lookup_phandle(gd->fdt_blob,
>> node,
>> > > -                                                   "phy-handle");
>> > > -       if (priv->phy_of_handle > 0)
>> > > -               priv->phyaddr = fdtdec_get_int(gd->fdt_blob,
>> > > -                                       priv->phy_of_handle, "reg", -1);
>> > > +       if (dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0,
>> > > +                                      &phandle_args)) {
>> > > +               debug("phy-handle does not exist %s\n", dev->name);
>> > > +               return -ENOENT;
>> > > +       }
>> > >
>> > > -       phy_mode = fdt_getprop(gd->fdt_blob, node, "phy-mode", NULL);
>> > > +       priv->phyaddr = ofnode_read_u32_default(phandle_args.node,
>> > "reg", -1);
>> > > +       priv->phy_of_node = phandle_args.node;
>> > > +       phy_mode = dev_read_prop(dev, "phy-mode", NULL);
>> >
>> > I want to make sure we are in sync here. I plan to take Grygorii's series.
>> >
>> > Thanks!
>>
>> Thanks for informing. No problem, I will make changes as per Grygorii's
>> series and will test it sometime this week.
>
> I tested by applying both series on ZynqMP zcu102 board(it has ti phy) and its working fine.
> I also tested by modifying the zynq_gem to support live tree for which I will be sending patch soon.
>
> Grygorii,
> You can add my tested-by to TI phy and zynq_gem patches in your series.
> Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

Added.

> Thanks,
> Siva
>
>>
>> Thanks,
>> Siva
>>
>> >
>> > >         if (phy_mode)
>> > >                 pdata->phy_interface =
>> > phy_get_interface_by_name(phy_mode);
>> > >         if (pdata->phy_interface == -1) { @@ -716,10 +717,8 @@
>> > > static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
>> > >         }
>> > >         priv->interface = pdata->phy_interface;
>> > >
>> > > -       priv->max_speed = fdtdec_get_uint(gd->fdt_blob, priv-
>> > >phy_of_handle,
>> > > -                                         "max-speed", SPEED_1000);
>> > > -       priv->int_pcs = fdtdec_get_bool(gd->fdt_blob, node,
>> > > -                                       "is-internal-pcspma");
>> > > +       priv->max_speed = dev_read_u32_default(dev, "max-speed",
>> > SPEED_1000);
>> > > +       priv->int_pcs = dev_read_bool(dev, "is-internal-pcspma");
>> > >
>> > >         printf("ZYNQ GEM: %lx, phyaddr %x, interface %s\n",
>> > >(ulong)priv- iobase,
>> > >                priv->phyaddr,
>> > > phy_string_for_interface(priv->interface));
>> > > --
>> > > 2.7.4
>> > >
>> > > _______________________________________________
>> > > U-Boot mailing list
>> > > U-Boot at lists.denx.de
>> > > https://lists.denx.de/listinfo/u-boot
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-07-16 20:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-06 10:10 [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree Siva Durga Prasad Paladugu
2018-07-06 10:10 ` [U-Boot] [PATCH 2/3] net: phy: xilinx_phy: Add suuport for livetree Siva Durga Prasad Paladugu
2018-07-09  8:48   ` Michal Simek
2018-07-09 17:22   ` Grygorii Strashko
2018-07-06 10:10 ` [U-Boot] [PATCH 3/3] net: zynq_gem: convert to use livetree Siva Durga Prasad Paladugu
2018-07-11 18:56   ` Joe Hershberger
2018-07-16  9:01     ` Siva Durga Prasad Paladugu
2018-07-16 12:40     ` Siva Durga Prasad Paladugu
2018-07-16 20:47       ` Joe Hershberger
2018-07-09 17:20 ` [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree Grygorii Strashko
2018-07-10  4:01   ` Siva Durga Prasad Paladugu
2018-07-10  4:05     ` Siva Durga Prasad Paladugu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.