Message ID | 20210302153451.19440-3-bmeng.cn@gmail.com |
---|---|
State | Superseded |
Delegated to: | Priyanka Jain |
Headers | show |
Series | ppc: qemu: Add eTSEC support | expand |
Hi Bin, On Tue, Mar 02, 2021 at 11:34:33PM +0800, Bin Meng wrote: > Use ofnode_ APIs instead of fdt_ APIs so that the Xilinx PHY driver > can support live DT. > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > --- Nice to see you work on this, but did you see my patches? https://patchwork.ozlabs.org/project/uboot/patch/20210216224804.3355044-2-olteanv@gmail.com/
On Tue, Mar 2, 2021 at 5:35 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > Use ofnode_ APIs instead of fdt_ APIs so that the Xilinx PHY driver > can support live DT. > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > --- > > drivers/net/phy/phy.c | 19 +++++++------------ > 1 file changed, 7 insertions(+), 12 deletions(-) > > diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c > index d9e03baf7b..f0522fc149 100644 > --- a/drivers/net/phy/phy.c > +++ b/drivers/net/phy/phy.c > @@ -947,23 +947,18 @@ static struct phy_device *phy_connect_gmii2rgmii(struct mii_dev *bus, > phy_interface_t interface) > { > struct phy_device *phydev = NULL; > - int sn = dev_of_offset(dev); > - int off; > + ofnode node = dev_ofnode(dev); > > - while (sn > 0) { > - off = fdt_node_offset_by_compatible(gd->fdt_blob, sn, > - "xlnx,gmii-to-rgmii-1.0"); > - if (off > 0) { > - phydev = phy_device_create(bus, off, > + while (ofnode_valid(node)) { > + node = ofnode_by_compatible(node, "xlnx,gmii-to-rgmii-1.0"); > + if (ofnode_valid(node)) { > + phydev = phy_device_create(bus, ofnode_to_offset(node), > PHY_GMII2RGMII_ID, false, > interface); > break; > } > - if (off == -FDT_ERR_NOTFOUND) > - sn = fdt_first_subnode(gd->fdt_blob, sn); > - else > - printf("%s: Error finding compat string:%d\n", > - __func__, off); > + > + node = ofnode_first_subnode(node); > } > > return phydev; > -- > 2.25.1 > Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
Hi Vladimir, On Tue, Mar 2, 2021 at 11:40 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote: > > Hi Bin, > > On Tue, Mar 02, 2021 at 11:34:33PM +0800, Bin Meng wrote: > > Use ofnode_ APIs instead of fdt_ APIs so that the Xilinx PHY driver > > can support live DT. > > > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > > --- > > Nice to see you work on this, but did you see my patches? I apparently missed your patches. > https://patchwork.ozlabs.org/project/uboot/patch/20210216224804.3355044-2-olteanv@gmail.com/ It looks that I need to rebase my series on top of yours? Regards, Bin
On Thu, Mar 04, 2021 at 01:36:45PM +0800, Bin Meng wrote:
> It looks that I need to rebase my series on top of yours?
That would be nice, thank you. It would also create some sort of
incentive to finally get my patches accepted or at least looked at, they
are in the 'Needs Review/Ack' state, you seem to be quite the adequate
person for that :)
Hi Vladimir, On Fri, Mar 5, 2021 at 7:05 AM Vladimir Oltean <vladimir.oltean@nxp.com> wrote: > > On Thu, Mar 04, 2021 at 01:36:45PM +0800, Bin Meng wrote: > > It looks that I need to rebase my series on top of yours? > > That would be nice, thank you. It would also create some sort of > incentive to finally get my patches accepted or at least looked at, they > are in the 'Needs Review/Ack' state, you seem to be quite the adequate > person for that :) I want to include your series as part of my v2 series, to remove dependencies for different maintainers. Are you okay with this? Regards, Bin
On Thu, Mar 11, 2021 at 06:33:39PM +0800, Bin Meng wrote: > Hi Vladimir, > > On Fri, Mar 5, 2021 at 7:05 AM Vladimir Oltean <vladimir.oltean@nxp.com> wrote: > > > > On Thu, Mar 04, 2021 at 01:36:45PM +0800, Bin Meng wrote: > > > It looks that I need to rebase my series on top of yours? > > > > That would be nice, thank you. It would also create some sort of > > incentive to finally get my patches accepted or at least looked at, they > > are in the 'Needs Review/Ack' state, you seem to be quite the adequate > > person for that :) > > I want to include your series as part of my v2 series, to remove > dependencies for different maintainers. > > Are you okay with this? > > Regards, > Bin Priyanka already merged your series and sent the pull request to Tom, frankly I don't think there's anything more for you to do.
Hi Vladimir, On Thu, Mar 11, 2021 at 6:37 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote: > > On Thu, Mar 11, 2021 at 06:33:39PM +0800, Bin Meng wrote: > > Hi Vladimir, > > > > On Fri, Mar 5, 2021 at 7:05 AM Vladimir Oltean <vladimir.oltean@nxp.com> wrote: > > > > > > On Thu, Mar 04, 2021 at 01:36:45PM +0800, Bin Meng wrote: > > > > It looks that I need to rebase my series on top of yours? > > > > > > That would be nice, thank you. It would also create some sort of > > > incentive to finally get my patches accepted or at least looked at, they > > > are in the 'Needs Review/Ack' state, you seem to be quite the adequate > > > person for that :) > > > > I want to include your series as part of my v2 series, to remove > > dependencies for different maintainers. > > > > Are you okay with this? > > > > Regards, > > Bin > > Priyanka already merged your series and sent the pull request to Tom, > frankly I don't think there's anything more for you to do. I did not see that. Did you mean the previous qemu ppc series? Regards, Bin
On Thu, Mar 11, 2021 at 06:58:33PM +0800, Bin Meng wrote: > Hi Vladimir, > > On Thu, Mar 11, 2021 at 6:37 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote: > > > > On Thu, Mar 11, 2021 at 06:33:39PM +0800, Bin Meng wrote: > > > Hi Vladimir, > > > > > > On Fri, Mar 5, 2021 at 7:05 AM Vladimir Oltean <vladimir.oltean@nxp.com> wrote: > > > > > > > > On Thu, Mar 04, 2021 at 01:36:45PM +0800, Bin Meng wrote: > > > > > It looks that I need to rebase my series on top of yours? > > > > > > > > That would be nice, thank you. It would also create some sort of > > > > incentive to finally get my patches accepted or at least looked at, they > > > > are in the 'Needs Review/Ack' state, you seem to be quite the adequate > > > > person for that :) > > > > > > I want to include your series as part of my v2 series, to remove > > > dependencies for different maintainers. > > > > > > Are you okay with this? > > > > > > Regards, > > > Bin > > > > Priyanka already merged your series and sent the pull request to Tom, > > frankly I don't think there's anything more for you to do. > > I did not see that. Did you mean the previous qemu ppc series? Ah, the series for the eTSEC in QEMU was different than the one for e500? Ok, in that case I'm wrong, your networking patches were not merged yet. If you could pick up my patches that would be nice. Let me know if there's anything I can help with.
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index d9e03baf7b..f0522fc149 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -947,23 +947,18 @@ static struct phy_device *phy_connect_gmii2rgmii(struct mii_dev *bus, phy_interface_t interface) { struct phy_device *phydev = NULL; - int sn = dev_of_offset(dev); - int off; + ofnode node = dev_ofnode(dev); - while (sn > 0) { - off = fdt_node_offset_by_compatible(gd->fdt_blob, sn, - "xlnx,gmii-to-rgmii-1.0"); - if (off > 0) { - phydev = phy_device_create(bus, off, + while (ofnode_valid(node)) { + node = ofnode_by_compatible(node, "xlnx,gmii-to-rgmii-1.0"); + if (ofnode_valid(node)) { + phydev = phy_device_create(bus, ofnode_to_offset(node), PHY_GMII2RGMII_ID, false, interface); break; } - if (off == -FDT_ERR_NOTFOUND) - sn = fdt_first_subnode(gd->fdt_blob, sn); - else - printf("%s: Error finding compat string:%d\n", - __func__, off); + + node = ofnode_first_subnode(node); } return phydev;
Use ofnode_ APIs instead of fdt_ APIs so that the Xilinx PHY driver can support live DT. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- drivers/net/phy/phy.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)