From: chalianis1@gmail.com
To: s.hauer@pengutronix.de, a.fatoum@barebox.org
Cc: barebox@lists.infradead.org, Chali Anis <chalianis1@gmail.com>
Subject: [PATCH] riscv: dma: rename dma_ops to dma_map_ops.
Date: Wed, 17 Sep 2025 02:19:04 -0400 [thread overview]
Message-ID: <20250917061904.720116-1-chalianis1@gmail.com> (raw)
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
next reply other threads:[~2025-09-17 6:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 6:19 chalianis1 [this message]
2025-09-22 9:47 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250917061904.720116-1-chalianis1@gmail.com \
--to=chalianis1@gmail.com \
--cc=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox