summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2026-03-25 10:00:20 +0100
committerRob Herring (Arm) <robh@kernel.org>2026-03-26 14:12:02 -0500
commit7fd3981202b9aef8862aa06ca0d75496c0f9681f (patch)
tree913ab93d62d82596a7cb4bfa8df625b22ef98187 /include
parentc640cad6a5382ea08a4e052156cfefc8021c51b7 (diff)
of: reserved_mem: replace CMA quirks by generic methods
Add optional reserved memory callbacks to perform region verification and early fixup, then move all CMA related code in of_reserved_mem.c to them. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://patch.msgid.link/20260325090023.3175348-5-m.szyprowski@samsung.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cma.h10
-rw-r--r--include/linux/dma-map-ops.h3
-rw-r--r--include/linux/of_reserved_mem.h3
3 files changed, 3 insertions, 13 deletions
diff --git a/include/linux/cma.h b/include/linux/cma.h
index d0793eaaadaa..8555d38a97b1 100644
--- a/include/linux/cma.h
+++ b/include/linux/cma.h
@@ -61,14 +61,4 @@ extern int cma_for_each_area(int (*it)(struct cma *cma, void *data), void *data)
extern bool cma_intersects(struct cma *cma, unsigned long start, unsigned long end);
extern void cma_reserve_pages_on_error(struct cma *cma);
-
-#ifdef CONFIG_DMA_CMA
-extern bool cma_skip_dt_default_reserved_mem(void);
-#else
-static inline bool cma_skip_dt_default_reserved_mem(void)
-{
- return false;
-}
-#endif
-
#endif
diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h
index 60b63756df82..55ecd2934225 100644
--- a/include/linux/dma-map-ops.h
+++ b/include/linux/dma-map-ops.h
@@ -147,9 +147,6 @@ static inline void dma_free_contiguous(struct device *dev, struct page *page,
{
__free_pages(page, get_order(size));
}
-static inline void dma_contiguous_early_fixup(phys_addr_t base, unsigned long size)
-{
-}
#endif /* CONFIG_DMA_CMA*/
#ifdef CONFIG_DMA_DECLARE_COHERENT
diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h
index 747a1e73d5dd..e8b20b29fa68 100644
--- a/include/linux/of_reserved_mem.h
+++ b/include/linux/of_reserved_mem.h
@@ -18,6 +18,9 @@ struct reserved_mem {
};
struct reserved_mem_ops {
+ int (*node_validate)(unsigned long fdt_node, phys_addr_t *align);
+ int (*node_fixup)(unsigned long fdt_node, phys_addr_t base,
+ phys_addr_t size);
int (*node_init)(unsigned long fdt_node, struct reserved_mem *rmem);
int (*device_init)(struct reserved_mem *rmem,
struct device *dev);