[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d8a81447-d16e-4abc-a115-5c05ab506792@amlogic.com>
Date: Fri, 19 Dec 2025 10:04:10 +0800
From: Xianwei Zhao <xianwei.zhao@...ogic.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, Vinod Koul <vkoul@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Kees Cook <kees@...nel.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: linux-amlogic@...ts.infradead.org, dmaengine@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH 2/3] dma: amlogic: Add general DMA driver for SoCs
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 <xianwei.zhao@...ogic.com>
>>
>> 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 <xianwei.zhao@...ogic.com>
>> ---
>> 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 <xianwei.zhao@...ogic.com>");
>> +MODULE_ALIAS("platform:aml-dma");
>> +MODULE_LICENSE("GPL");
>>
>
>
> Best regards,
> Krzysztof
Powered by blists - more mailing lists