]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: macb: Add support for 1000-baseX
authorRadu Pirea <radu_nicolae.pirea@upb.ro>
Fri, 7 Jun 2019 11:18:36 +0000 (14:18 +0300)
committerJoe Hershberger <joe.hershberger@ni.com>
Mon, 15 Jul 2019 18:32:26 +0000 (13:32 -0500)
Macb can be used with Xilinx PCS/PMA PHY in fpga which is a 1000-baseX
phy(lpa 0x41e0). This patch adds checks for LPA_1000XFULL and
LPA_1000XHALF bits.

Signed-off-by: Radu Pirea <radu_nicolae.pirea@upb.ro>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/macb.c

index ab831f40ee62566e802e40cd232971e0efc4a39d..a7eddd647d02b0df27e0bf9f8552358f28a3fc34 100644 (file)
@@ -615,8 +615,10 @@ static int macb_phy_init(struct macb_device *macb, const char *name)
        if (gem_is_gigabit_capable(macb)) {
                lpa = macb_mdio_read(macb, MII_LPA);
 
-               if (lpa & (LPA_1000FULL | LPA_1000HALF)) {
-                       duplex = ((lpa & LPA_1000FULL) ? 1 : 0);
+               if (lpa & (LPA_1000FULL | LPA_1000HALF | LPA_1000XFULL |
+                                       LPA_1000XHALF)) {
+                       duplex = ((lpa & (LPA_1000FULL | LPA_1000XFULL)) ?
+                                       1 : 0);
 
                        printf("%s: link up, 1000Mbps %s-duplex (lpa: 0x%04x)\n",
                               name,