summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2950436)
raw | patch | inline | side by side (parent: 2950436)
author | Casey Smith <c-smith@ti.com> | |
Fri, 5 Apr 2013 21:43:51 +0000 (17:43 -0400) | ||
committer | Casey Smith <c-smith@ti.com> | |
Fri, 5 Apr 2013 21:43:51 +0000 (17:43 -0400) |
writer/nand/evmk2h/bin/nand_writer_input.txt | patch | blob | history | |
writer/nand/src/nandwriter.c | patch | blob | history |
diff --git a/writer/nand/evmk2h/bin/nand_writer_input.txt b/writer/nand/evmk2h/bin/nand_writer_input.txt
index 009e6a154a81cc4f7f1ab334c8757b1d7a11c7f3..340b140cd137db7127562279d8ae48827f4d6f65 100755 (executable)
file_name = app.bin
-start_addr = 16384
+start_addr = 0
+rbl_ecc = 0
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