diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-08-09 15:49:51 +0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-25 08:18:58 +0200 |
commit | 2263e27814f1db83745a9e65c373c957307c36a0 (patch) | |
tree | e0ce1c1acaef410531018e0d390854194ef91478 /include/net.h | |
parent | 26eab97b41da45353300d447870fe1c7fbfe7542 (diff) | |
download | barebox-2263e27814f1db83745a9e65c373c957307c36a0.tar.gz barebox-2263e27814f1db83745a9e65c373c957307c36a0.tar.xz |
net: introduce phylib
Adapt phylib from linux
switch all the driver to it
reimplement mii bus
This will allow to have
- phy drivers
- to only connect the phy at then opening of the device
- if the phy is not ready or not up fail on open
Same behaviour as in linux and will allow to share code and simplify porting.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h index 9152943812..39fad12d3f 100644 --- a/include/net.h +++ b/include/net.h @@ -19,6 +19,7 @@ #include <stdlib.h> #include <clock.h> #include <led.h> +#include <linux/phy.h> #include <asm/byteorder.h> /* for nton* / ntoh* stuff */ /* How often do we retry to send packages */ @@ -44,6 +45,9 @@ struct eth_device { struct eth_device *next; void *priv; + /* phy device may attach itself for hardware timestamping */ + struct phy_device *phydev; + struct device_d dev; struct device_d *parent; |