9
0
Fork 0
Commit Graph

63 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD 30298c0f3c mdio_bus: fix match
on barebox we have the weird way the return 0 true on bus match

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD 9ea956db77 phylib: fix generic phy driver probe
the generic phy driver is used if no driver are found

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD d1662f9db3 phylib: introduction of forced 100Mbps
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:19:07 +01:00
Jean-Christophe PLAGNIOL-VILLARD e7d143f036 phylib: export phy_id via param
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:19:07 +01:00
Sascha Hauer 1bfbbcca51 Merge branch 'for-next/phylib' 2012-11-16 14:02:49 +01:00
Jean-Christophe PLAGNIOL-VILLARD aa498eefce phy: add smsc phy driver support
as we to have specific phy init to fix chip issue link detection support

based on linux 3.6

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 14:24:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4f655dd24a phy: add phy_drivers_register
to allow to register an array of drivers

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 14:24:18 +01:00
Andreas Pretzsch 78d3b8571c mdiobus: unbreak phy_device_connect(): honor masked out PHYs
commit 89dfe2d2af "mdiobus: do not scan
the bus at registration time" dropped the check for struct mii_bus
element phy_mask while scanning through all addresses.
Re-add this check.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-12 08:28:18 +01:00
Sascha Hauer 89dfe2d2af mdiobus: do not scan the bus at registration time
Scanning the bus can take some time. If we do not need the ethernet
device, this is unnecessary, so delay the scan until the phy device
iactually is needed.

Andread Pretzsch: Fixup bug in scanning for all devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
2012-11-07 09:00:19 +01:00
Sascha Hauer 745c16db7e mdiobus: return existing phydev in mdiobus_scan
Test if we already found a phy device on an address earlier and return
it if it exists. This makes it possible to call mdiobus_scan multiple
times.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 17:26:22 +01:00
Sascha Hauer df80e39547 net mdio_bus: Add missing bus_register
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:08:06 +02:00
Sascha Hauer 0dc9de2efd net/eth: fix link handling
Check link status on eth device open time and then periodically
every 5 seconds.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-27 23:55:12 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2263e27814 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>
2012-09-25 08:18:58 +02:00