static FlashType flashType = FLASH_INVALID;
-static const char trbflash_version[] = "$Revision: 2.04 $";
+static const char trbflash_version[] = "$Revision: 2.05 $";
static uint32_t mdcFlashSelect = 1;
if (sendCommand(trb_address, trbcmd, numBytes - 1) == -1) {
return -1;
}
-
+
size = (numBytes / 4) + (numBytes % 4 != 0 ? 1 : 0);
if ((status = trb_register_read_mem(trb_address, BlockRam, 0, size,
trbBuffer, TRB_BUFFER_SIZE))
if (verifyOnly == 0) {
/* Be nice and ask before start flashing the roms */
char c;
- fprintf(stdout, "You decided to reprogram the FlashRom(s), "
- "are you sure [N,y]: ");
+ if (flashType == FLASH_MDC) {
+ if (mdcFlashSelect == 0) {
+ fprintf(stdout, "You decided to reprogram the FlashRom(s) #0 of "
+ "MDC, the so called 'GoldenImage'. Do you really know what "
+ "you're about to do [N,y]: ");
+ } else {
+ fprintf(stdout, "You decided to reprogram the FlashRom(s) #1 of "
+ "MDC, are you sure [N,y]: ");
+ }
+ } else {
+ fprintf(stdout, "You decided to reprogram the FlashRom(s) of "
+ "RICH, are you sure [N,y]: ");
+ }
+
c = getc(stdin);
if (!((c == 'Y') || (c == 'y'))) {
fprintf(stderr, "\nAborting on user request\n");
return -1;
}
-
- if (flashType == FLASH_MDC) {
- if (mdcFlashSelect == 0) {
- fprintf(stdout, "\nFlashRom(s) #0 of MDC (i.e. the GoldenImage(s)), "
- "do you know what you're about to do [N,y]: ");
- c = getc(stdin);
- if (!((c == 'Y') || (c == 'y'))) {
- fprintf(stderr, "\nAborting on user request\n");
- return -1;
- }
- }
- }
}
if (verifyOnly == 0) {