[PATCH master 07/23] RISC-V: dma: fix dma.h inclusion
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Apr 23 23:40:42 PDT 2024
dma.h include <asm/dma.h> first thing, so including <dma.h> from
<asm/dma.h> is pointless and using <asm/dma.h> directly is wrong.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
arch/riscv/cpu/dma.c | 2 +-
arch/riscv/include/asm/dma.h | 2 --
drivers/soc/starfive/jh7100_dma.c | 2 +-
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/riscv/cpu/dma.c b/arch/riscv/cpu/dma.c
index 511170aaa4e2..f3a1a8ec9ac5 100644
--- a/arch/riscv/cpu/dma.c
+++ b/arch/riscv/cpu/dma.c
@@ -2,7 +2,7 @@
#include <common.h>
#include <xfuncs.h>
-#include <asm/dma.h>
+#include <dma.h>
#include <malloc.h>
static void __dma_flush_range(dma_addr_t start, dma_addr_t end)
diff --git a/arch/riscv/include/asm/dma.h b/arch/riscv/include/asm/dma.h
index 56bcf06cc4af..e1829d8c9613 100644
--- a/arch/riscv/include/asm/dma.h
+++ b/arch/riscv/include/asm/dma.h
@@ -17,6 +17,4 @@ void dma_set_ops(const struct dma_ops *ops);
#define DMA_ALIGNMENT 64
-#include <dma.h>
-
#endif /* _ASM_DMA_MAPPING_H */
diff --git a/drivers/soc/starfive/jh7100_dma.c b/drivers/soc/starfive/jh7100_dma.c
index e3cfc8cf6534..5f6e78fc3632 100644
--- a/drivers/soc/starfive/jh7100_dma.c
+++ b/drivers/soc/starfive/jh7100_dma.c
@@ -4,7 +4,7 @@
*/
#include <common.h>
-#include <asm/dma.h>
+#include <dma.h>
#include <soc/sifive/l2_cache.h>
#define SDRAM_CACHED_BASE 0x80000000
--
2.39.2
More information about the barebox
mailing list