diff options
author | Jagannadha Sutradharudu Teki <jaganna@xilinx.com> | 2013-05-26 01:35:21 +0530 |
---|---|---|
committer | Jagannadha Sutradharudu Teki <jaganna@xilinx.com> | 2013-06-03 00:04:40 +0530 |
commit | 96bbf55651fc2bedc175830d22179e384d640d99 (patch) | |
tree | 1a6a332160fb89244d9d22770a5b28fde57b14f0 /common/cmd_sf.c | |
parent | 0d3b596aa35fd828f2147c6d3c86d4e2730f7b29 (diff) | |
download | u-boot-imx-96bbf55651fc2bedc175830d22179e384d640d99.zip u-boot-imx-96bbf55651fc2bedc175830d22179e384d640d99.tar.gz u-boot-imx-96bbf55651fc2bedc175830d22179e384d640d99.tar.bz2 |
cmd_sf: Add print mesg for 'sf erase' command
This patch adds a print messages while using 'sf erase' command
to make sure that how many bytes erased in flash device.
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'common/cmd_sf.c')
-rw-r--r-- | common/cmd_sf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/common/cmd_sf.c b/common/cmd_sf.c index 0a17782..7f12a49 100644 --- a/common/cmd_sf.c +++ b/common/cmd_sf.c @@ -305,12 +305,10 @@ static int do_spi_flash_erase(int argc, char * const argv[]) } ret = spi_flash_erase(flash, offset, len); - if (ret) { - printf("SPI flash %s failed\n", argv[0]); - return 1; - } + printf("SF: %zu bytes @ %#x Erased: %s\n", (size_t)len, (u32)offset, + ret ? "ERROR" : "OK"); - return 0; + return ret == 0 ? 0 : 1; } #ifdef CONFIG_CMD_SF_TEST |