[U-Boot] [RFC PATCH v2 0/8] Add Driver Model support to network stack

Joe Hershberger joe.hershberger at ni.com
Tue Feb 3 01:38:37 CET 2015


For now this simply addresses the MAC part of the network hardware.
The next part to implement is the PHY children.  I wanted to get early
feedback on what I have so far to make sure I'm going in the direction
that Simon envisioned.

Added an additional patch that I've been playing with to allow actual
networking from within sandbox, but I haven't come across a good way
to make it build in the u-boot build system. Any good ideas are welcome.

Changes in v2:
-Updated comments
-Removed extra parentheses
-Changed eth_uclass_priv local var names to be uc_priv
-Update error codes
-Cause an invalid name to fail binding
-Rebase on top of dm/master
-Stop maintaining our own index and use DM seq now that it works for our needs
-Move the hwaddr to platdata so that its memory is allocated at bind when we need it
-Prevent device from being probed before used by a command (i.e. before eth_init()).
-Change printfs to debug in sandbox driver
-Remove unused priv struct for sandbox driver
-Change printfs to debug in sandbox driver
-Move static data to priv
-Move fake hwaddr to the device tree
-Added the raw packet proof-of-concept patch.

Joe Hershberger (8):
  net: Provide a function to get the current MAC address
  net: Rename helper function to be more clear
  net: Remove unneeded "extern" in net.h
  net: Refactor in preparation for driver model
  net: Add basic driver model support to Ethernet stack
  net: Add network support to sandbox
  net: Add ARP and PING response to sandbox driver
  net: Add actual networking support to sandbox's driver

 arch/mips/cpu/mips32/au1x00/au1x00_eth.c |   2 +-
 arch/powerpc/cpu/mpc8260/ether_fcc.c     |   2 +-
 arch/powerpc/cpu/mpc85xx/ether_fcc.c     |   2 +-
 arch/powerpc/cpu/mpc8xx/scc.c            |   2 +-
 arch/sandbox/dts/sandbox.dts             |   5 +
 common/board_r.c                         |   4 +-
 common/cmd_bdinfo.c                      |   2 +
 drivers/net/Makefile                     |   2 +
 drivers/net/sandbox-raw.c                |  60 +++++
 drivers/net/sandbox.c                    | 204 ++++++++++++++++
 include/configs/sandbox.h                |  14 +-
 include/dm/uclass-id.h                   |   1 +
 include/net.h                            | 159 +++++++-----
 net/eth.c                                | 407 +++++++++++++++++++++++++++----
 net/net.c                                |   2 +-
 15 files changed, 748 insertions(+), 120 deletions(-)
 create mode 100644 drivers/net/sandbox-raw.c
 create mode 100644 drivers/net/sandbox.c

-- 
1.7.11.5



More information about the U-Boot mailing list