ECMaster ported to PSDK 4.3
[apps/tidep0079.git] / EC_Master_SysBios_Am572x / Workspace / SYSBIOS_AM57xx / common / main.c
index 67f48b78cf8b2354aa2a35454ac755d1a380a813..8323b0587106fc76351e1776ee3d3daee95d4a1b 100644 (file)
@@ -169,18 +169,15 @@ int main()
 {
     /* Call board init functions */
 
-    Board_STATUS boardInitStatus =0;
-       Board_IDInfo info;
-       Error_Block eb;
-    Board_initCfg boardCfg;
+    Error_Block eb;
     Task_Params taskParams;
-    uint32_t numPorts = 4; //PC-- 03/14/2017
+    Board_IDInfo info;
+    Board_STATUS boardInitStatus =0;
+
+    Board_initCfg cfg = BOARD_INIT_UART_STDIO | BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_MODULE_CLOCK | BOARD_INIT_ICSS_ETH_PHY | BOARD_INIT_UNLOCK_MMR;
 
-    //boardCfg = BOARD_INIT_UNLOCK_MMR | BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_MODULE_CLOCK | BOARD_INIT_UART_STDIO;
-    //PC-- 03/14/2017
-    boardCfg = BOARD_INIT_UNLOCK_MMR | BOARD_INIT_UART_STDIO | BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_MODULE_CLOCK | BOARD_INIT_ICSS_ETH_PHY;
     Error_init(&eb);
-    boardInitStatus=Board_init(boardCfg);
+    boardInitStatus  = Board_init(cfg);
 
     if (boardInitStatus !=0)
     {
@@ -194,21 +191,16 @@ int main()
     if (!(strcmp(info.boardName, "AM571IDK")))
     {
         ICSS_EMAC_testEvmType =ICSS_EMAC_TEST_BOARD_IDKAM571x;
-        PRINT("board type is AM571IDK, numPorts: %d\n", numPorts);
+    }
+    else if(!(strcmp(info.boardName, "AM572IDK")))
+    {
+       ICSS_EMAC_testEvmType =ICSS_EMAC_TEST_BOARD_IDKAM572x;
     }
     else
     {
-        ICSS_EMAC_testEvmType =ICSS_EMAC_TEST_BOARD_IDKAM572x;
-        PRINT("board type is AM572IDK, numPorts: %d\n", numPorts);
+        ICSS_EMAC_testEvmType =ICSS_EMAC_TEST_BOARD_IDKAM574x;
      }
-//#if (defined LINKLAYER_ICSS)
-//    AM57x_setup(board_type, 2); //PC-- for AM571x IDK we can use workaround --> https://jira.itg.ti.com/browse/PRSDK-40 AM57x_setup(board_type, 4)
-//#endif
-       //ClockSynthesizerSetup(); //PC-- commented due to error
 
-    //PC-- 03/14/2017
-    //AM57x_setup();
-    //ICSS_EMAC_testAM572xSetup(board_type, 2);
 
     CSL_xbarMpuIrqConfigure(CSL_XBAR_INST_MPU_IRQ_92, CSL_XBAR_GMAC_SW_IRQ_RX_PULSE);
     CSL_xbarMpuIrqConfigure(CSL_XBAR_INST_MPU_IRQ_93, CSL_XBAR_GMAC_SW_IRQ_TX_PULSE);
@@ -234,7 +226,6 @@ int main()
 
 
     BIOS_start();
-    //return -1;
     return(0);
 }