summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadu Pirea <radu_nicolae.pirea@upb.ro>2019-06-07 14:18:35 +0300
committerJoe Hershberger <joe.hershberger@ni.com>2019-07-15 21:32:26 +0300
commit1b0c9914cc75d1570359181ebd493cd5746cb0ed (patch)
tree8fac39384ffc3f88edb8252bc68d01738f758a1a
parentc558c50dbb468656748037af9a9dd900c5d2030d (diff)
downloadu-boot-1b0c9914cc75d1570359181ebd493cd5746cb0ed.tar.xz
net: macb: Fixed reading MII_LPA register
If macb is gem and is gigabit capable, lpa value is not read from the right register(MII_LPA) and is read from MII_STAT1000. This patch fixes reading of the lpa value. Signed-off-by: Radu Pirea <radu_nicolae.pirea@upb.ro> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--drivers/net/macb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index c5560a7111..ab831f40ee 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -613,7 +613,7 @@ static int macb_phy_init(struct macb_device *macb, const char *name)
/* First check for GMAC and that it is GiB capable */
if (gem_is_gigabit_capable(macb)) {
- lpa = macb_mdio_read(macb, MII_STAT1000);
+ lpa = macb_mdio_read(macb, MII_LPA);
if (lpa & (LPA_1000FULL | LPA_1000HALF)) {
duplex = ((lpa & LPA_1000FULL) ? 1 : 0);