]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blobdiff - src/main/iblmain.c
Corrected merge for 6657 ibl
[keystone-rtos/ibl.git] / src / main / iblmain.c
index 20955acb23ce220aea3da09d6b2afe6c2c6d7dbc..bd1ac4fdab5ecdf665e63d8c333887e58b48d2b9 100755 (executable)
@@ -65,7 +65,7 @@
 #include "spi_api.h"
 #include "ibl_elf.h"
 #include <string.h>
-#include "evmc66x_uart.h"
+#include "uart.h"
 
 extern cregister unsigned int IER;
 
@@ -193,8 +193,11 @@ void iblPmemCfg (int32 interface, int32 port, bool enableNand)
                         iblStatus.iblFail = ibl_FAIL_CODE_NO_EMIF_CFG;
                         return;
                     }
-
+#ifdef C665x
+                                       ret = devicePowerPeriph (TARGET_PWR_EMIF_C6657);
+#else
                     ret = devicePowerPeriph (TARGET_PWR_EMIF);
+#endif
                     if (ret != 0)
                         break;
 
@@ -245,6 +248,10 @@ void main (void)
     iblStatus.iblMagic   = ibl_MAGIC_VALUE;
     iblStatus.iblVersion = ibl_VERSION;
 
+    /* Init UART */
+    uart_init();
+    uart_write_string("", 0);
+    uart_write_string("IBL version: "ibl_VERSION_STR, 0);
 
     /* Power up the timer */
     devicePowerPeriph (TARGET_PWR_TIMER_0);
@@ -275,7 +282,8 @@ void main (void)
         v &= DEVICE_JTAG_ID_MASK;
         if (
             (v == DEVICE_C6678_JTAG_ID_VAL)         || 
-            (v == DEVICE_C6670_JTAG_ID_VAL)
+            (v == DEVICE_C6670_JTAG_ID_VAL)        ||
+           (v == DEVICE_C6657_JTAG_ID_VAL)     
            )
         {
             IER = 0;