flash_set_geom(SIZE_INBYTES_16MBYTES, 256, SIZE_INBYTES_64KBYTES);
puts("Unknown type (using only 16 MB)\n");
#endif
- printf("\nPlease, send request to add support\nfor your flash - JEDEC ID: 0x%06lX\n", info->flash_id);
+ printf("\nPlease, send request to add support\nfor your FLASH - JEDEC ID: 0x%06lX\n", info->flash_id);
info->flash_id = FLASH_CUSTOM;
break;
}
memcpy(buffer, (void *)(CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_MAC_ADDRESS), 6);
memcpy(buffer2, (void *)(CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_MAC_ADDRESS2), 6);
- puts("Current MAC addresses stored in flash:\n");
+ puts("Current MAC addresses stored in FLASH:\n");
printf("MAC1 at 0x%X: %02X:%02X:%02X:%02X:%02X:%02X\n", CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_MAC_ADDRESS,
buffer[0] & 0xFF, buffer[1] & 0xFF, buffer[2] & 0xFF, buffer[3] & 0xFF, buffer[4] & 0xFF, buffer[5] & 0xFF);
// get MAC address from flash and print it
memcpy(buffer, (void *)(CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_MAC_ADDRESS), 6);
- printf("Current MAC address stored in flash at offset 0x%X: ", CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_MAC_ADDRESS);
+ printf("Current MAC address stored in FLASH at offset 0x%X: ", CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_MAC_ADDRESS);
printf("%02X:%02X:%02X:%02X:%02X:%02X\n\n", buffer[0] & 0xFF, buffer[1] & 0xFF, buffer[2] & 0xFF, buffer[3] & 0xFF, buffer[4] & 0xFF, buffer[5] & 0xFF);
#endif
}
#if defined(OFFSET_MAC_ADDRESS2)
-U_BOOT_CMD(printmac, 1, 1, do_print_mac, "print MAC addresses stored in flash\n", NULL);
+U_BOOT_CMD(printmac, 1, 1, do_print_mac, "print MAC addresses stored in FLASH\n", NULL);
#else
-U_BOOT_CMD(printmac, 1, 1, do_print_mac, "print MAC address stored in flash\n", NULL);
+U_BOOT_CMD(printmac, 1, 1, do_print_mac, "print MAC address stored in FLASH\n", NULL);
#endif
/*
return(run_command(buf, 0));
}
-U_BOOT_CMD(setmac, 2, 0, do_set_mac, "save new MAC address in flash\n", "xx:xx:xx:xx:xx:xx\n\t- change MAC address stored in flash (xx - value in hex format)\n");
+U_BOOT_CMD(setmac, 2, 0, do_set_mac, "save new MAC address in FLASH\n", "xx:xx:xx:xx:xx:xx\n\t- change MAC address stored in FLASH (xx - value in hex format)\n");
#endif /* if defined(OFFSET_MAC_ADDRESS) */
// get router model from flash and print it
memcpy(buffer, (void *)(CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_ROUTER_MODEL), 8);
- printf("Router model stored in flash at offset 0x%X: ", CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_ROUTER_MODEL);
+ printf("Router model stored in FLASH at offset 0x%X: ", CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_ROUTER_MODEL);
printf("%02X%02X%02X%02X%02X%02X%02X%02X\n\n", buffer[0] & 0xFF, buffer[1] & 0xFF, buffer[2] & 0xFF, buffer[3] & 0xFF, buffer[4] & 0xFF, buffer[5] & 0xFF, buffer[6] & 0xFF, buffer[7] & 0xFF);
return(0);
}
-U_BOOT_CMD(printmodel, 1, 1, do_print_model, "print router model stored in flash\n", NULL);
+U_BOOT_CMD(printmodel, 1, 1, do_print_model, "print router model stored in FLASH\n", NULL);
#endif /* if defined(OFFSET_ROUTER_MODEL) */
memcpy(buffer, (void *)(CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_PIN_NUMBER), 8);
buffer[8] = 0;
- printf("Router pin number stored in flash at offset 0x%X: ", CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_PIN_NUMBER);
+ printf("Router pin number stored in FLASH at offset 0x%X: ", CFG_FLASH_BASE + OFFSET_MAC_DATA_BLOCK + OFFSET_PIN_NUMBER);
printf("%s\n\n", buffer);
return(0);
}
-U_BOOT_CMD(printpin, 1, 1, do_print_pin, "print WPS pin stored in flash\n", NULL);
+U_BOOT_CMD(printpin, 1, 1, do_print_pin, "print WPS pin stored in FLASH\n", NULL);
#endif /* if defined(OFFSET_PIN_NUMBER) */
if(!found){
/* error, addres not in flash */
- printf("## Error: end address (0x%08lx) not in flash!\n", *addr_last);
+ printf("## Error: end address (0x%08lx) not in FLASH!\n", *addr_last);
return(-1);
}
// erase whole flash?
if(strcmp(argv[1], "all") == 0){
for(bank = 1; bank <= CFG_MAX_FLASH_BANKS; ++bank){
- printf("Erase flash bank #%ld ", bank);
+ printf("Erase FLASH bank #%ld ", bank);
info = &flash_info[bank - 1];
rcode = flash_erase(info, 0, info->sector_count - 1);
}
puts("## Error: bad sector spec\n");
return(1);
}
- printf("Erase flash sectors %d-%d in bank #%d ", sect_first, sect_last, (info - flash_info) + 1);
+ printf("Erase FLASH sectors %d-%d in bank #%d ", sect_first, sect_last, (info - flash_info) + 1);
rcode = flash_erase(info, sect_first, sect_last);
return(rcode);
}
bank = simple_strtoul(argv[2], NULL, 16);
if((bank < 1) || (bank > CFG_MAX_FLASH_BANKS)){
- printf("## Error: only flash banks #1...#%d supported\n", CFG_MAX_FLASH_BANKS);
+ printf("## Error: only FLASH banks #1...#%d supported\n", CFG_MAX_FLASH_BANKS);
return(1);
}
- printf("Erase flash bank #%ld ", bank);
+ printf("Erase FLASH bank #%ld ", bank);
info = &flash_info[bank - 1];
rcode = flash_erase(info, 0, info->sector_count - 1);
return(rcode);
for(bank = 0, info = &flash_info[0]; (bank < CFG_MAX_FLASH_BANKS) && (rcode == 0); ++bank, ++info){
if(s_first[bank] >= 0){
erased += s_last[bank] - s_first[bank] + 1;
- printf("Erase flash from 0x%08lX to 0x%08lX in bank #%ld\n", info->start[s_first[bank]], (s_last[bank] == info->sector_count - 1) ? info->start[0] + info->size - 1 : info->start[s_last[bank] + 1] - 1, bank + 1);
+ printf("Erase FLASH from 0x%08lX to 0x%08lX in bank #%ld\n", info->start[s_first[bank]], (s_last[bank] == info->sector_count - 1) ? info->start[0] + info->size - 1 : info->start[s_last[bank] + 1] - 1, bank + 1);
rcode = flash_erase(info, s_first[bank], s_last[bank]);
}
}
continue;
}
- printf("%sProtecting flash bank #%ld\n", p ? "" : "Un-", bank);
+ printf("%sProtecting FLASH bank #%ld\n", p ? "" : "Un-", bank);
for(i = 0; i < info->sector_count; ++i){
info->protect[i] = p;
return(1);
}
- printf("%sProtecting flash sectors: %d-%d in bank #%d\n", p ? "" : "Un-", sect_first, sect_last, (info-flash_info)+1);
+ printf("%sProtecting FLASH sectors: %d-%d in bank #%d\n", p ? "" : "Un-", sect_first, sect_last, (info-flash_info)+1);
for(i = sect_first; i <= sect_last; i++){
info->protect[i] = p;
bank = simple_strtoul(argv[3], NULL, 16);
if((bank < 1) || (bank > CFG_MAX_FLASH_BANKS)){
- printf("## Error: only flash banks #1...#%d supported\n", CFG_MAX_FLASH_BANKS);
+ printf("## Error: only FLASH banks #1...#%d supported\n", CFG_MAX_FLASH_BANKS);
return(1);
}
- printf("%sProtecting flash bank #%ld\n", p ? "" : "Un-", bank);
+ printf("%sProtecting FLASH bank #%ld\n", p ? "" : "Un-", bank);
info = &flash_info[bank-1];
if(info->flash_id == FLASH_UNKNOWN){
- puts("## Error: missing or unknown flash type\n");
+ puts("## Error: missing or unknown FLASH type\n");
return(1);
}
if(addr2info(dest) != NULL){
int rc;
- puts("Copying to flash...\n");
+ puts("Copying to FLASH...\n");
rc = flash_write((char *)addr, dest, count * size);
#endif
#endif
-char *env_name_spec = "flash";
+const char *env_name_spec = "FLASH";
#ifdef ENV_IS_EMBEDDED
case ERR_OK:
break;
case ERR_TIMOUT:
- puts("## Error: timeout writing to flash\n");
+ puts("## Error: timeout writing to FLASH\n");
break;
case ERR_NOT_ERASED:
- puts("## Error: flash not erased\n");
+ puts("## Error: FLASH not erased\n");
break;
case ERR_PROTECTED:
puts("## Error: can't write to protected sectors\n");
break;
case ERR_INVAL:
- puts("## Error: outside available flash\n");
+ puts("## Error: outside available FLASH\n");
break;
case ERR_ALIGN:
puts("## Error: start and/or end address not on sector boundary\n");
break;
case ERR_UNKNOWN_FLASH_VENDOR:
- puts("## Error: unknown vendor of flash\n");
+ puts("## Error: unknown vendor of FLASH\n");
break;
case ERR_UNKNOWN_FLASH_TYPE:
- puts("## Error: unknown type of flash\n");
+ puts("## Error: unknown type of FLASH\n");
break;
case ERR_PROG_ERROR:
- puts("## Error: general flash programming error\n");
+ puts("## Error: general FLASH programming error\n");
break;
default:
printf("## Error: %s[%d] FIXME: rc=%d\n", __FILE__, __LINE__, err);
// if we don't know the flash type, we won't allow to update ART,
// because we don't know flash size
if(info->flash_id == FLASH_CUSTOM){
- printf("## Error: unknown flash type, can't update ART!\n");
+ printf("## Error: unknown FLASH type, can't update ART!\n");
webfailsafe_upload_failed = 1;
}
#endif