* [PATCH v3 00/12] Introduce STM32 DMA3 support
@ 2024-05-20 15:42 Amelie Delaunay
2024-05-20 15:42 ` [PATCH v3 01/12] dt-bindings: dma: New directory for STM32 DMA controllers bindings Amelie Delaunay
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Amelie Delaunay @ 2024-05-20 15:42 UTC (permalink / raw)
To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Maxime Coquelin, Alexandre Torgue
Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-hardening, Amelie Delaunay
STM32 DMA3 is a direct memory access controller with different features
depending on its hardware configuration. It is either called LPDMA (Low
Power), GPDMA (General Purpose) or HPDMA (High Performance), and it can
be found in new STM32 MCUs and MPUs.
In STM32MP25 SoC [1], 3 HPDMAs and 1 LPDMA are embedded. Only HPDMAs are
used by Linux.
Before adding this new driver, this series gathers existing STM32 DMA
drivers and bindings under stm32/ subdirectory and adds an entry in
MAINTAINERS file.
To ease review, the initial "dmaengine: Add STM32 DMA3 support" has been
split into functionnalities.
Patches 6 to 9 can be squashed into patch 5.
Patch 10 has already been proposed [2], the API is now used in stm32-dma3
driver. Indeed, STM32 DMA3 channels can be individually reserved either
because they are secure, or dedicated to another CPU. These channels are
not registered in dmaengine, so id is not incremented, but, using the new
API to specify the channel name, channel name matches the name in the
Reference Manual and ease requesting a channel thanks to its name.
[1] https://www.st.com/resource/en/reference_manual/rm0457-stm32mp25xx-advanced-armbased-3264bit-mpus-stmicroelectronics.pdf
[2] https://lore.kernel.org/lkml/20231213174021.3074759-1-amelie.delaunay@foss.st.com/
v3:
- address Rob's remarks about st,stm32-dma3.yaml
(wrap at 80, remove useless '|')
- address Frank's remarks about patch 5: improve commit message and
ensure descriptors availability before starting the channel
v2:
- fix reference in spi/st,stm32-spi.yaml with an updated description of the
dmas property to reflect the new path of STM32 DMA controllers bindings.
- address Rob's remarks about st,stm32-dma3.yaml
- address Vinod's remarks about stm32-dma3.c
Amelie Delaunay (12):
dt-bindings: dma: New directory for STM32 DMA controllers bindings
dmaengine: stm32: New directory for STM32 DMA controllers drivers
MAINTAINERS: Add entry for STM32 DMA controllers drivers and
documentation
dt-bindings: dma: Document STM32 DMA3 controller bindings
dmaengine: Add STM32 DMA3 support
dmaengine: stm32-dma3: add DMA_CYCLIC capability
dmaengine: stm32-dma3: add DMA_MEMCPY capability
dmaengine: stm32-dma3: add device_pause and device_resume ops
dmaengine: stm32-dma3: improve residue granularity
dmaengine: add channel device name to channel registration
dmaengine: stm32-dma3: defer channel registration to specify channel
name
arm64: dts: st: add HPDMA nodes on stm32mp251
.../dma/{ => stm32}/st,stm32-dma.yaml | 4 +-
.../bindings/dma/stm32/st,stm32-dma3.yaml | 135 ++
.../dma/{ => stm32}/st,stm32-dmamux.yaml | 4 +-
.../dma/{ => stm32}/st,stm32-mdma.yaml | 4 +-
.../devicetree/bindings/spi/st,stm32-spi.yaml | 2 +-
MAINTAINERS | 9 +
arch/arm64/boot/dts/st/stm32mp251.dtsi | 69 +
drivers/dma/Kconfig | 34 +-
drivers/dma/Makefile | 4 +-
drivers/dma/dmaengine.c | 16 +-
drivers/dma/idxd/dma.c | 2 +-
drivers/dma/stm32/Kconfig | 47 +
drivers/dma/stm32/Makefile | 5 +
drivers/dma/{ => stm32}/stm32-dma.c | 2 +-
drivers/dma/stm32/stm32-dma3.c | 1847 +++++++++++++++++
drivers/dma/{ => stm32}/stm32-dmamux.c | 0
drivers/dma/{ => stm32}/stm32-mdma.c | 2 +-
include/linux/dmaengine.h | 3 +-
18 files changed, 2137 insertions(+), 52 deletions(-)
rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-dma.yaml (97%)
create mode 100644 Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-dmamux.yaml (89%)
rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-mdma.yaml (96%)
create mode 100644 drivers/dma/stm32/Kconfig
create mode 100644 drivers/dma/stm32/Makefile
rename drivers/dma/{ => stm32}/stm32-dma.c (99%)
create mode 100644 drivers/dma/stm32/stm32-dma3.c
rename drivers/dma/{ => stm32}/stm32-dmamux.c (100%)
rename drivers/dma/{ => stm32}/stm32-mdma.c (99%)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v3 01/12] dt-bindings: dma: New directory for STM32 DMA controllers bindings
2024-05-20 15:42 [PATCH v3 00/12] Introduce STM32 DMA3 support Amelie Delaunay
@ 2024-05-20 15:42 ` Amelie Delaunay
2024-05-20 15:42 ` [PATCH v3 02/12] dmaengine: stm32: New directory for STM32 DMA controllers drivers Amelie Delaunay
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Amelie Delaunay @ 2024-05-20 15:42 UTC (permalink / raw)
To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Maxime Coquelin, Alexandre Torgue
Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-hardening, Amelie Delaunay, Rob Herring
Gather the STM32 DMA controllers bindings under ./dma/stm32/.
Then fix reference to old path in spi/st,stm32-spi.yaml: update the dmas
property description by referring to all STM32 DMA controllers bindings.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
v3:
- add Rob's Acked-by
v2:
- fix reference in spi/st,stm32-spi.yaml with an updated description of the
dmas property to reflect the new path of STM32 DMA controllers bindings.
---
.../devicetree/bindings/dma/{ => stm32}/st,stm32-dma.yaml | 4 ++--
.../devicetree/bindings/dma/{ => stm32}/st,stm32-dmamux.yaml | 4 ++--
.../devicetree/bindings/dma/{ => stm32}/st,stm32-mdma.yaml | 4 ++--
Documentation/devicetree/bindings/spi/st,stm32-spi.yaml | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-dma.yaml (97%)
rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-dmamux.yaml (89%)
rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-mdma.yaml (96%)
diff --git a/Documentation/devicetree/bindings/dma/st,stm32-dma.yaml b/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma.yaml
similarity index 97%
rename from Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
rename to Documentation/devicetree/bindings/dma/stm32/st,stm32-dma.yaml
index 329847ef096a..071363d18443 100644
--- a/Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma.yaml
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
-$id: http://devicetree.org/schemas/dma/st,stm32-dma.yaml#
+$id: http://devicetree.org/schemas/dma/stm32/st,stm32-dma.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics STM32 DMA Controller
@@ -53,7 +53,7 @@ maintainers:
- Amelie Delaunay <amelie.delaunay@foss.st.com>
allOf:
- - $ref: dma-controller.yaml#
+ - $ref: /schemas/dma/dma-controller.yaml#
properties:
"#dma-cells":
diff --git a/Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml b/Documentation/devicetree/bindings/dma/stm32/st,stm32-dmamux.yaml
similarity index 89%
rename from Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml
rename to Documentation/devicetree/bindings/dma/stm32/st,stm32-dmamux.yaml
index e722fbcd8a5f..88c9e88cf3d5 100644
--- a/Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml
+++ b/Documentation/devicetree/bindings/dma/stm32/st,stm32-dmamux.yaml
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
-$id: http://devicetree.org/schemas/dma/st,stm32-dmamux.yaml#
+$id: http://devicetree.org/schemas/dma/stm32/st,stm32-dmamux.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics STM32 DMA MUX (DMA request router)
@@ -10,7 +10,7 @@ maintainers:
- Amelie Delaunay <amelie.delaunay@foss.st.com>
allOf:
- - $ref: dma-router.yaml#
+ - $ref: /schemas/dma/dma-router.yaml#
properties:
"#dma-cells":
diff --git a/Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml b/Documentation/devicetree/bindings/dma/stm32/st,stm32-mdma.yaml
similarity index 96%
rename from Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml
rename to Documentation/devicetree/bindings/dma/stm32/st,stm32-mdma.yaml
index 3874544dfa74..45fe91db11db 100644
--- a/Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml
+++ b/Documentation/devicetree/bindings/dma/stm32/st,stm32-mdma.yaml
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
-$id: http://devicetree.org/schemas/dma/st,stm32-mdma.yaml#
+$id: http://devicetree.org/schemas/dma/stm32/st,stm32-mdma.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics STM32 MDMA Controller
@@ -53,7 +53,7 @@ maintainers:
- Amelie Delaunay <amelie.delaunay@foss.st.com>
allOf:
- - $ref: dma-controller.yaml#
+ - $ref: /schemas/dma/dma-controller.yaml#
properties:
"#dma-cells":
diff --git a/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml b/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml
index 4bd9aeb81208..de431e8306cd 100644
--- a/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml
+++ b/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml
@@ -42,7 +42,7 @@ properties:
dmas:
description: |
DMA specifiers for tx and rx dma. DMA fifo mode must be used. See
- the STM32 DMA bindings Documentation/devicetree/bindings/dma/st,stm32-dma.yaml.
+ the STM32 DMA controllers bindings Documentation/devicetree/bindings/dma/stm32/*.yaml.
items:
- description: rx DMA channel
- description: tx DMA channel
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v3 02/12] dmaengine: stm32: New directory for STM32 DMA controllers drivers
2024-05-20 15:42 [PATCH v3 00/12] Introduce STM32 DMA3 support Amelie Delaunay
2024-05-20 15:42 ` [PATCH v3 01/12] dt-bindings: dma: New directory for STM32 DMA controllers bindings Amelie Delaunay
@ 2024-05-20 15:42 ` Amelie Delaunay
2024-05-20 15:42 ` [PATCH v3 03/12] MAINTAINERS: Add entry for STM32 DMA controllers drivers and documentation Amelie Delaunay
2024-05-20 15:46 ` [PATCH v3 00/12] Introduce STM32 DMA3 support Amelie Delaunay
3 siblings, 0 replies; 6+ messages in thread
From: Amelie Delaunay @ 2024-05-20 15:42 UTC (permalink / raw)
To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Maxime Coquelin, Alexandre Torgue
Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-hardening, Amelie Delaunay
Gather the STM32 DMA controllers under drivers/dma/stm32/
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
drivers/dma/Kconfig | 34 ++---------------------
drivers/dma/Makefile | 4 +--
drivers/dma/stm32/Kconfig | 37 ++++++++++++++++++++++++++
drivers/dma/stm32/Makefile | 4 +++
drivers/dma/{ => stm32}/stm32-dma.c | 2 +-
drivers/dma/{ => stm32}/stm32-dmamux.c | 0
drivers/dma/{ => stm32}/stm32-mdma.c | 2 +-
7 files changed, 46 insertions(+), 37 deletions(-)
create mode 100644 drivers/dma/stm32/Kconfig
create mode 100644 drivers/dma/stm32/Makefile
rename drivers/dma/{ => stm32}/stm32-dma.c (99%)
rename drivers/dma/{ => stm32}/stm32-dmamux.c (100%)
rename drivers/dma/{ => stm32}/stm32-mdma.c (99%)
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 002a5ec80620..32b4256ef874 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -568,38 +568,6 @@ config ST_FDMA
Say Y here if you have such a chipset.
If unsure, say N.
-config STM32_DMA
- bool "STMicroelectronics STM32 DMA support"
- depends on ARCH_STM32 || COMPILE_TEST
- select DMA_ENGINE
- select DMA_VIRTUAL_CHANNELS
- help
- Enable support for the on-chip DMA controller on STMicroelectronics
- STM32 MCUs.
- If you have a board based on such a MCU and wish to use DMA say Y
- here.
-
-config STM32_DMAMUX
- bool "STMicroelectronics STM32 dma multiplexer support"
- depends on STM32_DMA || COMPILE_TEST
- help
- Enable support for the on-chip DMA multiplexer on STMicroelectronics
- STM32 MCUs.
- If you have a board based on such a MCU and wish to use DMAMUX say Y
- here.
-
-config STM32_MDMA
- bool "STMicroelectronics STM32 master dma support"
- depends on ARCH_STM32 || COMPILE_TEST
- depends on OF
- select DMA_ENGINE
- select DMA_VIRTUAL_CHANNELS
- help
- Enable support for the on-chip MDMA controller on STMicroelectronics
- STM32 platforms.
- If you have a board based on STM32 SoC and wish to use the master DMA
- say Y here.
-
config SPRD_DMA
tristate "Spreadtrum DMA support"
depends on ARCH_SPRD || COMPILE_TEST
@@ -772,6 +740,8 @@ source "drivers/dma/fsl-dpaa2-qdma/Kconfig"
source "drivers/dma/lgm/Kconfig"
+source "drivers/dma/stm32/Kconfig"
+
# clients
comment "DMA Clients"
depends on DMA_ENGINE
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index 802ca916f05f..374ea98faf43 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -70,9 +70,6 @@ obj-$(CONFIG_PXA_DMA) += pxa_dma.o
obj-$(CONFIG_RENESAS_DMA) += sh/
obj-$(CONFIG_SF_PDMA) += sf-pdma/
obj-$(CONFIG_STE_DMA40) += ste_dma40.o ste_dma40_ll.o
-obj-$(CONFIG_STM32_DMA) += stm32-dma.o
-obj-$(CONFIG_STM32_DMAMUX) += stm32-dmamux.o
-obj-$(CONFIG_STM32_MDMA) += stm32-mdma.o
obj-$(CONFIG_SPRD_DMA) += sprd-dma.o
obj-$(CONFIG_TXX9_DMAC) += txx9dmac.o
obj-$(CONFIG_TEGRA186_GPC_DMA) += tegra186-gpc-dma.o
@@ -88,5 +85,6 @@ obj-$(CONFIG_INTEL_LDMA) += lgm/
obj-y += mediatek/
obj-y += qcom/
+obj-y += stm32/
obj-y += ti/
obj-y += xilinx/
diff --git a/drivers/dma/stm32/Kconfig b/drivers/dma/stm32/Kconfig
new file mode 100644
index 000000000000..b72ae1a4502f
--- /dev/null
+++ b/drivers/dma/stm32/Kconfig
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# STM32 DMA controllers drivers
+#
+if ARCH_STM32 || COMPILE_TEST
+
+config STM32_DMA
+ bool "STMicroelectronics STM32 DMA support"
+ select DMA_ENGINE
+ select DMA_VIRTUAL_CHANNELS
+ help
+ Enable support for the on-chip DMA controller on STMicroelectronics
+ STM32 platforms.
+ If you have a board based on STM32 SoC with such DMA controller
+ and want to use DMA say Y here.
+
+config STM32_DMAMUX
+ bool "STMicroelectronics STM32 DMA multiplexer support"
+ depends on STM32_DMA
+ help
+ Enable support for the on-chip DMA multiplexer on STMicroelectronics
+ STM32 platforms.
+ If you have a board based on STM32 SoC with such DMA multiplexer
+ and want to use DMAMUX say Y here.
+
+config STM32_MDMA
+ bool "STMicroelectronics STM32 master DMA support"
+ depends on OF
+ select DMA_ENGINE
+ select DMA_VIRTUAL_CHANNELS
+ help
+ Enable support for the on-chip MDMA controller on STMicroelectronics
+ STM32 platforms.
+ If you have a board based on STM32 SoC with such DMA controller
+ and want to use MDMA say Y here.
+
+endif
diff --git a/drivers/dma/stm32/Makefile b/drivers/dma/stm32/Makefile
new file mode 100644
index 000000000000..663a3896a881
--- /dev/null
+++ b/drivers/dma/stm32/Makefile
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_STM32_DMA) += stm32-dma.o
+obj-$(CONFIG_STM32_DMAMUX) += stm32-dmamux.o
+obj-$(CONFIG_STM32_MDMA) += stm32-mdma.o
diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32/stm32-dma.c
similarity index 99%
rename from drivers/dma/stm32-dma.c
rename to drivers/dma/stm32/stm32-dma.c
index 90857d08a1a7..917f8e922373 100644
--- a/drivers/dma/stm32-dma.c
+++ b/drivers/dma/stm32/stm32-dma.c
@@ -28,7 +28,7 @@
#include <linux/sched.h>
#include <linux/slab.h>
-#include "virt-dma.h"
+#include "../virt-dma.h"
#define STM32_DMA_LISR 0x0000 /* DMA Low Int Status Reg */
#define STM32_DMA_HISR 0x0004 /* DMA High Int Status Reg */
diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32/stm32-dmamux.c
similarity index 100%
rename from drivers/dma/stm32-dmamux.c
rename to drivers/dma/stm32/stm32-dmamux.c
diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32/stm32-mdma.c
similarity index 99%
rename from drivers/dma/stm32-mdma.c
rename to drivers/dma/stm32/stm32-mdma.c
index 6505081ced44..e6d525901de7 100644
--- a/drivers/dma/stm32-mdma.c
+++ b/drivers/dma/stm32/stm32-mdma.c
@@ -30,7 +30,7 @@
#include <linux/reset.h>
#include <linux/slab.h>
-#include "virt-dma.h"
+#include "../virt-dma.h"
#define STM32_MDMA_GISR0 0x0000 /* MDMA Int Status Reg 1 */
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v3 03/12] MAINTAINERS: Add entry for STM32 DMA controllers drivers and documentation
2024-05-20 15:42 [PATCH v3 00/12] Introduce STM32 DMA3 support Amelie Delaunay
2024-05-20 15:42 ` [PATCH v3 01/12] dt-bindings: dma: New directory for STM32 DMA controllers bindings Amelie Delaunay
2024-05-20 15:42 ` [PATCH v3 02/12] dmaengine: stm32: New directory for STM32 DMA controllers drivers Amelie Delaunay
@ 2024-05-20 15:42 ` Amelie Delaunay
2024-05-20 15:46 ` [PATCH v3 00/12] Introduce STM32 DMA3 support Amelie Delaunay
3 siblings, 0 replies; 6+ messages in thread
From: Amelie Delaunay @ 2024-05-20 15:42 UTC (permalink / raw)
To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Maxime Coquelin, Alexandre Torgue
Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-hardening, Amelie Delaunay
Add an entry to make myself a maintainer of STM32 DMA controllers drivers
and documentation.
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
MAINTAINERS | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index cfc11cc17564..0462e61ea488 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21131,6 +21131,15 @@ F: Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml
F: Documentation/devicetree/bindings/sound/st,stm32-*.yaml
F: sound/soc/stm/
+STM32 DMA DRIVERS
+M: Amélie Delaunay <amelie.delaunay@foss.st.com>
+L: dmaengine@vger.kernel.org
+L: linux-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers)
+S: Maintained
+F: Documentation/arch/arm/stm32/stm32-dma-mdma-chaining.rst
+F: Documentation/devicetree/bindings/dma/stm32/
+F: drivers/dma/stm32/
+
STM32 TIMER/LPTIMER DRIVERS
M: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
S: Maintained
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 00/12] Introduce STM32 DMA3 support
2024-05-20 15:42 [PATCH v3 00/12] Introduce STM32 DMA3 support Amelie Delaunay
` (2 preceding siblings ...)
2024-05-20 15:42 ` [PATCH v3 03/12] MAINTAINERS: Add entry for STM32 DMA controllers drivers and documentation Amelie Delaunay
@ 2024-05-20 15:46 ` Amelie Delaunay
3 siblings, 0 replies; 6+ messages in thread
From: Amelie Delaunay @ 2024-05-20 15:46 UTC (permalink / raw)
To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Maxime Coquelin, Alexandre Torgue
Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-hardening
Drop this incomplete series, issue with mail server.
On 5/20/24 17:42, Amelie Delaunay wrote:
> STM32 DMA3 is a direct memory access controller with different features
> depending on its hardware configuration. It is either called LPDMA (Low
> Power), GPDMA (General Purpose) or HPDMA (High Performance), and it can
> be found in new STM32 MCUs and MPUs.
>
> In STM32MP25 SoC [1], 3 HPDMAs and 1 LPDMA are embedded. Only HPDMAs are
> used by Linux.
>
> Before adding this new driver, this series gathers existing STM32 DMA
> drivers and bindings under stm32/ subdirectory and adds an entry in
> MAINTAINERS file.
>
> To ease review, the initial "dmaengine: Add STM32 DMA3 support" has been
> split into functionnalities.
> Patches 6 to 9 can be squashed into patch 5.
>
> Patch 10 has already been proposed [2], the API is now used in stm32-dma3
> driver. Indeed, STM32 DMA3 channels can be individually reserved either
> because they are secure, or dedicated to another CPU. These channels are
> not registered in dmaengine, so id is not incremented, but, using the new
> API to specify the channel name, channel name matches the name in the
> Reference Manual and ease requesting a channel thanks to its name.
>
> [1] https://www.st.com/resource/en/reference_manual/rm0457-stm32mp25xx-advanced-armbased-3264bit-mpus-stmicroelectronics.pdf
> [2] https://lore.kernel.org/lkml/20231213174021.3074759-1-amelie.delaunay@foss.st.com/
>
> v3:
> - address Rob's remarks about st,stm32-dma3.yaml
> (wrap at 80, remove useless '|')
> - address Frank's remarks about patch 5: improve commit message and
> ensure descriptors availability before starting the channel
>
> v2:
> - fix reference in spi/st,stm32-spi.yaml with an updated description of the
> dmas property to reflect the new path of STM32 DMA controllers bindings.
> - address Rob's remarks about st,stm32-dma3.yaml
> - address Vinod's remarks about stm32-dma3.c
>
> Amelie Delaunay (12):
> dt-bindings: dma: New directory for STM32 DMA controllers bindings
> dmaengine: stm32: New directory for STM32 DMA controllers drivers
> MAINTAINERS: Add entry for STM32 DMA controllers drivers and
> documentation
> dt-bindings: dma: Document STM32 DMA3 controller bindings
> dmaengine: Add STM32 DMA3 support
> dmaengine: stm32-dma3: add DMA_CYCLIC capability
> dmaengine: stm32-dma3: add DMA_MEMCPY capability
> dmaengine: stm32-dma3: add device_pause and device_resume ops
> dmaengine: stm32-dma3: improve residue granularity
> dmaengine: add channel device name to channel registration
> dmaengine: stm32-dma3: defer channel registration to specify channel
> name
> arm64: dts: st: add HPDMA nodes on stm32mp251
>
> .../dma/{ => stm32}/st,stm32-dma.yaml | 4 +-
> .../bindings/dma/stm32/st,stm32-dma3.yaml | 135 ++
> .../dma/{ => stm32}/st,stm32-dmamux.yaml | 4 +-
> .../dma/{ => stm32}/st,stm32-mdma.yaml | 4 +-
> .../devicetree/bindings/spi/st,stm32-spi.yaml | 2 +-
> MAINTAINERS | 9 +
> arch/arm64/boot/dts/st/stm32mp251.dtsi | 69 +
> drivers/dma/Kconfig | 34 +-
> drivers/dma/Makefile | 4 +-
> drivers/dma/dmaengine.c | 16 +-
> drivers/dma/idxd/dma.c | 2 +-
> drivers/dma/stm32/Kconfig | 47 +
> drivers/dma/stm32/Makefile | 5 +
> drivers/dma/{ => stm32}/stm32-dma.c | 2 +-
> drivers/dma/stm32/stm32-dma3.c | 1847 +++++++++++++++++
> drivers/dma/{ => stm32}/stm32-dmamux.c | 0
> drivers/dma/{ => stm32}/stm32-mdma.c | 2 +-
> include/linux/dmaengine.h | 3 +-
> 18 files changed, 2137 insertions(+), 52 deletions(-)
> rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-dma.yaml (97%)
> create mode 100644 Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
> rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-dmamux.yaml (89%)
> rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-mdma.yaml (96%)
> create mode 100644 drivers/dma/stm32/Kconfig
> create mode 100644 drivers/dma/stm32/Makefile
> rename drivers/dma/{ => stm32}/stm32-dma.c (99%)
> create mode 100644 drivers/dma/stm32/stm32-dma3.c
> rename drivers/dma/{ => stm32}/stm32-dmamux.c (100%)
> rename drivers/dma/{ => stm32}/stm32-mdma.c (99%)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 00/12] Introduce STM32 DMA3 support
@ 2024-05-20 15:49 Amelie Delaunay
2024-05-20 15:49 ` [PATCH v3 03/12] MAINTAINERS: Add entry for STM32 DMA controllers drivers and documentation Amelie Delaunay
0 siblings, 1 reply; 6+ messages in thread
From: Amelie Delaunay @ 2024-05-20 15:49 UTC (permalink / raw)
To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Maxime Coquelin, Alexandre Torgue
Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-hardening, Amelie Delaunay
STM32 DMA3 is a direct memory access controller with different features
depending on its hardware configuration. It is either called LPDMA (Low
Power), GPDMA (General Purpose) or HPDMA (High Performance), and it can
be found in new STM32 MCUs and MPUs.
In STM32MP25 SoC [1], 3 HPDMAs and 1 LPDMA are embedded. Only HPDMAs are
used by Linux.
Before adding this new driver, this series gathers existing STM32 DMA
drivers and bindings under stm32/ subdirectory and adds an entry in
MAINTAINERS file.
To ease review, the initial "dmaengine: Add STM32 DMA3 support" has been
split into functionnalities.
Patches 6 to 9 can be squashed into patch 5.
Patch 10 has already been proposed [2], the API is now used in stm32-dma3
driver. Indeed, STM32 DMA3 channels can be individually reserved either
because they are secure, or dedicated to another CPU. These channels are
not registered in dmaengine, so id is not incremented, but, using the new
API to specify the channel name, channel name matches the name in the
Reference Manual and ease requesting a channel thanks to its name.
[1] https://www.st.com/resource/en/reference_manual/rm0457-stm32mp25xx-advanced-armbased-3264bit-mpus-stmicroelectronics.pdf
[2] https://lore.kernel.org/lkml/20231213174021.3074759-1-amelie.delaunay@foss.st.com/
v3:
- address Rob's remarks about st,stm32-dma3.yaml
(wrap at 80, remove useless '|')
- address Frank's remarks about patch 5: improve commit message and
ensure descriptors availability before starting the channel
v2:
- fix reference in spi/st,stm32-spi.yaml with an updated description of the
dmas property to reflect the new path of STM32 DMA controllers bindings.
- address Rob's remarks about st,stm32-dma3.yaml
- address Vinod's remarks about stm32-dma3.c
Amelie Delaunay (12):
dt-bindings: dma: New directory for STM32 DMA controllers bindings
dmaengine: stm32: New directory for STM32 DMA controllers drivers
MAINTAINERS: Add entry for STM32 DMA controllers drivers and
documentation
dt-bindings: dma: Document STM32 DMA3 controller bindings
dmaengine: Add STM32 DMA3 support
dmaengine: stm32-dma3: add DMA_CYCLIC capability
dmaengine: stm32-dma3: add DMA_MEMCPY capability
dmaengine: stm32-dma3: add device_pause and device_resume ops
dmaengine: stm32-dma3: improve residue granularity
dmaengine: add channel device name to channel registration
dmaengine: stm32-dma3: defer channel registration to specify channel
name
arm64: dts: st: add HPDMA nodes on stm32mp251
.../dma/{ => stm32}/st,stm32-dma.yaml | 4 +-
.../bindings/dma/stm32/st,stm32-dma3.yaml | 135 ++
.../dma/{ => stm32}/st,stm32-dmamux.yaml | 4 +-
.../dma/{ => stm32}/st,stm32-mdma.yaml | 4 +-
.../devicetree/bindings/spi/st,stm32-spi.yaml | 2 +-
MAINTAINERS | 9 +
arch/arm64/boot/dts/st/stm32mp251.dtsi | 69 +
drivers/dma/Kconfig | 34 +-
drivers/dma/Makefile | 4 +-
drivers/dma/dmaengine.c | 16 +-
drivers/dma/idxd/dma.c | 2 +-
drivers/dma/stm32/Kconfig | 47 +
drivers/dma/stm32/Makefile | 5 +
drivers/dma/{ => stm32}/stm32-dma.c | 2 +-
drivers/dma/stm32/stm32-dma3.c | 1847 +++++++++++++++++
drivers/dma/{ => stm32}/stm32-dmamux.c | 0
drivers/dma/{ => stm32}/stm32-mdma.c | 2 +-
include/linux/dmaengine.h | 3 +-
18 files changed, 2137 insertions(+), 52 deletions(-)
rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-dma.yaml (97%)
create mode 100644 Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-dmamux.yaml (89%)
rename Documentation/devicetree/bindings/dma/{ => stm32}/st,stm32-mdma.yaml (96%)
create mode 100644 drivers/dma/stm32/Kconfig
create mode 100644 drivers/dma/stm32/Makefile
rename drivers/dma/{ => stm32}/stm32-dma.c (99%)
create mode 100644 drivers/dma/stm32/stm32-dma3.c
rename drivers/dma/{ => stm32}/stm32-dmamux.c (100%)
rename drivers/dma/{ => stm32}/stm32-mdma.c (99%)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v3 03/12] MAINTAINERS: Add entry for STM32 DMA controllers drivers and documentation
2024-05-20 15:49 Amelie Delaunay
@ 2024-05-20 15:49 ` Amelie Delaunay
0 siblings, 0 replies; 6+ messages in thread
From: Amelie Delaunay @ 2024-05-20 15:49 UTC (permalink / raw)
To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Maxime Coquelin, Alexandre Torgue
Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-hardening, Amelie Delaunay
Add an entry to make myself a maintainer of STM32 DMA controllers drivers
and documentation.
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
MAINTAINERS | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index cfc11cc17564..0462e61ea488 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21131,6 +21131,15 @@ F: Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml
F: Documentation/devicetree/bindings/sound/st,stm32-*.yaml
F: sound/soc/stm/
+STM32 DMA DRIVERS
+M: Amélie Delaunay <amelie.delaunay@foss.st.com>
+L: dmaengine@vger.kernel.org
+L: linux-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers)
+S: Maintained
+F: Documentation/arch/arm/stm32/stm32-dma-mdma-chaining.rst
+F: Documentation/devicetree/bindings/dma/stm32/
+F: drivers/dma/stm32/
+
STM32 TIMER/LPTIMER DRIVERS
M: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
S: Maintained
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-05-20 15:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20 15:42 [PATCH v3 00/12] Introduce STM32 DMA3 support Amelie Delaunay
2024-05-20 15:42 ` [PATCH v3 01/12] dt-bindings: dma: New directory for STM32 DMA controllers bindings Amelie Delaunay
2024-05-20 15:42 ` [PATCH v3 02/12] dmaengine: stm32: New directory for STM32 DMA controllers drivers Amelie Delaunay
2024-05-20 15:42 ` [PATCH v3 03/12] MAINTAINERS: Add entry for STM32 DMA controllers drivers and documentation Amelie Delaunay
2024-05-20 15:46 ` [PATCH v3 00/12] Introduce STM32 DMA3 support Amelie Delaunay
-- strict thread matches above, loose matches on Subject: below --
2024-05-20 15:49 Amelie Delaunay
2024-05-20 15:49 ` [PATCH v3 03/12] MAINTAINERS: Add entry for STM32 DMA controllers drivers and documentation Amelie Delaunay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).