Skip to content

Commit

Permalink
dmaengine: Add hisilicon k3 DMA engine driver
Browse files Browse the repository at this point in the history
Add dmaengine driver for hisilicon k3 platform based on virt_dma

Signed-off-by: Zhangfei Gao <[email protected]>
Tested-by: Kai Yang <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
zhangfeigao authored and Vinod Koul committed Aug 28, 2013
1 parent 0429936 commit 8e6152b
Show file tree
Hide file tree
Showing 4 changed files with 893 additions and 0 deletions.
46 changes: 46 additions & 0 deletions Documentation/devicetree/bindings/dma/k3dma.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
* Hisilicon K3 DMA controller

See dma.txt first

Required properties:
- compatible: Should be "hisilicon,k3-dma-1.0"
- reg: Should contain DMA registers location and length.
- interrupts: Should contain one interrupt shared by all channel
- #dma-cells: see dma.txt, should be 1, para number
- dma-channels: physical channels supported
- dma-requests: virtual channels supported, each virtual channel
have specific request line
- clocks: clock required

Example:

Controller:
dma0: dma@fcd02000 {
compatible = "hisilicon,k3-dma-1.0";
reg = <0xfcd02000 0x1000>;
#dma-cells = <1>;
dma-channels = <16>;
dma-requests = <27>;
interrupts = <0 12 4>;
clocks = <&pclk>;
status = "disable";
};

Client:
Use specific request line passing from dmax
For example, i2c0 read channel request line is 18, while write channel use 19

i2c0: i2c@fcb08000 {
compatible = "snps,designware-i2c";
dmas = <&dma0 18 /* read channel */
&dma0 19>; /* write channel */
dma-names = "rx", "tx";
};

i2c1: i2c@fcb09000 {
compatible = "snps,designware-i2c";
dmas = <&dma0 20 /* read channel */
&dma0 21>; /* write channel */
dma-names = "rx", "tx";
};

9 changes: 9 additions & 0 deletions drivers/dma/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,15 @@ config DMA_JZ4740
select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS

config K3_DMA
tristate "Hisilicon K3 DMA support"
depends on ARCH_HI3xxx
select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS
help
Support the DMA engine for Hisilicon K3 platform
devices.

config DMA_ENGINE
bool

Expand Down
1 change: 1 addition & 0 deletions drivers/dma/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ obj-$(CONFIG_MMP_TDMA) += mmp_tdma.o
obj-$(CONFIG_DMA_OMAP) += omap-dma.o
obj-$(CONFIG_MMP_PDMA) += mmp_pdma.o
obj-$(CONFIG_DMA_JZ4740) += dma-jz4740.o
obj-$(CONFIG_K3_DMA) += k3dma.o
Loading

0 comments on commit 8e6152b

Please sign in to comment.