public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [U-BOOT PATCH] sf: Fix sf read for memory-mapped SPI flashes
@ 2013-05-27 20:14 Jagannadha Sutradharudu Teki
  2013-05-28 12:40 ` Jagan Teki
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jagannadha Sutradharudu Teki @ 2013-05-27 20:14 UTC (permalink / raw)
  To: u-boot

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>
---
 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);
-- 
1.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-02 18:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [U-Boot] [U-Boot, U-BOOT] " Jagan Teki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox