* and no protected sectors are hit.
* Returns:
* ERR_OK 0 - OK
- * ERR_TIMOUT 1 - write timeout
+ * ERR_TIMEOUT 1 - write timeout
* ERR_NOT_ERASED 2 - Flash not erased
* ERR_PROTECTED 4 - target range includes protected sectors
* ERR_INVAL 8 - target address not in Flash memory
switch (err) {
case ERR_OK:
break;
- case ERR_TIMOUT:
+ case ERR_TIMEOUT:
puts ("Timeout writing to Flash\n");
break;
case ERR_NOT_ERASED:
flash_read_long(info, sector, 0));
flash_write_cmd(info, sector, 0, info->cmd_reset);
udelay(1);
- return ERR_TIMOUT;
+ return ERR_TIMEOUT;
}
udelay(1); /* also triggers watchdog */
}
if (get_timer(start) > tout) {
printf("Flash %s timeout at address %lx data %lx\n",
prompt, (ulong)dst, (ulong)flash_read8(dst));
- return ERR_TIMOUT;
+ return ERR_TIMEOUT;
}
udelay(1); /* also triggers watchdog */
}
int ret = wait_for_bit_le32(&nvm_regs_p->ctrl.raw,
NVM_WR, false, timeout, false);
- return ret ? ERR_TIMOUT : ERR_OK;
+ return ret ? ERR_TIMEOUT : ERR_OK;
}
static inline int flash_complete_operation(void)
* Erase flash sectors, returns:
* ERR_OK - OK
* ERR_INVAL - invalid sector arguments
- * ERR_TIMOUT - write timeout
+ * ERR_TIMEOUT - write timeout
* ERR_NOT_ERASED - Flash not erased
* ERR_UNKNOWN_FLASH_VENDOR - incorrect flash
*/
/*
* Copy memory to flash, returns:
* ERR_OK - OK
- * ERR_TIMOUT - write timeout
+ * ERR_TIMEOUT - write timeout
* ERR_NOT_ERASED - Flash not erased
*/
int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)