From de15a06aad1f221255366ac07238c80fed146da1 Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Fri, 17 Aug 2012 15:36:41 -0500 Subject: 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 Signed-off-by: Stefan Roese --- common/flash.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/flash.c') diff --git a/common/flash.c b/common/flash.c index 781cb9c4a2..8244ba2ddd 100644 --- a/common/flash.c +++ b/common/flash.c @@ -221,6 +221,9 @@ void flash_perror (int err) case ERR_PROG_ERROR: puts ("General Flash Programming Error\n"); break; + case ERR_ABORTED: + puts("Flash Programming Aborted\n"); + break; default: printf ("%s[%d] FIXME: rc=%d\n", __FILE__, __LINE__, err); break; -- cgit v1.2.1