cfi: Make the flash erase and write operations abortable
Check for ctrlc() in operations that take time and loop over the flash addresses. In netconsole, tstc() is expensive. Only check once in a while to not slow down the operation significantly. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
committed by
Stefan Roese
parent
6822a647b9
commit
de15a06aad
@@ -443,7 +443,8 @@ int flash_sect_erase (ulong addr_first, ulong addr_last)
|
||||
rcode = flash_erase (info, s_first[bank], s_last[bank]);
|
||||
}
|
||||
}
|
||||
printf ("Erased %d sectors\n", erased);
|
||||
if (rcode == 0)
|
||||
printf("Erased %d sectors\n", erased);
|
||||
} else if (rcode == 0) {
|
||||
puts ("Error: start and/or end address"
|
||||
" not on sector boundary\n");
|
||||
|
||||
Reference in New Issue
Block a user