[U-Boot] [PATCH v5 0/3] Add helper function for linking a DM Eth device to a PHY

Alex Marginean alexandru.marginean at nxp.com
Mon Nov 25 15:15:10 UTC 2019


The patch set introduces dm_eth_phy_connect which takes in an ethernet device
and uses DT information to find the associated PHY and connect the Ethernet
interface to it.  This should simplify similar code in ethernet drivers.

I've dropped the new binding for scanning an MDIO bus, I'll look into reworking
that to match the behavior in Linux.  The changes are more extensive though and
I plan to do that in a separate submission.

Finally the patch set updates fsl_enetc driver to use the new helper function
reducing the code by about 30 lines.

This patch set supersedes v3 series:
https://patchwork.ozlabs.org/project/uboot/list/?series=140114
and v4 series:
https://patchwork.ozlabs.org/project/uboot/list/?series=142858

Changes in v5:
 - drop mdio-handle binding
 - support alternative/obsolete bindings (like 'phy', 'phy-device')

Changes in v4:
 - rebased on current head

Changes in v3:
 - added cover letter
 - check for null PHY pointer before using it in dm_eth_connect_phy_handle
 - moved the code dealing with MDIO scanning into a separate patch
 - renames several arguments and variables for a bit more clarity and
   consistency

Changes in v2:
- Moved MDIO scan code into dm_mdio_phy_scan which is also exported
- Use interface instead of if_type for consistency
- don't use phy pointer if NULL in fsl_enetc code


Alex Marginean (3):
  net: mdio-uclass: rename arguments of dm_mdio_phy_connect for clarity
  net: mdio-uclass: add dm_eth_phy_connect helper function
  drivers: net: fsl_enetc: use the new MDIO DM helper functions

 drivers/net/fsl_enetc.c |  53 ++++-----------------
 drivers/net/fsl_enetc.h |   1 +
 include/miiphy.h        |  18 +++++--
 net/mdio-uclass.c       | 102 ++++++++++++++++++++++++++++++++++++++--
 4 files changed, 122 insertions(+), 52 deletions(-)

-- 
2.17.1



More information about the U-Boot mailing list