summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-11-16 18:19:52 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-11-19 10:19:07 +0100
commitd1662f9db3d3ba743bd73c72cca86f71f86c2ad4 (patch)
tree87c83d9b9b92e6ce63262eeffebd35ca735cb5fe
parente7d143f036ee9a0bddb1492a587d9d91e092b907 (diff)
downloadbarebox-d1662f9db3d3ba743bd73c72cca86f71f86c2ad4.tar.gz
barebox-d1662f9db3d3ba743bd73c72cca86f71f86c2ad4.tar.xz
phylib: introduction of forced 100Mbps
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/net/phy/mdio_bus.c4
-rw-r--r--include/linux/phy.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index b4720872a7..544d743d9a 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -175,6 +175,10 @@ static int mdio_bus_probe(struct device_d *_dev)
dev->speed = SPEED_10;
dev->duplex = DUPLEX_FULL;
dev->autoneg = !AUTONEG_ENABLE;
+ } else if (dev->dev_flags & PHYLIB_FORCE_100) {
+ dev->speed = SPEED_100;
+ dev->duplex = DUPLEX_FULL;
+ dev->autoneg = !AUTONEG_ENABLE;
}
}
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 4f14daef65..791d657c92 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -60,7 +60,8 @@ typedef enum {
#define MII_BUS_ID_SIZE (20 - 3)
#define PHYLIB_FORCE_10 (1 << 0)
-#define PHYLIB_FORCE_LINK (1 << 1)
+#define PHYLIB_FORCE_100 (1 << 1)
+#define PHYLIB_FORCE_LINK (1 << 2)
#define PHYLIB_CAPABLE_1000M (1 << 0)