cmd_sf: Add print mesg for 'sf erase' command
[platform/kernel/u-boot.git] / drivers / mtd / spi / spi_flash.c
index 6fa932c..de6fd58 100644 (file)
@@ -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;