Skip to contentSkip to conversation

Add support for AHB DMA controller on Milbeaut series

PATCH Applied [email protected] 2 participants 4 messages Oct 15, 2019 – Oct 18, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v4 cover Add support for AHB DMA controller on Milbeaut series

From: Jassi Brar <[email protected]>

The following series adds AHB DMA (HDMAC) controller support on Milbeaut series. This controller is capable of Mem<->MEM and DEV<->MEM transfer. But only DEV<->MEM is currently supported.

Changes since v3:
# Drop unused variables
# Add controller init instruction

Changes since v2:
# Spelling mistake fix
# Bug fix prep_slave - made local copy of sgl

Jassi Brar (2):
dt-bindings: milbeaut-m10v-hdmac: Add Socionext Milbeaut HDMAC
bindings
dmaengine: milbeaut-hdmac: Add HDMAC driver for Milbeaut platforms

 .../bindings/dma/milbeaut-m10v-hdmac.txt      |  32 +
 drivers/dma/Kconfig                           |  10 +
 drivers/dma/Makefile                          |   1 +
 drivers/dma/milbeaut-hdmac.c                  | 581 ++++++++++++++++++
 4 files changed, 624 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/milbeaut-m10v-hdmac.txt
 create mode 100644 drivers/dma/milbeaut-hdmac.c
Signature · 1 line
2.20.1
#1 lore raw

PATCH v4 1/2 dt-bindings: milbeaut-m10v-hdmac: Add Socionext Milbeaut HDMAC bindings

From: Jassi Brar <[email protected]>

Document the devicetree bindings for Socionext Milbeaut HDMAC controller. Controller has upto 8 floating channels, that need a predefined slave-id to work from a set of slaves.

---
 .../bindings/dma/milbeaut-m10v-hdmac.txt      | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/milbeaut-m10v-hdmac.txt
Documentation/devicetree/bindings/dma/milbeaut-m10v-hdmac.txt new file +32 -0
new file mode 100644
index 000000000000..1f0875bd5abc
@@ -0,0 +1,32 @@
+* Milbeaut AHB DMA Controller
+
+Milbeaut AHB DMA controller has transfer capability below.
+ - device to memory transfer
+ - memory to device transfer
+
+Required property:
+- compatible:       Should be  "socionext,milbeaut-m10v-hdmac"
+- reg:              Should contain DMA registers location and length.
+- interrupts:       Should contain all of the per-channel DMA interrupts.
+                     Number of channels is configurable - 2, 4 or 8, so
+                     the number of interrupts specified should be {2,4,8}.
+- #dma-cells:       Should be 1. Specify the ID of the slave.
+- clocks:           Phandle to the clock used by the HDMAC module.
+
+
+Example:
+
+	hdmac1: dma-controller@1e110000 {
+		compatible = "socionext,milbeaut-m10v-hdmac";
+		reg = <0x1e110000 0x10000>;
+		interrupts = <0 132 4>,
+			     <0 133 4>,
+			     <0 134 4>,
+			     <0 135 4>,
+			     <0 136 4>,
+			     <0 137 4>,
+			     <0 138 4>,
+			     <0 139 4>;
+		#dma-cells = <1>;
+		clocks = <&dummy_clk>;
+	};
Signature · 1 line
2.20.1
#2 lore raw

PATCH v4 2/2 dmaengine: milbeaut-hdmac: Add HDMAC driver for Milbeaut platforms

In reply to [email protected]

From: Jassi Brar <[email protected]>

Driver for Socionext Milbeaut HDMAC controller. The controller has upto 8 floating channels, that need a predefined slave-id to work from a set of slaves.

---
 drivers/dma/Kconfig          |  10 +
 drivers/dma/Makefile         |   1 +
 drivers/dma/milbeaut-hdmac.c | 581 +++++++++++++++++++++++++++++++++++
 3 files changed, 592 insertions(+)
 create mode 100644 drivers/dma/milbeaut-hdmac.c
drivers/dma/Kconfig +10 -0
index 7af874b69ffb..d312ebbafbee 100644
@@ -342,6 +342,16 @@ config MCF_EDMA
 	  minimal intervention from a host processor.
 	  This module can be found on Freescale ColdFire mcf5441x SoCs.
 
+config MILBEAUT_HDMAC
+	tristate "Milbeaut AHB DMA support"
+	depends on ARCH_MILBEAUT || COMPILE_TEST
+	depends on OF
+	select DMA_ENGINE
+	select DMA_VIRTUAL_CHANNELS
+	help
+	  Say yes here to support the Socionext Milbeaut
+	  HDMAC device.
+
 config MMP_PDMA
 	bool "MMP PDMA support"
 	depends on ARCH_MMP || ARCH_PXA || COMPILE_TEST
drivers/dma/Makefile +1 -0
index f5ce8665e944..5f0df3611414 100644
@@ -45,6 +45,7 @@ obj-$(CONFIG_INTEL_IOP_ADMA) += iop-adma.o
 obj-$(CONFIG_INTEL_MIC_X100_DMA) += mic_x100_dma.o
 obj-$(CONFIG_K3_DMA) += k3dma.o
 obj-$(CONFIG_LPC18XX_DMAMUX) += lpc18xx-dmamux.o
+obj-$(CONFIG_MILBEAUT_HDMAC) += milbeaut-hdmac.o
 obj-$(CONFIG_MMP_PDMA) += mmp_pdma.o
 obj-$(CONFIG_MMP_TDMA) += mmp_tdma.o
 obj-$(CONFIG_MOXART_DMA) += moxart-dma.o
drivers/dma/milbeaut-hdmac.c new file +581 -0

581 lines not on this page · raw message

Signature · 1 line
2.20.1