mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-16 23:07:00 +00:00
mtd: spi-nor-core: Check for ctrlc() in spi_nor_erase()
May it possible to interrupt the spi_nor_erase() function. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
This commit is contained in:
parent
ff0000b47d
commit
1fd5e67595
1 changed files with 5 additions and 0 deletions
|
@ -929,6 +929,11 @@ static int spi_nor_erase(struct mtd_info *mtd, struct erase_info *instr)
|
|||
|
||||
while (len) {
|
||||
WATCHDOG_RESET();
|
||||
if (ctrlc()) {
|
||||
addr_known = false;
|
||||
ret = -EINTR;
|
||||
goto erase_err;
|
||||
}
|
||||
#ifdef CONFIG_SPI_FLASH_BAR
|
||||
ret = write_bar(nor, addr);
|
||||
if (ret < 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue