Commit Graph

6 Commits

Author SHA1 Message Date
Colin Ian King
4a2759a3ae dmaengine: loongson: Fix spelling mistake "Looongson" -> "Looogson"
There are a couple of spelling mistakes, one in a comment block and
one in a module description. Fix them.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20260317204631.120332-1-colin.i.king@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-03-18 15:10:55 +05:30
Binbin Zhou
1c0028e725 dmaengine: loongson: New driver for the Loongson Multi-Channel DMA controller
This DMA controller appears in Loongson-2K0300 and Loongson-2K3000.

It is a chain multi-channel controller that enables data transfers from
memory to memory, device to memory, and memory to device, as well as
channel prioritization configurable through the channel configuration
registers.

In addition, there are slight differences between Loongson-2K0300 and
Loongson-2K3000, such as channel register offsets and the number of
channels.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/73bc32ba6249f1eef94fec9b349bc9efa98278ea.1772853681.git.zhoubinbin@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-03-17 16:48:55 +05:30
Binbin Zhou
9de4303fc0 dmaengine: loongson: loongson2-apb: Simplify locking with guard() and scoped_guard()
Use guard() and scoped_guard() infrastructure instead of explicitly
acquiring and releasing spinlocks to simplify the code and ensure that
all locks are released properly.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/fb59bb25e5c4fcb84d9aa7b351285fa8d02ea8cb.1772853681.git.zhoubinbin@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-03-17 16:48:55 +05:30
Binbin Zhou
bdf1621a6a dmaengine: loongson: loongson2-apb: Convert to devm_clk_get_enabled()
Use the devm_clk_get_enabled() helper function to simplify the probe
routine.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/4f3aad22d14e730cc040ece8b0ced37853d52876.1772853681.git.zhoubinbin@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-03-17 16:48:55 +05:30
Binbin Zhou
7d348227f4 dmaengine: loongson: loongson2-apb: Convert to dmaenginem_async_device_register()
Use the dmaenginem_async_device_register() helper function to simplify
the probe routine.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/c56e67ecde38e9a3bda5f88ea3fc20b97a5cba6c.1772853681.git.zhoubinbin@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-03-17 16:48:55 +05:30
Binbin Zhou
ffee2dc04e dmaengine: loongson: New directory for Loongson DMA controllers drivers
Gather the Loongson DMA controllers under drivers/dma/loongson/

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Keguang Zhang <keguang.zhang@gmail.com>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/0a0853a85630724741061f6fe08680610e49a06e.1772853681.git.zhoubinbin@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-03-17 16:48:55 +05:30