summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-06-14 22:31:46 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-06-28 10:43:55 +0200
commitb99e2c4ac6296b28b7ab0a62dd82d358855c4126 (patch)
treebed1b01368e9261a7819028a7215564109cf5a0b
parent257da5cac07854c89861de5925475b339e8ff71b (diff)
downloadbarebox-b99e2c4ac6296b28b7ab0a62dd82d358855c4126.tar.gz
barebox-b99e2c4ac6296b28b7ab0a62dd82d358855c4126.tar.xz
cfi flash driver: Use generic progression bar function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/nor/cfi_flash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/nor/cfi_flash.c b/drivers/nor/cfi_flash.c
index dbfb004d05..b21739bd28 100644
--- a/drivers/nor/cfi_flash.c
+++ b/drivers/nor/cfi_flash.c
@@ -42,6 +42,7 @@
#include <malloc.h>
#include <asm/io.h>
#include <errno.h>
+#include <progress.h>
#include "cfi_flash.h"
/*
@@ -499,11 +500,13 @@ static int cfi_erase(struct cdev *cdev, size_t count, unsigned long offset)
start = find_sector(finfo, cdev->dev->map_base + offset);
end = find_sector(finfo, cdev->dev->map_base + offset + count - 1);
+ init_progression_bar(end - start);
+
for (i = start; i <= end; i++) {
ret = finfo->cfi_cmd_set->flash_erase_one(finfo, i);
if (ret)
goto out;
- printf(".");
+ show_progress(i - start);
}
out:
putchar('\n');