Convert CONFIG_FLASH_SHOW_PROGRESS to Kconfig
This converts the following to Kconfig:
CONFIG_FLASH_SHOW_PROGRESS
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index d8e2dec..04ae456 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -77,6 +77,15 @@
help
This must be kept in sync with the table in include/flash.h
+config FLASH_SHOW_PROGRESS
+ int "Print out a countdown durinng writes"
+ depends on FLASH_CFI_DRIVER
+ default 45
+ help
+ If set to a non-zero value, print out countdown digits and dots.
+ Recommended value: 45 (9..1) for 80 column displays, 15 (3..1) for 40
+ column displays.
+
config CFI_FLASH
bool "Enable Driver Model for CFI Flash driver"
depends on DM_MTD
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index c1cdd2c..f378f6f 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1292,7 +1292,7 @@
* effect updates to digit and dots. Repeated code is nasty too, so
* we define it once here.
*/
-#ifdef CONFIG_FLASH_SHOW_PROGRESS
+#if CONFIG_FLASH_SHOW_PROGRESS
#define FLASH_SHOW_PROGRESS(scale, dots, digit, dots_sub) \
if (flash_verbose) { \
dots -= dots_sub; \
@@ -1325,7 +1325,7 @@
#ifdef CONFIG_SYS_FLASH_USE_BUFFER_WRITE
int buffered_size;
#endif
-#ifdef CONFIG_FLASH_SHOW_PROGRESS
+#if CONFIG_FLASH_SHOW_PROGRESS
int digit = CONFIG_FLASH_SHOW_PROGRESS;
int scale = 0;
int dots = 0;