]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Xilinx: ARM: net: Print the phy id on init
authorJoe Hershberger <joe.hershberger@ni.com>
Tue, 28 Feb 2012 19:03:35 +0000 (13:03 -0600)
committerJagan <jaganna@xilinx.com>
Thu, 31 May 2012 07:40:14 +0000 (13:10 +0530)
This makes it clear if we can talk to the phy or not
(i.e. if the phy is out of reset or not)

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
board/xilinx/dfe/xgmac.c

index db9c86cd98bcb0c77daeaf700616752a1aa8cc1c..d64c4a82c3ccd9cb02970508af46ec02ab0773c4 100644 (file)
@@ -245,6 +245,11 @@ int Xgmac_init(struct eth_device *dev, bd_t * bis)
 
        phy_wr(EmacPssInstancePtr, 22, 0);      /* page 0 */
 
+       tmp = phy_rd(EmacPssInstancePtr, 2);
+       printf("Phy ID: %04X", tmp);
+       tmp = phy_rd(EmacPssInstancePtr, 3);
+       printf("%04X\n", tmp);
+
        /* Auto-negotiation advertisement register */
        tmp = phy_rd(EmacPssInstancePtr, 4);
        tmp |= (1 << 11);       /* asymmetric pause */