diff options
author | Simon Glass <sjg@chromium.org> | 2022-02-28 12:08:28 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-06 14:01:42 -0400 |
commit | 564e532eea0d605114f3afe310ca673b366e8c14 (patch) | |
tree | 4ba7948600d47d63ff15b7dd71d82a159b61e152 /drivers/mtd/spi | |
parent | a50b56133315b16a03597d6a66c106e2e1de5903 (diff) | |
download | u-boot-564e532eea0d605114f3afe310ca673b366e8c14.tar.gz |
spi: Avoid checking console in SPL
When SPI flash is used in SPL there is no console, so ctrlc() cannot be
called. Add a condition to fix this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mtd/spi')
-rw-r--r-- | drivers/mtd/spi/spi-nor-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index a70fbda4bb..3b7c817c02 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -929,7 +929,7 @@ static int spi_nor_erase(struct mtd_info *mtd, struct erase_info *instr) while (len) { WATCHDOG_RESET(); - if (ctrlc()) { + if (!IS_ENABLED(CONFIG_SPL_BUILD) && ctrlc()) { addr_known = false; ret = -EINTR; goto erase_err; |