Hi Krzysztof,
   Thanks for your review.

On 2025/12/16 16:46, Krzysztof Kozlowski wrote:
[ EXTERNAL EMAIL ]

On 16/12/2025 09:03, Xianwei Zhao via B4 Relay wrote:
From: Xianwei Zhao <[email protected]>

Amlogic SoCs include a general-purpose DMA controller that can be used
by multiple peripherals, such as I2C PIO and I3C. Each peripheral group
is associated with a dedicated DMA channel in hardware.

Signed-off-by: Xianwei Zhao <[email protected]>
---
  drivers/dma/Kconfig       |   8 +
  drivers/dma/Makefile      |   1 +
  drivers/dma/amlogic-dma.c | 567 ++++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 576 insertions(+)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 8bb0a119ecd4..fc7f70e22c22 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -85,6 +85,14 @@ config AMCC_PPC440SPE_ADMA
       help
         Enable support for the AMCC PPC440SPe RAID engines.

+config AMLOGIC_DMA
+     tristate "Amlogic genneral DMA support"
+     depends on ARCH_MESON

Missing compile test.


Will Add it. depends on ARCH_MESON || COMPILE_TEST

+     select DMA_ENGINE
+     select REGMAP_MMIO
+     help
+       Enable support for the Amlogic general DMA engines.
+



+
+     ret = of_dma_controller_register(np, aml_of_dma_xlate, aml_dma);
+     if (ret)
+             return ret;
+
+     regmap_write(aml_dma->regmap, RCH_INT_MASK, 0xffffffff);
+     regmap_write(aml_dma->regmap, WCH_INT_MASK, 0xffffffff);
+
+     ret = devm_request_irq(&pdev->dev, aml_dma->irq, 
aml_dma_interrupt_handler,
+                            IRQF_SHARED, dev_name(&pdev->dev), aml_dma);
+     if (ret)
+             return ret;
+
+     dev_info(aml_dma->dma_device.dev, "initialized\n");

Useless message, drop. This does not look like useful printk message.
Drivers should be silent on success:
https://elixir.bootlin.com/linux/v6.15-rc7/source/Documentation/process/coding-style.rst#L913
https://elixir.bootlin.com/linux/v6.15-rc7/source/Documentation/process/debugging/driver_development_debugging_guide.rst#L79


Will drop it.

+
+     return 0;
+}
+
+static const struct of_device_id aml_dma_ids[] = {
+     { .compatible = "amlogic,general-dma", },
+     {},
+};
+MODULE_DEVICE_TABLE(of, aml_dma_ids);
+
+static struct platform_driver aml_dma_driver = {
+     .probe = aml_dma_probe,
+     .driver         = {
+             .name   = "aml-dma",
+             .of_match_table = aml_dma_ids,
+     },
+};
+
+module_platform_driver(aml_dma_driver);
+
+MODULE_DESCRIPTION("GENERAL DMA driver for Amlogic");
+MODULE_AUTHOR("Xianwei Zhao <[email protected]>");
+MODULE_ALIAS("platform:aml-dma");
+MODULE_LICENSE("GPL");



Best regards,
Krzysztof

Reply via email to