Skip to contentSkip to conversation

cmd/dma: fix generic naming, spacing, and Dependencies

PATCH In review briansune 3 participants 7 messages Sep 14, 2025 – Oct 8, 2025

lore
Share & tools
lore

briansune

author
#0 lore raw

PATCH 1/1 cmd/dma: fix generic naming, spacing, and Dependencies

This adds a new U-Boot command 'c5_pl330_dma' for Cyclone V SoCDK boards. It provides access to the Reset Manager's Per2ModRst register to release the reset for ARM PrimeCell PL330 DMA channels. This allows software to initialize and use the PL330 DMA controller properly after reset.

---
 cmd/4913           |  0
 cmd/5036           |  0
 cmd/Kconfig        |  9 +++++++++
 cmd/Makefile       |  1 +
 cmd/c5_pl330_dma.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 60 insertions(+)
 create mode 100644 cmd/4913
 create mode 100644 cmd/5036
 create mode 100644 cmd/c5_pl330_dma.c
cmd/4913 new file +0 -0
new file mode 100644
index 00000000000..e69de29bb2d
cmd/5036 new file +0 -0
new file mode 100644
index 00000000000..e69de29bb2d
cmd/Kconfig +9 -0
index 29de857ba7c..75c388d19da 100644
@@ -1791,6 +1791,15 @@ endmenu
 
 menu "Shell scripting commands"
 
+if TARGET_SOCFPGA_CYCLONE5_SOCDK
+
+config CMD_C5_PL330_DMA
+	bool "Release Reset DMA Channels for PL330 Handshake"
+	help
+	  Provides access to Reset Manager Per2ModRst. Enables DMA
+	  channels for ARM PrimeCell PL330 via reset release.
+endif
+
 config CMD_CAT
 	bool "cat"
 	help
cmd/Makefile +1 -0
index 36e79cc3c28..d16e6fae20a 100644
@@ -42,6 +42,7 @@ obj-$(CONFIG_CMD_BOOTI) += booti.o
 obj-$(CONFIG_CMD_BTRFS) += btrfs.o
 obj-$(CONFIG_CMD_BUTTON) += button.o
 obj-$(CONFIG_CMD_CAT) += cat.o
+obj-$(CONFIG_CMD_C5_PL330_DMA) += c5_pl330_dma.o
 obj-$(CONFIG_CMD_CACHE) += cache.o
 obj-$(CONFIG_CMD_CBFS) += cbfs.o
 obj-$(CONFIG_CMD_CEDIT) += cedit.o
cmd/c5_pl330_dma.c new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.47.1.windows.1
#1 lore raw

Hi Brian,

The git commit title doesn't seem related to the actual content of the patch?

Quoted 7 lines · briansune

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

This adds a new U-Boot command 'c5_pl330_dma' for Cyclone V SoCDK boards. It provides access to the Reset Manager's Per2ModRst register to release the reset for ARM PrimeCell PL330 DMA channels. This allows software to initialize and use the PL330 DMA controller properly after reset.

Isn't this something that should be done by boards directly (i.e. somewhere in board/ directory) or at the SoC/arch level (i.e. arch/arm or arch/arm/mach-socfpga) or handle that in a DMA driver (I assume there's none now looking at drivers/dma/)? Essentially the question is "why do we need this as a command?".

Quoted 2 lines

Needs to be Brian Sune here (same for the commit author which you can change with git commit --amend --author="Brian Sune <[email protected]>" if I remember correctly).

Quoted 3 lines
---
  cmd/4913           |  0
  cmd/5036           |  0

We don't need those files I assume?

Cheers,
Quentin

author
#2 lore raw

PATCH v2 1/1 cmd/dma: implement dmareset command

In reply to briansune

This adds a new U-Boot command 'c5_pl330_dma' for Cyclone V SoCDK boards. It provides access to the Reset Manager's Per2ModRst register to release the reset for ARM PrimeCell PL330 DMA channels. This allows software to initialize and use the PL330 DMA controller properly after reset.

---
 cmd/Kconfig        |  9 +++++++++
 cmd/Makefile       |  1 +
 cmd/c5_pl330_dma.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+)
 create mode 100644 cmd/c5_pl330_dma.c
cmd/Kconfig +9 -0
index 29de857ba7c..75c388d19da 100644
@@ -1791,6 +1791,15 @@ endmenu
 
 menu "Shell scripting commands"
 
+if TARGET_SOCFPGA_CYCLONE5_SOCDK
+
+config CMD_C5_PL330_DMA
+	bool "Release Reset DMA Channels for PL330 Handshake"
+	help
+	  Provides access to Reset Manager Per2ModRst. Enables DMA
+	  channels for ARM PrimeCell PL330 via reset release.
+endif
+
 config CMD_CAT
 	bool "cat"
 	help
cmd/Makefile +1 -0
index 36e79cc3c28..d16e6fae20a 100644
@@ -42,6 +42,7 @@ obj-$(CONFIG_CMD_BOOTI) += booti.o
 obj-$(CONFIG_CMD_BTRFS) += btrfs.o
 obj-$(CONFIG_CMD_BUTTON) += button.o
 obj-$(CONFIG_CMD_CAT) += cat.o
+obj-$(CONFIG_CMD_C5_PL330_DMA) += c5_pl330_dma.o
 obj-$(CONFIG_CMD_CACHE) += cache.o
 obj-$(CONFIG_CMD_CBFS) += cbfs.o
 obj-$(CONFIG_CMD_CEDIT) += cedit.o
cmd/c5_pl330_dma.c new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.47.1.windows.1
#3 lore raw

Re: [PATCH v2] cmd/dma: implement dmareset command

Quoted 8 lines · briansune

This adds a new U-Boot command 'c5_pl330_dma' for Cyclone V SoCDK boards. It provides access to the Reset Manager's Per2ModRst register to release the reset for ARM PrimeCell PL330 DMA channels. This allows software to initialize and use the PL330 DMA controller properly after reset.

[...]

Applied to u-boot/master, thanks!

[1/1] cmd/dma: implement dmareset command

      commit: 92dcb3ad5d98f494b2448a7345e1cb7eefa50278
Signature · 1 line
Tom
author
#4 lore raw

Re: [PATCH v2] cmd/dma: implement dmareset command

Tom Rini <[email protected]> 於 2025年10月8日 週三 下午12:22寫道:

Quoted 6 lines

Applied to u-boot/master, thanks!

[1/1] cmd/dma: implement dmareset command

      commit: 92dcb3ad5d98f494b2448a7345e1cb7eefa50278

--
Tom

Welcome to help.
Brian

author
#5 lore raw

Re: [PATCH v2] cmd/dma: implement dmareset command

In reply to Tom Rini

Tom Rini <[email protected]> 於 2025年10月8日 週三 下午12:22寫道:

Quoted 4 lines

[1/1] cmd/dma: implement dmareset command

      commit: 92dcb3ad5d98f494b2448a7345e1cb7eefa50278

--
Tom

May I ask do there are any documentation to show how to run this command on boot.scr
Or possible during U-Boot setup?

#6 lore raw

Re: [PATCH v2] cmd/dma: implement dmareset command

Quoted 10 lines · Sune Brian

Tom Rini <[email protected]> 於 2025年10月8日 週三 下午12:22寫道:

Quoted 4 lines

[1/1] cmd/dma: implement dmareset command

      commit: 92dcb3ad5d98f494b2448a7345e1cb7eefa50278

--
Tom

May I ask do there are any documentation to show how to run this command on boot.scr
Or possible during U-Boot setup?

Well, once it's enabled in your build you can invoke it like normal, or add it to your boot.cmd script, or possibly add it to CONFIG_PREBOOT and run it that way, depending on how it's supposed to be used.

Signature · 1 line
Tom