updated Init_sgmii in post.c to fix emac loopback IR
authorJingting Zhou <zhoujt@ti.com>
Mon, 13 Aug 2012 18:24:58 +0000 (14:24 -0400)
committerJingting Zhou <zhoujt@ti.com>
Mon, 13 Aug 2012 18:24:58 +0000 (14:24 -0400)
post/src/post.c

index cfa6c494a8d9f28857fe4a71c439bdb91fec3aee..fa258bfdf058257f3f08277f943e25d22e12fbaa 100644 (file)
@@ -460,6 +460,11 @@ int32_t Init_sgmii (uint32_t macPortNum)
 
         CSL_SGMII_enableAutoNegotiation (macPortNum);
         CSL_SGMII_endRxTxSoftReset (macPortNum);
+               
+               do
+           {
+               CSL_SGMII_getStatus(macPortNum, &sgmiiStatus);
+           } while (sgmiiStatus.bIsLinkUp != 1);
 
            /* Wait for SGMII Link */
         if (!cpswSimTest && ((cpswLpbkMode == CPSW_LOOPBACK_EXTERNAL) || (cpswLpbkMode == CPSW_LOOPBACK_NONE)))