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 /drivers/mtd/spi/spi_flash.c | |
| parent | 0d3b596aa35fd828f2147c6d3c86d4e2730f7b29 (diff) | |
| download | olio-uboot-2014.01-96bbf55651fc2bedc175830d22179e384d640d99.tar.xz olio-uboot-2014.01-96bbf55651fc2bedc175830d22179e384d640d99.zip | |
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 'drivers/mtd/spi/spi_flash.c')
| -rw-r--r-- | drivers/mtd/spi/spi_flash.c | 7 | 
1 files changed, 2 insertions, 5 deletions
| diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 6fa932cbd..de6fd58e8 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -207,7 +207,7 @@ int spi_flash_cmd_wait_ready(struct spi_flash *flash, unsigned long timeout)  int spi_flash_cmd_erase(struct spi_flash *flash, u32 offset, size_t len)  { -	u32 start, end, erase_size; +	u32 end, erase_size;  	int ret;  	u8 cmd[4]; @@ -227,8 +227,7 @@ int spi_flash_cmd_erase(struct spi_flash *flash, u32 offset, size_t len)  		cmd[0] = CMD_ERASE_4K;  	else  		cmd[0] = CMD_ERASE_64K; -	start = offset; -	end = start + len; +	end = offset + len;  	while (offset < end) {  		spi_flash_addr(offset, cmd); @@ -250,8 +249,6 @@ int spi_flash_cmd_erase(struct spi_flash *flash, u32 offset, size_t len)  			goto out;  	} -	debug("SF: Successfully erased %zu bytes @ %#x\n", len, start); -   out:  	spi_release_bus(flash->spi);  	return ret; |