From: Jagan Teki <jagannadh.teki@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, U-BOOT] sf: Fix sf read for memory-mapped SPI flashes
Date: Mon, 03 Jun 2013 00:14:37 +0530 [thread overview]
Message-ID: <51AB9295.1000404@gmail.com> (raw)
In-Reply-To: <af2bb084-36d6-4f11-b25e-41c5e65809ac@CO9EHSMHS012.ehs.local>
On 27-05-2013 15:44, Jagannadha Sutradharudu Teki wrote:
> Missing return after memcpy is done for memory-mapped SPI flashes,
> hence added retun 0 after memcpy done.
>
> The return is missing in below patch
> "sf: Enable FDT-based configuration and memory mapping"
> (sha1: bb8215f437a7c948eec82a6abe754c226978bd6d)
>
> Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
> Acked-by: Simon Glass <sjg@chromium.org>
>
> ---
> drivers/mtd/spi/spi_flash.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
> index aeb1ccb..1d45e3b 100644
> --- a/drivers/mtd/spi/spi_flash.c
> +++ b/drivers/mtd/spi/spi_flash.c
> @@ -148,8 +148,10 @@ int spi_flash_cmd_read_fast(struct spi_flash *flash, u32 offset,
> u8 cmd[5];
>
> /* Handle memory-mapped SPI */
> - if (flash->memory_map)
> + if (flash->memory_map) {
> memcpy(data, flash->memory_map + offset, len);
> + return 0;
> + }
>
> cmd[0] = CMD_READ_ARRAY_FAST;
> spi_flash_addr(offset, cmd);
Applied to u-boot-spi/master
--
Thanks,
Jagan.
prev parent reply other threads:[~2013-06-02 18:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 20:14 [U-Boot] [U-BOOT PATCH] sf: Fix sf read for memory-mapped SPI flashes Jagannadha Sutradharudu Teki
2013-05-28 12:40 ` Jagan Teki
2013-05-30 13:36 ` Simon Glass
2013-06-02 18:44 ` Jagan Teki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51AB9295.1000404@gmail.com \
--to=jagannadh.teki@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.