[PATCH RFC 07/12] dma: define CONFIG_OF_DMA_COHERENCY

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Feb 21 00:05:19 PST 2023


Some architectures are either exclusively cache-coherent or not, but
some others can have only some devices that snoop the bus, while the
rest doesn't. Provide a new CONFIG_OF_DMA_COHERENCY symbol for selection
on such platforms.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/dma/Kconfig | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 46b9b90d8231..d96fcd0f845a 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -7,4 +7,14 @@ config MXS_APBH_DMA
 	select STMP_DEVICE
 	help
 	  Experimental!
+
+config OF_DMA_COHERENCY
+	bool "Respect device tree DMA coherency settings" if COMPILE_TEST
+	depends on HAS_DMA
+	help
+	  For most platforms supported, either all DMA is coherent or it isn't.
+	  Platforms that have DMA masters of mixed coherency or that differ
+	  from the architecture default will select this option to parse
+	  DMA coherency out of the DT.
+
 endmenu
-- 
2.30.2




More information about the barebox mailing list