[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190920085930.19380-1-green.wan@sifive.com>
Date: Fri, 20 Sep 2019 16:58:59 +0800
From: Green Wan <green.wan@...ive.com>
To: unlisted-recipients:; (no To-header on input)
Cc: linux-hackers@...ive.com, Green Wan <green.wan@...ive.com>,
Vinod Koul <vkoul@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...ive.com>,
Albert Ou <aou@...s.berkeley.edu>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linus Walleij <linus.walleij@...aro.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
"Paul E. McKenney" <paulmck@...ux.ibm.com>,
dmaengine@...r.kernel.org, devicetree@...r.kernel.org,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 0/3] dmaengine: sf-pdma: Add platform dma driver
Add PDMA driver support for SiFive HiFive Unleashed RevA00 board. Mainly follows
DMAengine controller doc[1] to implement and take other DMA drivers as reference.
Such as
- drivers/dma/fsl-edma.c
- drivers/dma/dw-edma/
- drivers/dma/pxa-dma.c
Using DMA test client[2] to test. Detailed datasheet is doc[3]. Driver supports:
- 4 physical DMA channels, share same DONE and error interrupt handler.
- Support MEM_TO_MEM
- Tested by DMA test client
- patches include DT Bindgins document and dts for fu450-c000 SoC. Separate dts
patch for easier review and apply to different branch or SoC platform.
- retry 1 time if DMA error occurs.
[Reference Doc]
[1] ./Documentation/driver-api/dmaengine/provider.rst
[2] ./Documentation/driver-api/dmaengine/dmatest.rst
[3] https://static.dev.sifive.com/FU540-C000-v1.0.pdf
[Simple steps to test of DMA Test client]
$ echo 1 > /sys/module/dmatest/parameters/iterations
$ echo dma0chan0 > /sys/module/dmatest/parameters/channel
$ echo dma0chan1 > /sys/module/dmatest/parameters/channel
$ echo dma0chan2 > /sys/module/dmatest/parameters/channel
$ echo dma0chan3 > /sys/module/dmatest/parameters/channel
$ echo 1 > /sys/module/dmatest/parameters/run
[Expected test result]
[ 7756.975356] dmatest: dma0chan0-copy0: summary 11208260 tests, 0 failures 36207.82 iops 579325 KB/s (0)
[ 7756.984093] dmatest: dma0chan1-copy0: summary 11206263 tests, 0 failures 36007.36 iops 576117 KB/s (0)
[ 7756.993453] dmatest: dma0chan2-copy0: summary 10929638 tests, 0 failures 33984.39 iops 543750 KB/s (0)
[ 7757.003008] dmatest: dma0chan3-copy0: summary 11204208 tests, 0 failures 35759.65 iops 572154 KB/s (0)
Green Wan (3):
dt-bindings: dmaengine: sf-pdma: add bindins for SiFive PDMA
riscv: dts: add support for PDMA device of HiFive Unleashed Rev A00
dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00
.../bindings/dma/sifive,fu540-c000-pdma.yaml | 55 ++
MAINTAINERS | 6 +
arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 7 +
drivers/dma/Kconfig | 2 +
drivers/dma/Makefile | 1 +
drivers/dma/sf-pdma/Kconfig | 6 +
drivers/dma/sf-pdma/Makefile | 1 +
drivers/dma/sf-pdma/sf-pdma.c | 623 ++++++++++++++++++
drivers/dma/sf-pdma/sf-pdma.h | 124 ++++
9 files changed, 825 insertions(+)
create mode 100644 Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml
create mode 100644 drivers/dma/sf-pdma/Kconfig
create mode 100644 drivers/dma/sf-pdma/Makefile
create mode 100644 drivers/dma/sf-pdma/sf-pdma.c
create mode 100644 drivers/dma/sf-pdma/sf-pdma.h
--
2.17.1
Powered by blists - more mailing lists