[U-Boot] [PATCH 1/4] sf: Enable prints on erase and write functions
Simon Glass
sjg at chromium.org
Mon Dec 10 20:26:33 CET 2012
Hi,
On Mon, Dec 10, 2012 at 6:41 AM, Jagannadha Sutradharudu Teki
<jagannadh.teki at gmail.com> wrote:
> This patch provides to enabled the prints on erase and write
> functions to make sure that how many bytes erase/write into flash device.
>
> Signed-off-by: Jagannadha Sutradharudu Teki <jagannadh.teki at gmail.com>
> ---
> drivers/mtd/spi/spi_flash.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
> index 00aece9..464c2ab 100644
> --- a/drivers/mtd/spi/spi_flash.c
> +++ b/drivers/mtd/spi/spi_flash.c
> @@ -115,7 +115,7 @@ int spi_flash_cmd_write_multi(struct spi_flash *flash, u32 offset,
> byte_addr = 0;
> }
>
> - debug("SF: program %s %zu bytes @ %#x\n",
> + printf("SF: program %s %zu bytes @ %#x\n",
> ret ? "failure" : "success", len, offset);
I don't think we want this - it will make programming very slow and verbose.
>
> spi_release_bus(flash->spi);
> @@ -235,7 +235,7 @@ 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);
> + printf("SF: Successfully erased %zu bytes @ %#x\n", len, start);
You may want to put this code into cmd_sf instead, where it is
reasonable to add messages. You are changing core spi code which might
be used from many places.
>
> out:
> spi_release_bus(flash->spi);
> --
> 1.7.0.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Regards,
Simon
More information about the U-Boot
mailing list