diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2012-10-16 00:19:17 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-01-08 01:04:14 -0500 |
commit | a9ddb575d6d6c58c39e8c44a22b84445fedb0521 (patch) | |
tree | 3c3b520bb61163d963c417c5355ac7c7cb5ad049 /Documentation | |
parent | 177d2bf5c7d3ab41bfb4ce2597dde668225958dd (diff) |
dmaengine: dw_dmac: Enhance device tree support
dw_dmac driver already supports device tree but it used to have its platform
data passed the non-DT way.
This patch does following changes:
- pass platform data via DT, non-DT way still takes precedence if both are used.
- create generic filter routine
- Earlier slave information was made available by slave specific filter routines
in chan->private field. Now, this information would be passed from within dmac
DT node. Slave drivers would now be required to pass bus_id (a string) as
parameter to this generic filter(), which would be compared against the slave
data passed from DT, by the generic filter routine.
- Update binding document
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Fixed __devinit usage]
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/dma/snps-dma.txt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt index c0d85dbcada5..5bb3dfb6f1d8 100644 --- a/Documentation/devicetree/bindings/dma/snps-dma.txt +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt | |||
@@ -6,6 +6,26 @@ Required properties: | |||
6 | - interrupt-parent: Should be the phandle for the interrupt controller | 6 | - interrupt-parent: Should be the phandle for the interrupt controller |
7 | that services interrupts for this device | 7 | that services interrupts for this device |
8 | - interrupt: Should contain the DMAC interrupt number | 8 | - interrupt: Should contain the DMAC interrupt number |
9 | - nr_channels: Number of channels supported by hardware | ||
10 | - is_private: The device channels should be marked as private and not for by the | ||
11 | general purpose DMA channel allocator. False if not passed. | ||
12 | - chan_allocation_order: order of allocation of channel, 0 (default): ascending, | ||
13 | 1: descending | ||
14 | - chan_priority: priority of channels. 0 (default): increase from chan 0->n, 1: | ||
15 | increase from chan n->0 | ||
16 | - block_size: Maximum block size supported by the controller | ||
17 | - nr_masters: Number of AHB masters supported by the controller | ||
18 | - data_width: Maximum data width supported by hardware per AHB master | ||
19 | (0 - 8bits, 1 - 16bits, ..., 5 - 256bits) | ||
20 | - slave_info: | ||
21 | - bus_id: name of this device channel, not just a device name since | ||
22 | devices may have more than one channel e.g. "foo_tx". For using the | ||
23 | dw_generic_filter(), slave drivers must pass exactly this string as | ||
24 | param to filter function. | ||
25 | - cfg_hi: Platform-specific initializer for the CFG_HI register | ||
26 | - cfg_lo: Platform-specific initializer for the CFG_LO register | ||
27 | - src_master: src master for transfers on allocated channel. | ||
28 | - dst_master: dest master for transfers on allocated channel. | ||
9 | 29 | ||
10 | Example: | 30 | Example: |
11 | 31 | ||
@@ -14,4 +34,28 @@ Example: | |||
14 | reg = <0xfc000000 0x1000>; | 34 | reg = <0xfc000000 0x1000>; |
15 | interrupt-parent = <&vic1>; | 35 | interrupt-parent = <&vic1>; |
16 | interrupts = <12>; | 36 | interrupts = <12>; |
37 | |||
38 | nr_channels = <8>; | ||
39 | chan_allocation_order = <1>; | ||
40 | chan_priority = <1>; | ||
41 | block_size = <0xfff>; | ||
42 | nr_masters = <2>; | ||
43 | data_width = <3 3 0 0>; | ||
44 | |||
45 | slave_info { | ||
46 | uart0-tx { | ||
47 | bus_id = "uart0-tx"; | ||
48 | cfg_hi = <0x4000>; /* 0x8 << 11 */ | ||
49 | cfg_lo = <0>; | ||
50 | src_master = <0>; | ||
51 | dst_master = <1>; | ||
52 | }; | ||
53 | spi0-tx { | ||
54 | bus_id = "spi0-tx"; | ||
55 | cfg_hi = <0x2000>; /* 0x4 << 11 */ | ||
56 | cfg_lo = <0>; | ||
57 | src_master = <0>; | ||
58 | dst_master = <0>; | ||
59 | }; | ||
60 | }; | ||
17 | }; | 61 | }; |