Skip to contentSkip to conversation

dmaengine: ti: New driver for K3 UDMA

RFC New Peter Ujfalusi 1 participant 1 message Sep 24, 2018

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

RFC 4/5 dmaengine: ti: New driver for K3 UDMA

DMA driver for
Texas Instruments K3 NAVSS Unified DMA – Peripheral Root Complex (UDMA-P)

The UDMA-P is intended to perform similar (but significantly upgraded) functions as the packet-oriented DMA used on previous SoC devices. The UDMA-P module supports the transmission and reception of various packet types. The UDMA-P is architected to facilitate the segmentation and reassembly of SoC DMA data structure compliant packets to/from smaller data blocks that are natively compatible with the specific requirements of each connected peripheral. Multiple Tx and Rx channels are provided within the DMA which allow multiple segmentation or reassembly operations to be ongoing. The DMA controller maintains state information for each of the channels which allows packet segmentation and reassembly operations to be time division multiplexed between channels in order to share the underlying DMA hardware. An external DMA scheduler is used to control the ordering and rate at which this multiplexing occurs for Transmit operations. The ordering and rate of Receive operations is indirectly controlled by the order in which blocks are pushed into the DMA on the Rx PSI-L interface.

The UDMA-P also supports acting as both a UTC and UDMA-C for its internal channels. Channels in the UDMA-P can be configured to be either Packet-Based or Third-Party channels on a channel by channel basis.

The initial driver supports:
- MEM_TO_MEM (TR mode)
- DEV_TO_MEM (Packet / TR mode)
- MEM_TO_DEV (Packet / TR mode)
- Cyclic (Packet / TR mode)
- Metadata for descriptors

---
 drivers/dma/ti/Kconfig            |   12 +
 drivers/dma/ti/Makefile           |    1 +
 drivers/dma/ti/k3-udma.c          | 3623 +++++++++++++++++++++++++++++
 drivers/dma/ti/k3-udma.h          |  132 ++
 include/dt-bindings/dma/k3-udma.h |   26 +
 5 files changed, 3794 insertions(+)
 create mode 100644 drivers/dma/ti/k3-udma.c
 create mode 100644 drivers/dma/ti/k3-udma.h
 create mode 100644 include/dt-bindings/dma/k3-udma.h
drivers/dma/ti/Kconfig +12 -0
index e5e74e1361dc..db73371de206 100644
@@ -33,5 +33,17 @@ config DMA_OMAP
 	  Enable support for the TI sDMA (System DMA or DMA4) controller. This
 	  DMA engine is found on OMAP and DRA7xx parts.
 
+config TI_K3_NAVSS_UDMA
+	tristate "Texas Instruments UDMA support"
+	depends on ARCH_K3 || COMPILE_TEST
+	depends on TI_SCI_PROTOCOL
+	select DMA_ENGINE
+	select DMA_VIRTUAL_CHANNELS
+	select TI_K3_NAVSS_RINGACC
+	default y
+        help
+	  Enable support for the TI UDMA (Unified DMA) controller. This
+	  DMA engine is used in AM65x.
+
 config TI_DMA_CROSSBAR
 	bool
drivers/dma/ti/Makefile +1 -0
index 113e59ec9c32..911f7c723979 100644
@@ -2,4 +2,5 @@
 obj-$(CONFIG_TI_CPPI41) += cppi41.o
 obj-$(CONFIG_TI_EDMA) += edma.o
 obj-$(CONFIG_DMA_OMAP) += omap-dma.o
+obj-$(CONFIG_TI_K3_NAVSS_UDMA) += k3-udma.o
 obj-$(CONFIG_TI_DMA_CROSSBAR) += dma-crossbar.o
drivers/dma/ti/k3-udma.c new file +3623 -0

2,978 lines not on this page · raw message

drivers/dma/ti/k3-udma.h new file +132 -0

132 lines not on this page · raw message

include/dt-bindings/dma/k3-udma.h new file +26 -0
new file mode 100644
index 000000000000..89ba6a9d4a8f

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.