diff options
author | Tom Rini <trini@konsulko.com> | 2016-02-23 08:13:46 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-02-23 08:13:46 -0500 |
commit | b625fab7069cab52fd8e0c3dbb25e0d04d020173 (patch) | |
tree | 13d5c94c6c36724136264a4c3b9764583eace1c4 /drivers/mtd/spi | |
parent | bed6bd326e89366152609821a752d361b2183b46 (diff) | |
parent | 674f3609aad39f099a5c3605643a6be124504b96 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-spi
Diffstat (limited to 'drivers/mtd/spi')
-rw-r--r-- | drivers/mtd/spi/spi_flash.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 8a60c72926..3c365d5e9a 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -16,6 +16,7 @@ #include <spi.h> #include <spi_flash.h> #include <linux/log2.h> +#include <dma.h> #include "sf_internal.h" @@ -454,8 +455,16 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd, return ret; } +/* + * TODO: remove the weak after all the other spi_flash_copy_mmap + * implementations removed from drivers + */ void __weak spi_flash_copy_mmap(void *data, void *offset, size_t len) { +#ifdef CONFIG_DMA + if (!dma_memcpy(data, offset, len)) + return; +#endif memcpy(data, offset, len); } |