Documentation: DT: dma: Add Xilinx zynqmp dma device tree binding documentation
Subsystems (3)
PATCH v5 1/2 Documentation: DT: dma: Add Xilinx zynqmp dma device tree binding documentation
Device-tree binding documentation for Xilinx zynqmp dma engine used in Zynq UltraScale+ MPSoC.
---
Changes in v5:
- Use dma-coherent flag for coherent transfers as suggested by rob.
- Removed unnecessary properties from binding doc as suggested by Rob. Changes in v4:
- None
Changes in v3:
- None
Changes in v2:
- None.
.../devicetree/bindings/dma/xilinx/zynqmp_dma.txt | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +50 -0
@@ -0,0 +1,50 @@ +Xilinx ZynqMP DMA engine, it does support memory to memory transfers, +memory to device and device to memory transfers. It also has flow +control and rate control support for slave/peripheral dma access. + +Required properties: +- compatible : Should be "xlnx,zynqmp-dma-1.0" +- reg : Memory map for gdma/adma module access. +- interrupt-parent : Interrupt controller the interrupt is routed through +- interrupts : Should contain DMA channel interrupt. +- xlnx,bus-width : Axi buswidth in bits. Should contain 128 or 64 +- clock-names : List of input clocks "clk_main", "clk_apb" + (see clock bindings for details) + +Optional properties: +- xlnx,include-sg : Indicates the controller to operate in simple or + scatter gather dma mode +- xlnx,ratectrl : Scheduling interval in terms of clock cycles for + source AXI transaction +- xlnx,overfetch : Tells whether the channel is allowed to over + fetch the data +- xlnx,src-issue : Number of AXI outstanding transactions on source side +- xlnx,desc-axi-cache : AXI cache bits to be used for descriptor fetch +- xlnx,src-axi-cache : AXI cache bits to be used for data read +- xlnx,dst-axi-cache : AXI cache bits to be used for data write +- xlnx,src-burst-len : AXI length for data read. Support only power of + 2 values. +- xlnx,dst-burst-len : AXI length for data write. Support only power of + 2 values. +- dma-coherent : Present if dma operations are coherent. + +Example: +++++++++ +fpd_dma_chan1: dma at FD500000 { + compatible = "xlnx,zynqmp-dma-1.0"; + reg = <0x0 0xFD500000 0x1000>; + interrupt-parent = <&gic>; + interrupts = <0 117 4>; + clock-names = "clk_main", "clk_apb"; + xlnx,bus-width = <128>; + xlnx,include-sg; + xlnx,overfetch; + dma-coherent; + xlnx,ratectrl = <0>; + xlnx,src-issue = <16>; + xlnx,desc-axi-cache = <0xFF>; + xlnx,src-axi-cache = <0xFF>; + xlnx,dst-axi-cache = <0xFF>; + xlnx,src-burst-len = <4>; + xlnx,dst-burst-len = <4>; +};
Signature · 1 line
2.1.2
PATCH v5 2/2 dmaengine: Add Xilinx zynqmp dma engine driver support
Added the driver for zynqmp dma engine used in Zynq UltraScale+ MPSoC. The dma controller supports memory to memory and memory to I/O buffer transfers.
---
Changes in v5:
- Removed in_interrupt check from the tasklet cleanup as suggested by the vinod/lars.
Changes in v4:
- Modified the defines to start with ZYNQMP_DMA perfix
- Changed the zynqmp_dma_alloc_chan_resources to return number of allocated descriptors
- Changed the zynqmp_dma_device variable name
- Released the locks before calling user callback
- freeup irq in zynqmp_dma_chan_remove function.
Changes in v3:
- Modified the zynqmp_dma_chan_is_idle function return type to bool Changes in v2:
- Corrected the function header documentation
- Framework expects bus-width value in bytes. so, fixed it
- Removed magic numbers for bus-width
drivers/dma/Kconfig | 5 + drivers/dma/xilinx/Makefile | 1 + drivers/dma/xilinx/zynqmp_dma.c | 1244 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 1250 insertions(+) create mode 100644 drivers/dma/xilinx/zynqmp_dma.c
drivers/dma/Kconfig +5 -0
@@ -527,6 +527,11 @@ config ZX_DMA help Support the DMA engine for ZTE ZX296702 platform devices. +config XILINX_ZYNQMP_DMA + tristate "Xilinx ZynqMP DMA Engine" + select DMA_ENGINE + help + Enable support for Xilinx ZynqMP DMA controller. # driver files source "drivers/dma/bestcomm/Kconfig"
drivers/dma/xilinx/Makefile +1 -0
@@ -1 +1,2 @@ obj-$(CONFIG_XILINX_VDMA) += xilinx_vdma.o +obj-$(CONFIG_XILINX_ZYNQMP_DMA) += zynqmp_dma.o
drivers/dma/xilinx/zynqmp_dma.c new file +1244 -0
1,244 lines not on this page · raw message
Signature · 1 line
2.1.2
kbuild test robot
build botRe: [PATCH v5 2/2] dmaengine: Add Xilinx zynqmp dma engine driver support
reproduce:
Hi Kedareswara,
[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.6-rc3 next-20160412]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Kedareswara-rao-Appana/Documentation-DT-dma-Add-Xilinx-zynqmp-dma-device-tree-binding-documentation/20160413-132011 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux for-next config: i386-allmodconfig (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
drivers/dma/xilinx/zynqmp_dma.c: In function 'zynqmp_dma_reset':
>> drivers/dma/xilinx/zynqmp_dma.c:753:30: error: 'dchan' undeclared (first use in this function)
zynqmp_dma_free_descriptors(dchan);
^ drivers/dma/xilinx/zynqmp_dma.c:753:30: note: each undeclared identifier is reported only once for each function it appears in
vim +/dchan +753 drivers/dma/xilinx/zynqmp_dma.c
747 static void zynqmp_dma_reset(struct zynqmp_dma_chan *chan)
748 {
749 writel(ZYNQMP_DMA_IDS_DEFAULT_MASK, chan->regs + ZYNQMP_DMA_IDS);
750
751 zynqmp_dma_complete_descriptor(chan);
752 zynqmp_dma_chan_desc_cleanup(chan);
> 753 zynqmp_dma_free_descriptors(dchan);
754 zynqmp_dma_init(chan);
755 }
756
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/octet-stream
Size: 54421 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160413/1223fc7e/attachment-0001.obj>
RE: [PATCH v5 2/2] dmaengine: Add Xilinx zynqmp dma engine driver support
Hi ,
Quoted 34 lines
-----Original Message-----
From: kbuild test robot [mailto:lkp at intel.com]
Sent: Wednesday, April 13, 2016 11:38 AM
To: Appana Durga Kedareswara Rao <[email protected]>
Cc: kbuild-all at 01.org; robh+dt at kernel.org; pawel.moll at arm.com; mark.rutland at arm.com; ijc+devicetree at hellion.org.uk; galak at codeaurora.org; Michal Simek <[email protected]>; Soren Brinkmann <[email protected]>; vinod.koul at intel.com; dan.j.williams at intel.com; Appana Durga Kedareswara Rao <[email protected]>; moritz.fischer at ettus.com; laurent.pinchart at ideasonboard.com; luis at debethencourt.com; Anirudha Sarangi <[email protected]>; Punnaiah Choudary Kalluri <[email protected]>; devicetree at vger.kernel.org; linux-arm-
kernel at lists.infradead.org; linux-kernel at vger.kernel.org; dmaengine at vger.kernel.org
Subject: Re: [PATCH v5 2/2] dmaengine: Add Xilinx zynqmp dma engine driver supportHi Kedareswara,
[auto build test ERROR on robh/for-next] [also build test ERROR on v4.6-rc3 next-20160412] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Kedareswara-rao-
Appana/Documentation-DT-dma-Add-Xilinx-zynqmp-dma-device-tree-binding- documentation/20160413-132011base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux for-next config: i386-allmodconfig (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=i386All errors (new ones prefixed by >>):
Quoted 7 lines
drivers/dma/xilinx/zynqmp_dma.c: In function 'zynqmp_dma_reset':Quoted 2 lines
Quoted 2 lines
drivers/dma/xilinx/zynqmp_dma.c:753:30: error: 'dchan' undeclared (first use in this function)zynqmp_dma_free_descriptors(dchan); ^
drivers/dma/xilinx/zynqmp_dma.c:753:30: note: each undeclared identifier is
reported only once for each function it appears in
will fix in next version...
Regards,
Kedar.
Quoted 18 lines
vim +/dchan +753
drivers/dma/xilinx/zynqmp_dma.c747 static void zynqmp_dma_reset(struct zynqmp_dma_chan *chan) 748 { 749 writel(ZYNQMP_DMA_IDS_DEFAULT_MASK, chan->regs + ZYNQMP_DMA_IDS); 750 751 zynqmp_dma_complete_descriptor(chan); 752 zynqmp_dma_chan_desc_cleanup(chan);Quoted 1 line
753
zynqmp_dma_free_descriptors(dchan);754 zynqmp_dma_init(chan); 755 } 756---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Rob Herring
maintainerQuoted 40 lines · Kedareswara rao Appana
Device-tree binding documentation for Xilinx zynqmp dma engine used in Zynq UltraScale+ MPSoC.
Signed-off-by Punnaiah Choudary Kalluri <[email protected]>Signed-off-by Kedareswara rao Appana <[email protected]>---
Changes in v5:
- Use dma-coherent flag for coherent transfers as suggested by rob.
- Removed unnecessary properties from binding doc as suggested by Rob. Changes in v4:
- None
Changes in v3:
- None
Changes in v2:
- None..../devicetree/bindings/dma/xilinx/zynqmp_dma.txt | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txtDocumentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +14
-0@@ -0,0 +1,50 @@ +Xilinx ZynqMP DMA engine, it does support memory to memory transfers, +memory to device and device to memory transfers. It also has flow +control and rate control support for slave/peripheral dma access. + +Required properties: +- compatible : Should be "xlnx,zynqmp-dma-1.0" +- reg : Memory map for gdma/adma module access. +- interrupt-parent : Interrupt controller the interrupt is routed through +- interrupts : Should contain DMA channel interrupt. +- xlnx,bus-width : Axi buswidth in bits. Should contain 128 or 64 +- clock-names : List of input clocks "clk_main", "clk_apb" + (see clock bindings for details) + +Optional properties:
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt line 24
Quoted 10 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +10
-0+- xlnx,include-sg : Indicates the controller to operate in simple or + scatter gather dma mode +- xlnx,ratectrl : Scheduling interval in terms of clock cycles for + source AXI transaction +- xlnx,overfetch : Tells whether the channel is allowed to over + fetch the data +- xlnx,src-issue : Number of AXI outstanding transactions on source side +- xlnx,desc-axi-cache : AXI cache bits to be used for descriptor fetch +- xlnx,src-axi-cache : AXI cache bits to be used for data read +- xlnx,dst-axi-cache : AXI cache bits to be used for data write
Shouldn't you be able to derive these values from whether dma-coherent is set. To put it another way, allowing setting both allows for lots of broken combinations.
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt line 28
Quoted 4 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +4
-0+- xlnx,src-burst-len : AXI length for data read. Support only power of + 2 values. +- xlnx,dst-burst-len : AXI length for data write. Support only power of + 2 values.
What unit? Seems to be beats from the example. I would suggest bytes instead.
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt line 33
Quoted 5 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +5
-0+- dma-coherent : Present if dma operations are coherent. + +Example: +++++++++ +fpd_dma_chan1: dma at FD500000 {
lowercase address.
Quoted 4 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +4
-0+ compatible = "xlnx,zynqmp-dma-1.0"; + reg = <0x0 0xFD500000 0x1000>; + interrupt-parent = <&gic>; + interrupts = <0 117 4>;
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt line 47
Quoted 10 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +10
-0+ clock-names = "clk_main", "clk_apb"; + xlnx,bus-width = <128>; + xlnx,include-sg; + xlnx,overfetch; + dma-coherent; + xlnx,ratectrl = <0>; + xlnx,src-issue = <16>; + xlnx,desc-axi-cache = <0xFF>; + xlnx,src-axi-cache = <0xFF>; + xlnx,dst-axi-cache = <0xFF>;
Last I checked, AXI only has 4 cache bits.
Quoted 6 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +3
-0+ xlnx,src-burst-len = <4>; + xlnx,dst-burst-len = <4>; +};Signature · 1 line
2.1.2
Hi Rob,
Thanks for the review...
Quoted 69 lines
-----Original Message-----
From: Rob Herring [mailto:robh at kernel.org]
Sent: Thursday, April 14, 2016 8:34 PM
To: Appana Durga Kedareswara Rao <[email protected]>
Cc: pawel.moll at arm.com; mark.rutland at arm.com; ijc+devicetree at hellion.org.uk; galak at codeaurora.org; Michal Simek <[email protected]>; Soren Brinkmann <[email protected]>; vinod.koul at intel.com; dan.j.williams at intel.com; Appana Durga Kedareswara Rao <[email protected]>; moritz.fischer at ettus.com; laurent.pinchart at ideasonboard.com; luis at debethencourt.com; Anirudha Sarangi <[email protected]>; Punnaiah Choudary Kalluri <[email protected]>; devicetree at vger.kernel.org; linux-arm- kernel at lists.infradead.org; linux-kernel at vger.kernel.org; dmaengine at vger.kernel.org
Subject: Re: [PATCH v5 1/2] Documentation: DT: dma: Add Xilinx zynqmp dma device tree binding documentationQuoted 16 lines · Kedareswara rao Appana
Device-tree binding documentation for Xilinx zynqmp dma engine used in Zynq UltraScale+ MPSoC.
Signed-off-by Punnaiah Choudary Kalluri <[email protected]>Signed-off-by Kedareswara rao Appana <[email protected]>---
Changes in v5:
- Use dma-coherent flag for coherent transfers as suggested by rob.
- Removed unnecessary properties from binding doc as suggested by Rob. Changes in v4:
- None
Changes in v3:
- None
Changes in v2:
- None.Quoted 1 line
.../devicetree/bindings/dma/xilinx/zynqmp_dma.txt | 50++++++++++++++++++++++
Quoted 2 lines
1 file changed, 50 insertions(+) create mode 100644
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txtReview
Quoted 2 lines
(quoted diff) +0
-0
b/Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txtQuoted 16 lines
new file mode 100644
index 0000000..4ad0aea40Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +11
-0@@ -0,0 +1,50 @@ +Xilinx ZynqMP DMA engine, it does support memory to memory transfers, +memory to device and device to memory transfers. It also has flow +control and rate control support for slave/peripheral dma access. + +Required properties: +- compatible : Should be "xlnx,zynqmp-dma-1.0" +- reg : Memory map for gdma/adma module access. +- interrupt-parent : Interrupt controller the interrupt is routed through +- interrupts : Should contain DMA channel interrupt. +- xlnx,bus-width : Axi buswidth in bits. Should contain 128 or 64 +- clock-names : List of input clocks "clk_main", "clk_apb"Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt line 21
Quoted 10 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +10
-0+ (see clock bindings for details) + +Optional properties: +- xlnx,include-sg : Indicates the controller to operate in simple or + scatter gather dma mode +- xlnx,ratectrl : Scheduling interval in terms of clock cycles for + source AXI transaction +- xlnx,overfetch : Tells whether the channel is allowed to over + fetch the data +- xlnx,src-issue : Number of AXI outstanding transactions on sourceside
Quoted 7 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt line 24
Quoted 3 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +3
-0+- xlnx,desc-axi-cache : AXI cache bits to be used for descriptor fetch +- xlnx,src-axi-cache : AXI cache bits to be used for data read +- xlnx,dst-axi-cache : AXI cache bits to be used for data writeShouldn't you be able to derive these values from whether dma-coherent is set. To put it another way, allowing setting both allows for lots of broken combinations.
Ok will remove these properties and will set these cache bits only When dma-coherent is present in the driver.
Quoted 8 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt line 28
Quoted 5 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +4
-0+- xlnx,src-burst-len : AXI length for data read. Support only power of + 2 values. +- xlnx,dst-burst-len : AXI length for data write. Support only power of + 2 values.What unit? Seems to be beats from the example. I would suggest bytes instead.
Bytes only will fix in next version...
Quoted 8 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt line 33
Quoted 6 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +5
-0+- dma-coherent : Present if dma operations are coherent. + +Example: +++++++++ +fpd_dma_chan1: dma at FD500000 {lowercase address.
Will fix in next version.
Quoted 17 lines
Quoted 5 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +4
-0+ compatible = "xlnx,zynqmp-dma-1.0"; + reg = <0x0 0xFD500000 0x1000>; + interrupt-parent = <&gic>; + interrupts = <0 117 4>;Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt line 47
Quoted 10 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +10
-0+ clock-names = "clk_main", "clk_apb"; + xlnx,bus-width = <128>; + xlnx,include-sg; + xlnx,overfetch; + dma-coherent; + xlnx,ratectrl = <0>; + xlnx,src-issue = <16>; + xlnx,desc-axi-cache = <0xFF>; + xlnx,src-axi-cache = <0xFF>; + xlnx,dst-axi-cache = <0xFF>;Last I checked, AXI only has 4 cache bits.
Hmm wrong example anyway will remove these properties in the next version...
Regards,
Kedar.
Quoted 7 lines
Quoted 7 lines
Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt new file +3
-1+ xlnx,src-burst-len = <4>; + xlnx,dst-burst-len = <4>; +}; --2.1.2