]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/mcsdk-tools.git/blobdiff - writer/nor/src/norwriter.c
writer: Update nand and nor writer to not do phy init
[keystone-rtos/mcsdk-tools.git] / writer / nor / src / norwriter.c
index 271b4bcb1fd15d7763c14dfee42a3f4535d63a5c..e8a5db5e0f2abe3d98713ca0bf9fd673ad1bd8ba 100644 (file)
@@ -433,14 +433,18 @@ void main ()
     memset(&init_flags, 1, sizeof(platform_init_flags));
     init_flags.pll = 0;
     init_flags.ddr = 0;
+    init_flags.phy = 0;
     if (platform_init(&init_flags, &init_config) != Platform_EOK)
     {
         printf ("Platform init failed!\n");
         print_platform_errno();
         return;
     }
-
+#if !(defined(_EVMC6657L_))
     p_device = platform_device_open(PLATFORM_DEVID_NORN25Q128, 0);
+#else
+    p_device = platform_device_open(PLATFORM_DEVID_NORN25Q032A, 0);
+#endif
     if (p_device == NULL)
     {
         printf ("NOR device open failed!\n");
@@ -471,6 +475,10 @@ void main ()
     /* Parse the CCS format file */
     ret = find_file_length(fp);
     fclose (fp);
+    
+    norWriterInfo.writeBytes += norWriterInfo.blockSizeBytes - 1;
+    norWriterInfo.writeBytes -= norWriterInfo.writeBytes % norWriterInfo.blockSizeBytes;
+    
     if (ret == FALSE)
     {
         printf("Error in parsing CCS file %s\n", norWriterInfo.file_name);