[U-Boot] [RFC PATCH v3 0/14] Add Driver Model support to network stack
Joe Hershberger
joe.hershberger at ni.com
Wed Feb 11 02:30:19 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.
I've now added unit tests to verify functionality.
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 v3:
-Add seq patch to dm core
-Reorder dm test makefile
-Move the get_dev_by_* protos to also be !DM_ETH like the impl
-Correct the pre_unbind logic
-Correct failure chaining from bind to probe to init
--Fail init if not activated
--Fail probe if ethaddr not set
-Update ethaddr from env unconditionally on init
-Use set current to select the current device regardless of the previous selection
-Allow current eth dev to be NULL
-Fixed blank line formatting for variable declaration
-Added 2 more ethaddr to sandbox
-Print which device in the debug write hwaddr
-Prevent a crash if memory is not allocated
-Added dm eth testing
-Added support for aliases
-Added support for ethprime
-Added testing for netretry
-Made the os raw packet support for sandbox eth build and work.
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 (14):
dm: core: Allow seq numbers to be resolved before probe
test: dm: Reorder the objects to build
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
dm: eth: Add basic driver model support to Ethernet stack
dm: eth: Add network support to sandbox
dm: eth: Add ARP and PING response to sandbox driver
test: dm: eth: Add tests for the eth dm implementation
dm: eth: Add support for aliases
dm: eth: Add support for ethprime env var
dm: eth: Add testing for netretry env var
dm: eth: Add a bridge to a real network for sandbox
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 | 11 +
arch/sandbox/include/asm/sandbox-raw-os.h | 16 +
common/board_r.c | 4 +-
common/cmd_bdinfo.c | 2 +
drivers/core/uclass.c | 4 +-
drivers/net/Makefile | 12 +
drivers/net/sandbox-raw-os.c | 105 +++++++
drivers/net/sandbox-raw.c | 128 ++++++++
drivers/net/sandbox.c | 187 ++++++++++++
include/configs/sandbox.h | 19 +-
include/dm/uclass-id.h | 1 +
include/fdtdec.h | 1 +
include/net.h | 164 +++++++----
lib/fdtdec.c | 1 +
net/eth.c | 474 ++++++++++++++++++++++++++----
net/net.c | 2 +-
test/dm/Makefile | 5 +-
test/dm/eth.c | 110 +++++++
test/dm/test.dts | 20 ++
23 files changed, 1146 insertions(+), 128 deletions(-)
create mode 100644 arch/sandbox/include/asm/sandbox-raw-os.h
create mode 100644 drivers/net/sandbox-raw-os.c
create mode 100644 drivers/net/sandbox-raw.c
create mode 100644 drivers/net/sandbox.c
create mode 100644 test/dm/eth.c
--
1.7.11.5
More information about the U-Boot
mailing list