public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] dmaengine: Add Loongson Multi-Channel DMA controller support
@ 2026-03-07  3:25 Binbin Zhou
  2026-03-07  3:25 ` [PATCH v4 1/6] dmaengine: loongson: New directory for Loongson DMA controllers drivers Binbin Zhou
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Binbin Zhou @ 2026-03-07  3:25 UTC (permalink / raw)
  To: Binbin Zhou, Huacai Chen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vinod Koul, Frank Li, dmaengine
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree, Keguang Zhang,
	linux-mips, Binbin Zhou

Hi all:

This patchset introduces the Loongson multi-channel DMA controller,
which is present in the Loongson-2K0300 and Loongson-2K3000 processors.

It is a 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.

Additionally, since multiple distinct types of DMA controllers exist on
the Loongson platform, I have attempted to consolidate all Loongson DMA
drivers into a new directory named `Loongson` for easier management.

Thanks.
Binbin

===========
V4:
- Rebase on dmaengine/next tree;
- Add Reviewed-by tags from Frank and Rob, thanks;

patch(1/6):
 - Add `depends on` restrictions.

patch(6/6):
 - Move loongson2_cmc_dma_config{..} close to its users.

Link to V3:
https://lore.kernel.org/dmaengine/cover.1771989595.git.zhoubinbin@loongson.cn/

V3:
- Rebase on dmaengine/next tree;

patch(1/6):
 - Keep alphabet order;

patch(2/6):
 - Add Reviewed-by tag from Frank, thanks;

patch(3/6)/(4/6):
 - New patches, format loongson2-apb-dma driver code;

patch(5/6):
 - Add description for `interrupts` property;

patch(6/6):
 - Use ffs() helper make the code cleaner;
 - Refact loongson2_cmc_dma_chan_irq();
 - Simplify locking with guard() and scoped_guard();
 - kzalloc()->kzalloc_flex().

Link to V2:
https://lore.kernel.org/all/cover.1770605931.git.zhoubinbin@loongson.cn/

V2:
patch(1/4):
 - Update loongson1-apb-dma.c entry in MAINTAINERS.

patch(2/4):
 - New patch, use dmaenginem_async_device_register() helper.

patch(3/4):
 - `additionalProperties: false` replaced by
   `unevaluatedProperties: false`.

patch(4/4):
 - Rename filename as loongson2-apb-cmc-dma.c;
 - Rename Kconfig item as LOONGSON2_APB_CMC_DMA;
 - Rename the variable prefix as `loongson2_cmc_dma`;
 - Use dmaenginem_async_device_register() helper;
 - Drop 'dma_' prefix in struct loongson2_mdma_chan_reg;
 - Use struct_size();

Link to V1:
https://lore.kernel.org/all/cover.1770119693.git.zhoubinbin@loongson.cn/

Binbin Zhou (6):
  dmaengine: loongson: New directory for Loongson DMA controllers
    drivers
  dmaengine: loongson: loongson2-apb: Convert to
    dmaenginem_async_device_register()
  dmaengine: loongson: loongson2-apb: Convert to devm_clk_get_enabled()
  dmaengine: loongson: loongson2-apb: Simplify locking with guard() and
    scoped_guard()
  dt-bindings: dmaengine: Add Loongson Multi-Channel DMA controller
  dmaengine: loongson: New driver for the Loongson Multi-Channel DMA
    controller

 .../bindings/dma/loongson,ls2k0300-dma.yaml   |  81 ++
 MAINTAINERS                                   |   7 +-
 drivers/dma/Kconfig                           |  25 +-
 drivers/dma/Makefile                          |   3 +-
 drivers/dma/loongson/Kconfig                  |  41 +
 drivers/dma/loongson/Makefile                 |   4 +
 .../dma/{ => loongson}/loongson1-apb-dma.c    |   4 +-
 drivers/dma/loongson/loongson2-apb-cmc-dma.c  | 730 ++++++++++++++++++
 .../dma/{ => loongson}/loongson2-apb-dma.c    |  93 +--
 9 files changed, 903 insertions(+), 85 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml
 create mode 100644 drivers/dma/loongson/Kconfig
 create mode 100644 drivers/dma/loongson/Makefile
 rename drivers/dma/{ => loongson}/loongson1-apb-dma.c (99%)
 create mode 100644 drivers/dma/loongson/loongson2-apb-cmc-dma.c
 rename drivers/dma/{ => loongson}/loongson2-apb-dma.c (91%)


base-commit: c8e9b1d9febc83ee94944695a07cfd40a1b29743
-- 
2.52.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-03-17 11:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-07  3:25 [PATCH v4 0/6] dmaengine: Add Loongson Multi-Channel DMA controller support Binbin Zhou
2026-03-07  3:25 ` [PATCH v4 1/6] dmaengine: loongson: New directory for Loongson DMA controllers drivers Binbin Zhou
2026-03-09  5:05   ` Keguang Zhang
2026-03-07  3:25 ` [PATCH v4 2/6] dmaengine: loongson: loongson2-apb: Convert to dmaenginem_async_device_register() Binbin Zhou
2026-03-07  3:25 ` [PATCH v4 3/6] dmaengine: loongson: loongson2-apb: Convert to devm_clk_get_enabled() Binbin Zhou
2026-03-07  3:25 ` [PATCH v4 4/6] dmaengine: loongson: loongson2-apb: Simplify locking with guard() and scoped_guard() Binbin Zhou
2026-03-07  3:25 ` [PATCH v4 5/6] dt-bindings: dmaengine: Add Loongson Multi-Channel DMA controller Binbin Zhou
2026-03-07  3:25 ` [PATCH v4 6/6] dmaengine: loongson: New driver for the " Binbin Zhou
2026-03-09 13:32 ` [PATCH v4 0/6] dmaengine: Add Loongson Multi-Channel DMA controller support Huacai Chen
2026-03-17 11:28 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox