9
0
Fork 0

cfi flash driver: Use generic progression bar function

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2010-06-14 22:31:46 +02:00
parent 257da5cac0
commit b99e2c4ac6
1 changed files with 4 additions and 1 deletions

View File

@ -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');