--- cpsw_appboardutils_j721e_evm.c	2020-10-20 12:05:07.631042000 -0400
+++ ./original/cpsw_appboardutils_j721e_evm.c	2020-02-21 07:20:00.000000000 -0500
@@ -87,8 +87,6 @@
 /*                          Function Definitions                              */
 /* ========================================================================== */
 
-#define BOARD_EP2000
-
 #if defined(BUILD_MCU2_0)
 static void CpswAppBoardUtils_enetExpCfg(void)
 {
@@ -167,18 +165,13 @@
 static void CpswAppBoardUtils_boardInit(Board_initCfg *boardCfg)
 {
     Board_STATUS status;
-
+    Board_PinmuxConfig_t pinmuxCfg;
 
     /* Configure CPSW9G PADs for Ports on the GESI board */
-#ifndef BOARD_EP2000
-    Board_PinmuxConfig_t pinmuxCfg;
     Board_pinmuxGetCfg(&pinmuxCfg);
     pinmuxCfg.gesiExp = BOARD_PINMUX_GESI_CPSW9G;
     Board_pinmuxSetCfg(&pinmuxCfg);
-#endif
-
 
-#ifndef BOARD_EP2000   // PJK Edit
 #if defined(BUILD_MCU2_0)
     Board_initParams_t initParams;
 
@@ -191,13 +184,10 @@
     initParams.pscMode = BOARD_PSC_DEVICE_MODE_NONEXCLUSIVE;
     Board_setInitParams(&initParams);
 #endif
-#endif
 
     status = Board_init(*boardCfg);
     CpswAppUtils_assert(status == BOARD_SOK);
 
-#ifndef BOARD_EP2000
-
     if (Board_detectBoard(BOARD_ID_GESI))
     {
         CpswAppUtils_print("GESI board detected\n");
@@ -207,7 +197,6 @@
     {
         CpswAppUtils_print("QSGMII board detected\n");
     }
-#endif
 }
 
 /* Hack to run EthFw with Linux
@@ -219,17 +208,14 @@
 void CpswAppBoardUtils_initEthFw(void)
 {
     Board_initCfg boardCfg;
-
+    Board_STATUS status;
     uint32_t i, moduleCnt, appFlags;
     uint32_t clkModuleId[] = { TISCI_DEV_DDR0,
                                TISCI_DEV_TIMER0,
                                TISCI_DEV_TIMER1,
                                TISCI_DEV_TIMER2,
                                TISCI_DEV_TIMER3,
-                              /* TISCI_DEV_UART2,*/ }; //PJK
-#ifndef BOARD_EP2000
-    Board_STATUS status;
-#endif
+                               TISCI_DEV_UART2, };
 
     appFlags = 0U;
     moduleCnt = CPSW_UTILS_ARRAYSIZE(clkModuleId);
@@ -240,14 +226,13 @@
                                     appFlags);
     }
 
-    boardCfg = BOARD_INIT_ENETCTRL_CPSW9G;
-    /*|BOARD_INIT_UART_STDIO;*/ //PJK
+    boardCfg = BOARD_INIT_ENETCTRL_CPSW9G|
+               BOARD_INIT_UART_STDIO;
 
     CpswAppBoardUtils_boardInit(&boardCfg);
 
-    /*status = CpswAppBoardUtils_configEthFwPinmux();*/  //PJK : Pin Mux to be done in Linux bootloader ?
-
-    //CpswAppUtils_assert(status == BOARD_SOK);
+    status = CpswAppBoardUtils_configEthFwPinmux();
+    CpswAppUtils_assert(status == BOARD_SOK);
 
 #ifndef SDK_6_2_CORE_SDK_IMAGE
 #if defined(BUILD_MCU2_0)
@@ -257,7 +242,6 @@
      * Note - We call below without any check as these functions can be called without daughter board also.
      * They just change the output state of IO expander pins on CP board which goes to daughter board.
      * No negative impact when they are configured without DB. */
-#ifndef BOARD_EP2000
     CpswAppBoardUtils_enetExpCfg();
 
     if (Board_detectBoard(BOARD_ID_ENET))
@@ -266,8 +250,6 @@
         CpswAppUtils_assert(status == BOARD_SOK);
     }
 #endif
-
-#endif
 #endif
 
 }
@@ -330,7 +312,7 @@
 }
 
 uint32_t CpswAppBoardUtils_getPhyAddr(Cpsw_Type cpswType,
-                                      Cpsw_MacPort portNum)     // PJK : Called from Eth Fw
+                                      Cpsw_MacPort portNum)
 {
     uint32_t phyAddr = CPSW_PHY_INVALID_PHYADDR;
 
@@ -361,8 +343,7 @@
 
                 case CPSW_MAC_PORT_7:
                     /* RGMII port */
-                   /* phyAddr = 15U;*/
-                   phyAddr = 1U;
+                    phyAddr = 15U;
                     break;
 
                 case CPSW_MAC_PORT_1:
@@ -377,15 +358,12 @@
 
                 case CPSW_MAC_PORT_5:
                     /* QSGMII port */
-                    /*phyAddr = 18U;*/
-                   phyAddr = 0U;
-
+                    phyAddr = 18U;
                     break;
 
                 case CPSW_MAC_PORT_6:
                     /* QSGMII port */
-                    /*phyAddr = 19U;*/
-                   phyAddr= 0x2U;
+                    phyAddr = 19U;
                     break;
 
                 default:
@@ -403,14 +381,14 @@
     return phyAddr;
 }
 
-uint32_t CpswAppBoardUtils_getSgmiiPhyAddr()           //PJK :Not used
+uint32_t CpswAppBoardUtils_getSgmiiPhyAddr()
 {
     /* Both Q/SGMII DB and GESI board use MAC port 2, so we can't use generic CpswAppBoardUtils_getPhyAddr
      * function */
     return 10U;
 }
 
-uint32_t CpswAppBoardUtils_getRmiiPhyAddr()          //PJK : Not used
+uint32_t CpswAppBoardUtils_getRmiiPhyAddr()
 {
     /* Both QSGMII DB and GESI board use MAC port 7, so we can't use generic CpswAppBoardUtils_getPhyAddr
      * function */
@@ -537,8 +515,7 @@
                         (portNum == CPSW_MAC_PORT_1) ||
                         (portNum == CPSW_MAC_PORT_2) ||
                         (portNum == CPSW_MAC_PORT_3) ||
-                        (portNum == CPSW_MAC_PORT_5) ||
-                        (portNum == CPSW_MAC_PORT_6) ||          //PJK Edit
+                        (portNum == CPSW_MAC_PORT_6) ||
                         (portNum == CPSW_MAC_PORT_7));
 
     Cpsw_initPhyParams(phyConfig);
@@ -591,8 +568,6 @@
 
         case CPSW_9G:
 
-#ifndef EP2000_BOARD
-
             if ( CPSW_MAC_PORT_0 == portNum ||
                  CPSW_MAC_PORT_2 == portNum ||
                  CPSW_MAC_PORT_3 == portNum ||
@@ -612,19 +587,7 @@
                                                      interface,
                                                      phyConfig);
             }
-#else
-            if ( CPSW_MAC_PORT_0 == portNum ||
-                             CPSW_MAC_PORT_5 == portNum ||
-                             CPSW_MAC_PORT_6 == portNum ||
-                             CPSW_MAC_PORT_7 == portNum )
-                        {
-                            CpswAppBoardUtils_setPhyConfigRgmii(cpswType,
-                                                                portNum,
-                                                                macConfig,
-                                                                interface,
-                                                                phyConfig);
-                        }
-#endif
+
             break;
     }
 
@@ -650,44 +613,22 @@
     linkConfig->duplexity = CPSW_DUPLEX_FULL;
 
     /* MAC and PHY loopbacks are mutually exclusive */
-    phyConfig->enableLoopback = !phyLpbk;
+    phyConfig->enableLoopback = phyLpbk;
     macConfig->enableLoopback = !phyLpbk;
 }
 
-#define CPSW_CONFIG_PORTS 9
-
-
 void CpswAppBoardUtils_getMacAddrList(uint8_t macAddr[][CPSW_MAC_ADDR_LEN],
                                       uint32_t maxMacEntries,
                                       uint32_t *pAvailMacEntries)
 {
-
-#ifdef BOARD_EP2000
-    uint8_t macAddrBuf[CPSW_RM_NUM_MACADDRESS_MAX * BOARD_MAC_ADDR_BYTES] = {0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
-                                                                             0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,
-                                                                             0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,
-                                                                             0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,
-                                                                             0xee,0xee,0xee,0xee,0xee,0xee,
-                                                                             0xff,0xff,0xff,0xff,0xff,0xff,
-                                                                             0x11,0x11,0x11,0x11,0x11,0x11,
-                                                                             0x22,0x22,0x22,0x22,0x22,0x22,
-                                                                             0x33,0x33,0x33,0x33,0x33,0x33,};
-#else
     uint8_t macAddrBuf[CPSW_RM_NUM_MACADDRESS_MAX * BOARD_MAC_ADDR_BYTES];
-#endif
-
-
-    uint32_t macAddrCnt;
+    Board_STATUS boardStatus;
+    uint32_t macAddrCnt, tempCnt;
     uint32_t allocMacEntries = 0;
     uint32_t i;
 
     CpswAppUtils_assert(pAvailMacEntries != NULL);
 
-
-
-#ifndef BOARD_EP2000
-    Board_STATUS boardStatus;
-    uint32_t tempCnt;
     if (Board_detectBoard(BOARD_ID_GESI))
     {
         boardStatus = Board_readMacAddrCount(BOARD_ID_GESI, &macAddrCnt);
@@ -714,7 +655,6 @@
     }
 
 #ifndef SDK_6_2_CORE_SDK_IMAGE
-
     if (Board_detectBoard(BOARD_ID_ENET))
     {
         maxMacEntries = maxMacEntries - allocMacEntries;
@@ -733,25 +673,21 @@
         CpswAppUtils_assert(tempCnt == macAddrCnt);
 
         macAddrCnt = CpswUtils_min(macAddrCnt, maxMacEntries);
-        }
-#endif
-#else
-        macAddrCnt = CPSW_CONFIG_PORTS ;
         for (i = allocMacEntries; i < macAddrCnt; i++)
         {
             CPSW_UTILS_COMPILETIME_ASSERT(CPSW_MAC_ADDR_LEN == BOARD_MAC_ADDR_BYTES);
             memcpy(macAddr[i], &macAddrBuf[i * BOARD_MAC_ADDR_BYTES], CPSW_MAC_ADDR_LEN);
         }
-#endif
-        allocMacEntries += macAddrCnt;
 
-        *pAvailMacEntries = allocMacEntries;
+        allocMacEntries += macAddrCnt;
+    }
+#endif
 
-        CpswAppUtils_print("PJK : MAC address generated\n");
+    *pAvailMacEntries = allocMacEntries;
 
-        if (allocMacEntries == 0U)
-        {
-           CpswAppUtils_print("CpswAppBoardUtils_getMacAddrList Failed - GESI/ENET board not present\n");
-           CpswAppUtils_assert(false);
-        }
+    if (allocMacEntries == 0U)
+    {
+        CpswAppUtils_print("CpswAppBoardUtils_getMacAddrList Failed - GESI/ENET board not present\n");
+        CpswAppUtils_assert(false);
+    }
 }
