[U-Boot] [PATCH v2 0/6] Universal PHY Infrastructure

Andy Fleming afleming at freescale.com
Tue Apr 5 23:59:48 CEST 2011


Or PHY Lib for U-Boot.

This sequence of patches adds infrastructure for universally-available PHY
drivers (and MDIO drivers).  It piggy-backs on the existing miiphy code, for
backwards compatibility, but it also creates a new set of APIs. This was
necessary partly to provide cleaner interfaces for more robust driver
support, and partly because one goal was to support 10G (802.3 Clause 45) MDIO
buses, which has an extra argument for addressing PHY registers.

The first three patches clear the way, and are in this sequence mostly
because the tsec changes depend on them.

Special thanks goes to Mingkai Hu, who did a substantial amount
of work up front to convert the tsec PHY code into something more usable,
which I have mostly copied for the purposes of PHY Lib.

As the subject says, these are submitted here for comment.  I hope they
will go in for the presumptive June release.

This second version cleans up all checkpatch errors that I reasonably could,
and addresses most of the comments from the first round of reviews.

I have removed the mdio command patch, as I want to rework it a bit, and it's
not currently necessary unless you want to interact with a 10G PHY from the
command line.  I should submit a new version of that, soon.

I also got Kumar to remove the tsec patches I reworked slightly from his tree, so that these can go in without conflict.


Andy Fleming (4):
  Remove instances of phy_read/write
  Create PHY Lib for U-Boot
  phylib: Add a bunch of PHY drivers from tsec
  tsec: Convert tsec to use PHY Lib

Mingkai Hu (2):
  tsec: use IO accessors for IO accesses
  tsec: arrange the code to avoid useless function declaration

 arch/powerpc/include/asm/config.h         |    7 +
 arch/powerpc/include/asm/fsl_enet.h       |   10 +
 board/freescale/mpc837xemds/mpc837xemds.c |    7 +
 board/freescale/mpc8536ds/mpc8536ds.c     |    6 +
 board/freescale/mpc8544ds/mpc8544ds.c     |   30 +
 board/freescale/mpc8572ds/mpc8572ds.c     |    6 +
 board/freescale/p1022ds/p1022ds.c         |    6 +
 board/freescale/p1_p2_rdb/p1_p2_rdb.c     |    6 +
 board/freescale/p2020ds/p2020ds.c         |    7 +
 common/Makefile                           |    1 +
 common/miiphyutil.c                       |  308 +++--
 drivers/net/Makefile                      |    2 +-
 drivers/net/dm9000x.c                     |   18 +-
 drivers/net/enc28j60.c                    |   24 +-
 drivers/net/fsl_mdio.c                    |  120 ++
 drivers/net/phy/Makefile                  |   12 +
 drivers/net/phy/atheros.c                 |   48 +
 drivers/net/phy/broadcom.c                |  286 +++++
 drivers/net/phy/davicom.c                 |   98 ++
 drivers/net/phy/lxt.c                     |   87 ++
 drivers/net/phy/marvell.c                 |  376 ++++++
 drivers/net/phy/micrel.c                  |   40 +
 drivers/net/phy/natsemi.c                 |   96 ++
 drivers/net/phy/phy.c                     |  750 +++++++++++
 drivers/net/phy/realtek.c                 |  130 ++
 drivers/net/phy/teranetics.c              |   54 +
 drivers/net/phy/vitesse.c                 |  242 ++++
 drivers/net/tsec.c                        | 1992 ++++-------------------------
 drivers/net/uli526x.c                     |   24 +-
 drivers/qe/uec.c                          |    3 -
 drivers/qe/uec_phy.c                      |  145 ++-
 include/fsl_mdio.h                        |   62 +
 include/miiphy.h                          |   67 +-
 include/phy.h                             |  500 ++++++++
 include/phylib_all_drivers.h              |   25 +
 include/tsec.h                            |  302 +----
 net/eth.c                                 |    6 +
 37 files changed, 3693 insertions(+), 2210 deletions(-)
 create mode 100644 drivers/net/fsl_mdio.c
 create mode 100644 drivers/net/phy/atheros.c
 create mode 100644 drivers/net/phy/broadcom.c
 create mode 100644 drivers/net/phy/davicom.c
 create mode 100644 drivers/net/phy/lxt.c
 create mode 100644 drivers/net/phy/marvell.c
 create mode 100644 drivers/net/phy/micrel.c
 create mode 100644 drivers/net/phy/natsemi.c
 create mode 100644 drivers/net/phy/phy.c
 create mode 100644 drivers/net/phy/realtek.c
 create mode 100644 drivers/net/phy/teranetics.c
 create mode 100644 drivers/net/phy/vitesse.c
 create mode 100644 include/fsl_mdio.h
 create mode 100644 include/phy.h
 create mode 100644 include/phylib_all_drivers.h




More information about the U-Boot mailing list