mtd: spi: spi_flash: fix build with dma enabled
PATCH 1/1 mtd: spi: spi_flash: fix build with dma enabled
Fix build with CONFIG_DMA enabled
drivers/mtd/spi/spi_flash.c:376: undefined reference to `dma_memcpy'
--- drivers/mtd/spi/spi_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi/spi_flash.c +1 -1
@@ -457,7 +457,7 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd,*/ void __weak spi_flash_copy_mmap (void *data,void *offset,size_t len) { -#ifdef CONFIG_DMA +#if !defined(CONFIG_SPL_BUILD ) && defined(CONFIG_DMA )if (!dma_memcpy (data, offset, len))return ;#endif
Signature · 1 line
2.10.5
PATCH 1/1 mtd: spi: spi_flash: fix build with dma enabled
Quoted 13 lines · Grygorii Strashko
Fix build with
CONFIG_DMAenabled
drivers/mtd/spi/spi_flash.c:376: undefined reference to `dma_memcpy'Signed-off-by Grygorii Strashko <[email protected]>--- drivers/mtd/spi/spi_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mtd/spi/spi_flash.c +0
-0
drivers/mtd/spi/spi_flash.c int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd, · line 460
Quoted 5 lines
drivers/mtd/spi/spi_flash.c +1
-1@@ -457,7 +457,7 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd,*/ void __weak spi_flash_copy_mmap (void *data,void *offset,size_t len) { -#ifdef CONFIG_DMA +#if !defined(CONFIG_SPL_BUILD ) && defined(CONFIG_DMA )
What if SPI flash using in SPL with DMA enabled?
PATCH 1/1 mtd: spi: spi_flash: fix build with dma enabled
Quoted 10 lines · Jagan Teki
Quoted 8 lines · Grygorii Strashko
Fix build with
CONFIG_DMAenabled
drivers/mtd/spi/spi_flash.c:376: undefined reference to `dma_memcpy'Signed-off-by Grygorii Strashko <[email protected]>--- drivers/mtd/spi/spi_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
drivers/mtd/spi/spi_flash.c int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd, · line 460
Quoted 10 lines
drivers/mtd/spi/spi_flash.c +1
-1@@ -457,7 +457,7 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd,*/ void __weak spi_flash_copy_mmap (void *data,void *offset,size_t len) { -#ifdef CONFIG_DMA +#if !defined(CONFIG_SPL_BUILD ) && defined(CONFIG_DMA )What if SPI flash using in SPL with DMA enabled?
It'd require to do additional fix/rework. I've been thinking about it, but I don't know how to fix it other way - any advice?
Signature · 2 lines
regards, -grygorii