mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-27 06:32:37 +01:00
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: bb8215f437)
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e4eaef8910
commit
0d3b596aa3
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue