summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorJagannadha Sutradharudu Teki <jagannadha.sutradharudu-teki@xilinx.com>2013-05-27 10:14:14 +0000
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-06-03 00:04:40 +0530
commit0d3b596aa35fd828f2147c6d3c86d4e2730f7b29 (patch)
tree210d02e51d77aeb8764d380759d82ec88fd7e43b /drivers/mtd
parente4eaef8910df805d511b1cb9b2caafa7d2827fdc (diff)
downloadu-boot-imx-0d3b596aa35fd828f2147c6d3c86d4e2730f7b29.zip
u-boot-imx-0d3b596aa35fd828f2147c6d3c86d4e2730f7b29.tar.gz
u-boot-imx-0d3b596aa35fd828f2147c6d3c86d4e2730f7b29.tar.bz2
sf: Fix sf read for memory-mapped SPI flashes
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi/spi_flash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 111185a..6fa932c 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -150,8 +150,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);