index b8fe3c0035327688faa982cabe4683d49f63fe82..af89f9ae0f9406318d11fbb1ad64f1dc768290d3 100755 (executable)
/* Parameters defined in the input_file */
#define FILE_NAME "file_name"
#define START_ADDR "start_addr"
+#define RBL_ECC "rbl_ecc"
/* Memory address to store the write data */
#define WRITE_DATA_ADDRESS 0x80000000
uint32_t deviceTotalBytes; /* Total number of bytes available in the device */
uint32_t startAddr; /* Start address to write */
uint32_t writeBytes; /* Number of bytes to be written into the device */
+ uint8_t flags; /* Flag used for EVMK2H for multiple ECC formats */
uint8_t *writeData; /* Address to store the write data */
uint8_t *readData; /* Address to store the read data */
}
nandWriterInfo.startAddr = (uint32_t)atoi(data);
+
+ fgets(line, MAX_LINE_LENGTH, fp);
+ key = (char *)strtok(line, tokens);
+ data = (char *)strtok(NULL, tokens);
+
+ if(strlen(data) != 0 && (strcmp(key, RBL_ECC) == 0))
+ {
+ nandWriterInfo.flags = (uint8_t)atoi(data);
+ }
+ else
+ {
+ nandWriterInfo.flags = 0;
+ }
return TRUE;
}
return;
}
#if (defined(_EVMC6657L_) || defined(DEVICE_K2H) || defined(DEVICE_K2K))
- p_device = platform_device_open(PLATFORM_DEVID_MT29F1G08ABCHC, 0);
+ p_device = platform_device_open(PLATFORM_DEVID_MT29F1G08ABCHC, nandWriterInfo.flags);
#else
p_device = platform_device_open(PLATFORM_DEVID_NAND512R3A2D, 0);
#endif