dma: dmaengine: add slave req id in slave_config
Subsystems (3)
Laxman Dewangan
maintainerPATCH v5 1/2 dma: dmaengine: add slave req id in slave_config
The DMA controller like Nvidia's Tegra Dma controller supports the different slave requestor id from different slave. This need to be configure in dma controller to handle the request properly.
Adding the slave-id in the slave configuration so that information can be passed from client when configuring for slave.
---
Changes from V2:
- Make slave_id as unsigned.
No Changes from V3 and V4.
include/linux/dmaengine.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
include/linux/dmaengine.h +4 -0
@@ -338,6 +338,9 @@ enum dma_slave_buswidth {* @device_fc: Flow Controller Settings. Only valid for slave channels. Fill * with 'true' if peripheral should be flow controller. Direction will be * selected at Runtime. +* @slave_id: Slave requester id. Only valid for slave channels. The dma +* slave peripheral will have unique id as dma requester which need to be +* pass as slave config. * * This struct is passed in as configuration data to a DMA engine * in order to set up a certain channel for DMA transport at runtime.
@@ -365,6 +368,7 @@ struct dma_slave_config {u32 src_maxburst;u32 dst_maxburst;bool device_fc; +unsigned int slave_id; };static inline const char *dma_chan_name (struct dma_chan *chan)
Signature · 1 line
1.7.1.1
Laxman Dewangan
maintainerPATCH v5 2/2 dma: tegra: add dmaengine based dma driver
Add dmaengine based NVIDIA's Tegra APB DMA driver. This driver support the slave mode of data transfer from peripheral to memory and vice versa.
The driver supports for the cyclic and non-cyclic mode of data transfer.
---
Changes from V1:
- Incorportaed review comments from Vinod.
- get rid of the tegra_dma header.
- Having clock control through runtime pm.
- Remove regmap support.
Changes from V2:
- Taken care of aall review comments provided by Vinod.
- Drop cyclic_half notify mode of dma and implemented as cyclic only. This will make the this patch as simple. Also this can be achive by cyclic once mode. If require, we will add later.
- Remove goto most of places.
- Remove the cookie_complete() in aborted case.
- Remove callback when terminating.
- Macro names are now namespaced.
- Message prints are well formated to have in 1 or 2 line.
Changes from V3:
- Taken care of Setphen's comment.
- No error if isr arrive before callback of prev isr did not get called.
- Simplyfy the desc allocation.
- Namespaced for all macros.
- Rename file and comments to say Tegra20 APB DMA.
- Changed as module_platform_driver().
Changes from V4:
- Taken care of Setphen's comment on V4.
drivers/dma/Kconfig | 14 + drivers/dma/Makefile | 1 + drivers/dma/tegra20-apb-dma.c | 1410 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1425 insertions(+), 0 deletions(-) create mode 100644 drivers/dma/tegra20-apb-dma.c
drivers/dma/Kconfig +14 -0
@@ -148,6 +148,20 @@ config TXX9_DMAC Support the TXx9 SoC internal DMA controller. This can be integrated in chips such as the Toshiba TX4927/38/39. +config TEGRA20_APB_DMA + bool "NVIDIA Tegra20 APB DMA support" + depends on ARCH_TEGRA + select DMA_ENGINE + help + Support for the NVIDIA Tegra20 APB DMA controller driver. The + DMA controller is having multiple DMA channel which can be + configured for different peripherals like audio, UART, SPI, + I2C etc which is in APB bus. + This DMA controller transfers data from memory to peripheral fifo + or vice versa. It does not support memory to memory data transfer. + + + config SH_DMAE tristate "Renesas SuperH DMAC support" depends on (SUPERH && SH_DMA) || (ARM && ARCH_SHMOBILE)
drivers/dma/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_MXS_DMA) += mxs-dma.o obj-$(CONFIG_TIMB_DMA) += timb_dma.o obj-$(CONFIG_SIRF_DMA) += sirf-dma.o obj-$(CONFIG_STE_DMA40) += ste_dma40.o ste_dma40_ll.o +obj-$(CONFIG_TEGRA20_APB_DMA) += tegra20-apb-dma.o obj-$(CONFIG_PL330_DMA) += pl330.o obj-$(CONFIG_PCH_DMA) += pch_dma.o obj-$(CONFIG_AMBA_PL08X) += amba-pl08x.o
drivers/dma/tegra20-apb-dma.c new file +1410 -0
1,410 lines not on this page · raw message
Signature · 1 line
1.7.1.1
Re: [PATCH V5 2/2] dma: tegra: add dmaengine based dma driver
Quoted 5 lines · Laxman Dewangan
Add dmaengine based NVIDIA's Tegra APB DMA driver. This driver support the slave mode of data transfer from peripheral to memory and vice versa.
The driver supports for the cyclic and non-cyclic mode of data transfer.
Laxman, what are you plans for enabling this and replacing the existing non-dmaengine APB DMA driver? We will need to convert:
* The fuse WAR stuff in arch/arm/mach-tegra
* The ASoC driver in sound/soc/tegra
This will require some thought and dependency management between the various subsystems.
Vinod,
It may be best to apply this series along in a topic branch that you merge into the dmaengine branch, and I can pull into Tegra if/when I need. Or, if you ack it, I can take it all through the Tegra tree if you want. That wouldn't allow patch 1 to be use by others though.
Thanks.
Laxman Dewangan
maintainerRe: [PATCH V5 2/2] dma: tegra: add dmaengine based dma driver
Quoted 8 lines · Stephen Warren
Quoted 5 lines · Laxman Dewangan
Add dmaengine based NVIDIA's Tegra APB DMA driver. This driver support the slave mode of data transfer from peripheral to memory and vice versa.
The driver supports for the cyclic and non-cyclic mode of data transfer.Acked-by Stephen Warren<[email protected]>
Quoted 8 lines
Laxman, what are you plans for enabling this and replacing the existing non-dmaengine APB DMA driver? We will need to convert:
* The fuse WAR stuff in
arch/arm/mach-tegra
* The ASoC driver insound/soc/tegraThis will require some thought and dependency management between the various subsystems.
Currently following drive using the non-dmanegine apb dma driver:
fuse
SPI
ASoc.
I want to first have this dma driver in the tree and then I will have the series of patches to use this dmaengine dma driver and delete the old apb dma driver.
So just waiting for this driver to be in.
Quoted 7 lines
Vinod,
It may be best to apply this series along in a topic branch that you merge into the dmaengine branch, and I can pull into Tegra if/when I need. Or, if you ack it, I can take it all through the Tegra tree if you want. That wouldn't allow patch 1 to be use by others though.
I like this series to be taken by Vinod. And then pull the change in to Tegra tree for further dependency change. Reason is:
- If there is any dmaengine driver change/enhancement, then tegra dma driver will also be inline.
- Taking on tegra tree help to implement the clock framework which is going on.
- Also fuse related changes will be in tegra tree.
- Asoc and SPI can be also taken in the tegra tree or may be their corresponding tree based on how much other changes are there, -Deletion of old driver is in Tegra tree.
Quoted 1 line
Thanks.
Vinod Koul
AppliedRe: [PATCH V5 2/2] dma: tegra: add dmaengine based dma driver
In reply to Laxman DewanganQuoted 7 lines · Laxman Dewangan
Add dmaengine based NVIDIA's Tegra APB DMA driver. This driver support the slave mode of data transfer from peripheral to memory and vice versa.
The driver supports for the cyclic and non-cyclic mode of data transfer.Signed-off-by Laxman Dewangan <[email protected]>
Applied, both Thanks
Signature · 1 line
~Vinod