* [PATCH] riscv: dma: rename dma_ops to dma_map_ops.
@ 2025-09-17 6:19 chalianis1
2025-09-22 9:47 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: chalianis1 @ 2025-09-17 6:19 UTC (permalink / raw)
To: s.hauer, a.fatoum; +Cc: barebox, Chali Anis
From: Chali Anis <chalianis1@gmail.com>
rename dma_ops to dma_map_ops for more consistence.
Signed-off-by: Chali Anis <chalianis1@gmail.com>
---
arch/riscv/cpu/dma.c | 6 +++---
arch/riscv/include/asm/dma.h | 4 ++--
drivers/soc/starfive/jh7100_dma.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/riscv/cpu/dma.c b/arch/riscv/cpu/dma.c
index b54b2fec1679..0a4b398c2e3c 100644
--- a/arch/riscv/cpu/dma.c
+++ b/arch/riscv/cpu/dma.c
@@ -30,14 +30,14 @@ static void __dma_free_coherent(struct device *dev,
free(vaddr);
}
-static const struct dma_ops coherent_dma_ops = {
+static const struct dma_map_ops coherent_dma_ops = {
.alloc_coherent = __dma_alloc_coherent,
.free_coherent = __dma_free_coherent,
.flush_range = __dma_flush_range,
.inv_range = __dma_flush_range,
};
-static const struct dma_ops *dma_ops = &coherent_dma_ops;
+static const struct dma_map_ops *dma_ops = &coherent_dma_ops;
void *dma_alloc_coherent(struct device *dev,
size_t size, dma_addr_t *dma_handle)
@@ -51,7 +51,7 @@ void dma_free_coherent(struct device *dev,
dma_ops->free_coherent(dev, vaddr, dma_handle, size);
}
-void dma_set_ops(const struct dma_ops *ops)
+void dma_set_ops(const struct dma_map_ops *ops)
{
dma_ops = ops;
}
diff --git a/arch/riscv/include/asm/dma.h b/arch/riscv/include/asm/dma.h
index 190f8705e2ef..e3602b04397d 100644
--- a/arch/riscv/include/asm/dma.h
+++ b/arch/riscv/include/asm/dma.h
@@ -6,7 +6,7 @@
struct device;
-struct dma_ops {
+struct dma_map_ops {
void *(*alloc_coherent)(struct device *dev, size_t size, dma_addr_t *dma_handle);
void (*free_coherent)(struct device *dev, void *vaddr, dma_addr_t dma_handle, size_t size);
@@ -15,7 +15,7 @@ struct dma_ops {
};
/* Override for SoCs with cache-incoherent DMA masters */
-void dma_set_ops(const struct dma_ops *ops);
+void dma_set_ops(const struct dma_map_ops *ops);
#define DMA_ALIGNMENT 64
diff --git a/drivers/soc/starfive/jh7100_dma.c b/drivers/soc/starfive/jh7100_dma.c
index 1b1cafcba0fe..732dfacdb597 100644
--- a/drivers/soc/starfive/jh7100_dma.c
+++ b/drivers/soc/starfive/jh7100_dma.c
@@ -37,7 +37,7 @@ static inline void jh7100_free_coherent(struct device *dev,
free((void *)dma_handle);
}
-static const struct dma_ops jh7100_dma_ops = {
+static const struct dma_map_ops jh7100_dma_ops = {
.alloc_coherent = jh7100_alloc_coherent,
.free_coherent = jh7100_free_coherent,
.flush_range = sifive_l2_flush64_range,
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-22 9:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-17 6:19 [PATCH] riscv: dma: rename dma_ops to dma_map_ops chalianis1
2025-09-22 9:47 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox