diff options
author | Thomas Abraham <thomas.abraham@linaro.org> | 2011-10-24 05:43:31 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-12-22 20:07:04 -0500 |
commit | 93ed55441245a39e3935f5cf1af3e22febcce905 (patch) | |
tree | 5e238c5e269274fd47c1d03cb0a1c6172feef8fc /Documentation | |
parent | e1cd8454dac99473c2349efce1346264c494f28d (diff) |
DMA: PL330: Add device tree support
For PL330 dma controllers instantiated from device tree, the channel
lookup is based on phandle of the dma controller and dma request id
specified by the client node. During probe, the private data of each
channel of the controller is set to point to the device node of the
dma controller. The 'chan_id' of the each channel is used as the
dma request id.
Client driver requesting dma channels specify the phandle of the
dma controller and the request id. The pl330 filter function
converts the phandle to the device node pointer and matches that
with channel's private data. If a match is found, the request id
from the client node and the 'chan_id' of the channel is matched.
A channel is found if both the values match.
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/dma/arm-pl330.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt new file mode 100644 index 000000000000..a4cd273b2a67 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | * ARM PrimeCell PL330 DMA Controller | ||
2 | |||
3 | The ARM PrimeCell PL330 DMA controller can move blocks of memory contents | ||
4 | between memory and peripherals or memory to memory. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: should include both "arm,pl330" and "arm,primecell". | ||
8 | - reg: physical base address of the controller and length of memory mapped | ||
9 | region. | ||
10 | - interrupts: interrupt number to the cpu. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | pdma0: pdma@12680000 { | ||
15 | compatible = "arm,pl330", "arm,primecell"; | ||
16 | reg = <0x12680000 0x1000>; | ||
17 | interrupts = <99>; | ||
18 | }; | ||
19 | |||
20 | Client drivers (device nodes requiring dma transfers from dev-to-mem or | ||
21 | mem-to-dev) should specify the DMA channel numbers using a two-value pair | ||
22 | as shown below. | ||
23 | |||
24 | [property name] = <[phandle of the dma controller] [dma request id]>; | ||
25 | |||
26 | where 'dma request id' is the dma request number which is connected | ||
27 | to the client controller. The 'property name' is recommended to be | ||
28 | of the form <name>-dma-channel. | ||
29 | |||
30 | Example: tx-dma-channel = <&pdma0 12>; | ||