diff options
author | Barry Song <Baohua.Song@csr.com> | 2014-03-27 03:49:31 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-03-29 09:50:13 -0400 |
commit | 2e041c94628c2f0b8b704dc092802ddeaa70c6e9 (patch) | |
tree | 5dce0f4735a928382b5e47be8d84c6ffe80b03f8 /Documentation/devicetree/bindings/dma | |
parent | 80b0e0abfbcf9897ee263a79bc4cbdcfeca72431 (diff) |
dmaengine: sirf: enable generic dt binding for dma channels
move to support of_dma_request_slave_channel() and dma_request_slave_channel.
we add a xlate() to let dma clients be able to find right dma_chan by generic
"dmas" properties in dts.
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'Documentation/devicetree/bindings/dma')
-rw-r--r-- | Documentation/devicetree/bindings/dma/sirfsoc-dma.txt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/dma/sirfsoc-dma.txt b/Documentation/devicetree/bindings/dma/sirfsoc-dma.txt new file mode 100644 index 000000000000..ecbc96ad36f8 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/sirfsoc-dma.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | * CSR SiRFSoC DMA controller | ||
2 | |||
3 | See dma.txt first | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: Should be "sirf,prima2-dmac" or "sirf,marco-dmac" | ||
7 | - reg: Should contain DMA registers location and length. | ||
8 | - interrupts: Should contain one interrupt shared by all channel | ||
9 | - #dma-cells: must be <1>. used to represent the number of integer | ||
10 | cells in the dmas property of client device. | ||
11 | - clocks: clock required | ||
12 | |||
13 | Example: | ||
14 | |||
15 | Controller: | ||
16 | dmac0: dma-controller@b00b0000 { | ||
17 | compatible = "sirf,prima2-dmac"; | ||
18 | reg = <0xb00b0000 0x10000>; | ||
19 | interrupts = <12>; | ||
20 | clocks = <&clks 24>; | ||
21 | #dma-cells = <1>; | ||
22 | }; | ||
23 | |||
24 | |||
25 | Client: | ||
26 | Fill the specific dma request line in dmas. In the below example, spi0 read | ||
27 | channel request line is 9 of the 2nd dma controller, while write channel uses | ||
28 | 4 of the 2nd dma controller; spi1 read channel request line is 12 of the 1st | ||
29 | dma controller, while write channel uses 13 of the 1st dma controller: | ||
30 | |||
31 | spi0: spi@b00d0000 { | ||
32 | compatible = "sirf,prima2-spi"; | ||
33 | dmas = <&dmac1 9>, | ||
34 | <&dmac1 4>; | ||
35 | dma-names = "rx", "tx"; | ||
36 | }; | ||
37 | |||
38 | spi1: spi@b0170000 { | ||
39 | compatible = "sirf,prima2-spi"; | ||
40 | dmas = <&dmac0 12>, | ||
41 | <&dmac0 13>; | ||
42 | dma-names = "rx", "tx"; | ||
43 | }; | ||