diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-20 16:20:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-20 16:20:24 -0500 |
commit | e6d69a60b77a6ea8d5f9d41765c7571bb8d45531 (patch) | |
tree | 4ea3fe7c49a864da2ce7ffb51a703661826dc15d /Documentation | |
parent | 5a1efc6e68a095917277459091fafba6a6baef17 (diff) | |
parent | df12a3178d340319b1955be6b973a4eb84aff754 (diff) |
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine changes from Vinod Koul:
"This brings for slave dmaengine:
- Change dma notification flag to DMA_COMPLETE from DMA_SUCCESS as
dmaengine can only transfer and not verify validaty of dma
transfers
- Bunch of fixes across drivers:
- cppi41 driver fixes from Daniel
- 8 channel freescale dma engine support and updated bindings from
Hongbo
- msx-dma fixes and cleanup by Markus
- DMAengine updates from Dan:
- Bartlomiej and Dan finalized a rework of the dma address unmap
implementation.
- In the course of testing 1/ a collection of enhancements to
dmatest fell out. Notably basic performance statistics, and
fixed / enhanced test control through new module parameters
'run', 'wait', 'noverify', and 'verbose'. Thanks to Andriy and
Linus [Walleij] for their review.
- Testing the raid related corner cases of 1/ triggered bugs in
the recently added 16-source operation support in the ioatdma
driver.
- Some minor fixes / cleanups to mv_xor and ioatdma"
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (99 commits)
dma: mv_xor: Fix mis-usage of mmio 'base' and 'high_base' registers
dma: mv_xor: Remove unneeded NULL address check
ioat: fix ioat3_irq_reinit
ioat: kill msix_single_vector support
raid6test: add new corner case for ioatdma driver
ioatdma: clean up sed pool kmem_cache
ioatdma: fix selection of 16 vs 8 source path
ioatdma: fix sed pool selection
ioatdma: Fix bug in selftest after removal of DMA_MEMSET.
dmatest: verbose mode
dmatest: convert to dmaengine_unmap_data
dmatest: add a 'wait' parameter
dmatest: add basic performance metrics
dmatest: add support for skipping verification and random data setup
dmatest: use pseudo random numbers
dmatest: support xor-only, or pq-only channels in tests
dmatest: restore ability to start test at module load and init
dmatest: cleanup redundant "dmatest: " prefixes
dmatest: replace stored results mechanism, with uniform messages
Revert "dmatest: append verify result to results"
...
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/dma/atmel-dma.txt | 2 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/powerpc/fsl/dma.txt | 138 | ||||
-rw-r--r-- | Documentation/dmatest.txt | 72 |
3 files changed, 143 insertions, 69 deletions
diff --git a/Documentation/devicetree/bindings/dma/atmel-dma.txt b/Documentation/devicetree/bindings/dma/atmel-dma.txt index e1f343c7a34b..f69bcf5a6343 100644 --- a/Documentation/devicetree/bindings/dma/atmel-dma.txt +++ b/Documentation/devicetree/bindings/dma/atmel-dma.txt | |||
@@ -28,7 +28,7 @@ The three cells in order are: | |||
28 | dependent: | 28 | dependent: |
29 | - bit 7-0: peripheral identifier for the hardware handshaking interface. The | 29 | - bit 7-0: peripheral identifier for the hardware handshaking interface. The |
30 | identifier can be different for tx and rx. | 30 | identifier can be different for tx and rx. |
31 | - bit 11-8: FIFO configuration. 0 for half FIFO, 1 for ALAP, 1 for ASAP. | 31 | - bit 11-8: FIFO configuration. 0 for half FIFO, 1 for ALAP, 2 for ASAP. |
32 | 32 | ||
33 | Example: | 33 | Example: |
34 | 34 | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/dma.txt b/Documentation/devicetree/bindings/powerpc/fsl/dma.txt index 2a4b4bce6110..7fc1b010fa75 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/dma.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/dma.txt | |||
@@ -1,33 +1,30 @@ | |||
1 | * Freescale 83xx DMA Controller | 1 | * Freescale DMA Controllers |
2 | 2 | ||
3 | Freescale PowerPC 83xx have on chip general purpose DMA controllers. | 3 | ** Freescale Elo DMA Controller |
4 | This is a little-endian 4-channel DMA controller, used in Freescale mpc83xx | ||
5 | series chips such as mpc8315, mpc8349, mpc8379 etc. | ||
4 | 6 | ||
5 | Required properties: | 7 | Required properties: |
6 | 8 | ||
7 | - compatible : compatible list, contains 2 entries, first is | 9 | - compatible : must include "fsl,elo-dma" |
8 | "fsl,CHIP-dma", where CHIP is the processor | 10 | - reg : DMA General Status Register, i.e. DGSR which contains |
9 | (mpc8349, mpc8360, etc.) and the second is | 11 | status for all the 4 DMA channels |
10 | "fsl,elo-dma" | 12 | - ranges : describes the mapping between the address space of the |
11 | - reg : <registers mapping for DMA general status reg> | 13 | DMA channels and the address space of the DMA controller |
12 | - ranges : Should be defined as specified in 1) to describe the | ||
13 | DMA controller channels. | ||
14 | - cell-index : controller index. 0 for controller @ 0x8100 | 14 | - cell-index : controller index. 0 for controller @ 0x8100 |
15 | - interrupts : <interrupt mapping for DMA IRQ> | 15 | - interrupts : interrupt specifier for DMA IRQ |
16 | - interrupt-parent : optional, if needed for interrupt mapping | 16 | - interrupt-parent : optional, if needed for interrupt mapping |
17 | 17 | ||
18 | |||
19 | - DMA channel nodes: | 18 | - DMA channel nodes: |
20 | - compatible : compatible list, contains 2 entries, first is | 19 | - compatible : must include "fsl,elo-dma-channel" |
21 | "fsl,CHIP-dma-channel", where CHIP is the processor | 20 | However, see note below. |
22 | (mpc8349, mpc8350, etc.) and the second is | 21 | - reg : DMA channel specific registers |
23 | "fsl,elo-dma-channel". However, see note below. | 22 | - cell-index : DMA channel index starts at 0. |
24 | - reg : <registers mapping for channel> | ||
25 | - cell-index : dma channel index starts at 0. | ||
26 | 23 | ||
27 | Optional properties: | 24 | Optional properties: |
28 | - interrupts : <interrupt mapping for DMA channel IRQ> | 25 | - interrupts : interrupt specifier for DMA channel IRQ |
29 | (on 83xx this is expected to be identical to | 26 | (on 83xx this is expected to be identical to |
30 | the interrupts property of the parent node) | 27 | the interrupts property of the parent node) |
31 | - interrupt-parent : optional, if needed for interrupt mapping | 28 | - interrupt-parent : optional, if needed for interrupt mapping |
32 | 29 | ||
33 | Example: | 30 | Example: |
@@ -70,30 +67,27 @@ Example: | |||
70 | }; | 67 | }; |
71 | }; | 68 | }; |
72 | 69 | ||
73 | * Freescale 85xx/86xx DMA Controller | 70 | ** Freescale EloPlus DMA Controller |
74 | 71 | This is a 4-channel DMA controller with extended addresses and chaining, | |
75 | Freescale PowerPC 85xx/86xx have on chip general purpose DMA controllers. | 72 | mainly used in Freescale mpc85xx/86xx, Pxxx and BSC series chips, such as |
73 | mpc8540, mpc8641 p4080, bsc9131 etc. | ||
76 | 74 | ||
77 | Required properties: | 75 | Required properties: |
78 | 76 | ||
79 | - compatible : compatible list, contains 2 entries, first is | 77 | - compatible : must include "fsl,eloplus-dma" |
80 | "fsl,CHIP-dma", where CHIP is the processor | 78 | - reg : DMA General Status Register, i.e. DGSR which contains |
81 | (mpc8540, mpc8540, etc.) and the second is | 79 | status for all the 4 DMA channels |
82 | "fsl,eloplus-dma" | ||
83 | - reg : <registers mapping for DMA general status reg> | ||
84 | - cell-index : controller index. 0 for controller @ 0x21000, | 80 | - cell-index : controller index. 0 for controller @ 0x21000, |
85 | 1 for controller @ 0xc000 | 81 | 1 for controller @ 0xc000 |
86 | - ranges : Should be defined as specified in 1) to describe the | 82 | - ranges : describes the mapping between the address space of the |
87 | DMA controller channels. | 83 | DMA channels and the address space of the DMA controller |
88 | 84 | ||
89 | - DMA channel nodes: | 85 | - DMA channel nodes: |
90 | - compatible : compatible list, contains 2 entries, first is | 86 | - compatible : must include "fsl,eloplus-dma-channel" |
91 | "fsl,CHIP-dma-channel", where CHIP is the processor | 87 | However, see note below. |
92 | (mpc8540, mpc8560, etc.) and the second is | 88 | - cell-index : DMA channel index starts at 0. |
93 | "fsl,eloplus-dma-channel". However, see note below. | 89 | - reg : DMA channel specific registers |
94 | - cell-index : dma channel index starts at 0. | 90 | - interrupts : interrupt specifier for DMA channel IRQ |
95 | - reg : <registers mapping for channel> | ||
96 | - interrupts : <interrupt mapping for DMA channel IRQ> | ||
97 | - interrupt-parent : optional, if needed for interrupt mapping | 91 | - interrupt-parent : optional, if needed for interrupt mapping |
98 | 92 | ||
99 | Example: | 93 | Example: |
@@ -134,6 +128,76 @@ Example: | |||
134 | }; | 128 | }; |
135 | }; | 129 | }; |
136 | 130 | ||
131 | ** Freescale Elo3 DMA Controller | ||
132 | DMA controller which has same function as EloPlus except that Elo3 has 8 | ||
133 | channels while EloPlus has only 4, it is used in Freescale Txxx and Bxxx | ||
134 | series chips, such as t1040, t4240, b4860. | ||
135 | |||
136 | Required properties: | ||
137 | |||
138 | - compatible : must include "fsl,elo3-dma" | ||
139 | - reg : contains two entries for DMA General Status Registers, | ||
140 | i.e. DGSR0 which includes status for channel 1~4, and | ||
141 | DGSR1 for channel 5~8 | ||
142 | - ranges : describes the mapping between the address space of the | ||
143 | DMA channels and the address space of the DMA controller | ||
144 | |||
145 | - DMA channel nodes: | ||
146 | - compatible : must include "fsl,eloplus-dma-channel" | ||
147 | - reg : DMA channel specific registers | ||
148 | - interrupts : interrupt specifier for DMA channel IRQ | ||
149 | - interrupt-parent : optional, if needed for interrupt mapping | ||
150 | |||
151 | Example: | ||
152 | dma@100300 { | ||
153 | #address-cells = <1>; | ||
154 | #size-cells = <1>; | ||
155 | compatible = "fsl,elo3-dma"; | ||
156 | reg = <0x100300 0x4>, | ||
157 | <0x100600 0x4>; | ||
158 | ranges = <0x0 0x100100 0x500>; | ||
159 | dma-channel@0 { | ||
160 | compatible = "fsl,eloplus-dma-channel"; | ||
161 | reg = <0x0 0x80>; | ||
162 | interrupts = <28 2 0 0>; | ||
163 | }; | ||
164 | dma-channel@80 { | ||
165 | compatible = "fsl,eloplus-dma-channel"; | ||
166 | reg = <0x80 0x80>; | ||
167 | interrupts = <29 2 0 0>; | ||
168 | }; | ||
169 | dma-channel@100 { | ||
170 | compatible = "fsl,eloplus-dma-channel"; | ||
171 | reg = <0x100 0x80>; | ||
172 | interrupts = <30 2 0 0>; | ||
173 | }; | ||
174 | dma-channel@180 { | ||
175 | compatible = "fsl,eloplus-dma-channel"; | ||
176 | reg = <0x180 0x80>; | ||
177 | interrupts = <31 2 0 0>; | ||
178 | }; | ||
179 | dma-channel@300 { | ||
180 | compatible = "fsl,eloplus-dma-channel"; | ||
181 | reg = <0x300 0x80>; | ||
182 | interrupts = <76 2 0 0>; | ||
183 | }; | ||
184 | dma-channel@380 { | ||
185 | compatible = "fsl,eloplus-dma-channel"; | ||
186 | reg = <0x380 0x80>; | ||
187 | interrupts = <77 2 0 0>; | ||
188 | }; | ||
189 | dma-channel@400 { | ||
190 | compatible = "fsl,eloplus-dma-channel"; | ||
191 | reg = <0x400 0x80>; | ||
192 | interrupts = <78 2 0 0>; | ||
193 | }; | ||
194 | dma-channel@480 { | ||
195 | compatible = "fsl,eloplus-dma-channel"; | ||
196 | reg = <0x480 0x80>; | ||
197 | interrupts = <79 2 0 0>; | ||
198 | }; | ||
199 | }; | ||
200 | |||
137 | Note on DMA channel compatible properties: The compatible property must say | 201 | Note on DMA channel compatible properties: The compatible property must say |
138 | "fsl,elo-dma-channel" or "fsl,eloplus-dma-channel" to be used by the Elo DMA | 202 | "fsl,elo-dma-channel" or "fsl,eloplus-dma-channel" to be used by the Elo DMA |
139 | driver (fsldma). Any DMA channel used by fsldma cannot be used by another | 203 | driver (fsldma). Any DMA channel used by fsldma cannot be used by another |
diff --git a/Documentation/dmatest.txt b/Documentation/dmatest.txt index a2b5663eae26..dd77a81bdb80 100644 --- a/Documentation/dmatest.txt +++ b/Documentation/dmatest.txt | |||
@@ -15,39 +15,48 @@ be built as module or inside kernel. Let's consider those cases. | |||
15 | 15 | ||
16 | Part 2 - When dmatest is built as a module... | 16 | Part 2 - When dmatest is built as a module... |
17 | 17 | ||
18 | After mounting debugfs and loading the module, the /sys/kernel/debug/dmatest | ||
19 | folder with nodes will be created. There are two important files located. First | ||
20 | is the 'run' node that controls run and stop phases of the test, and the second | ||
21 | one, 'results', is used to get the test case results. | ||
22 | |||
23 | Note that in this case test will not run on load automatically. | ||
24 | |||
25 | Example of usage: | 18 | Example of usage: |
19 | % modprobe dmatest channel=dma0chan0 timeout=2000 iterations=1 run=1 | ||
20 | |||
21 | ...or: | ||
22 | % modprobe dmatest | ||
26 | % echo dma0chan0 > /sys/module/dmatest/parameters/channel | 23 | % echo dma0chan0 > /sys/module/dmatest/parameters/channel |
27 | % echo 2000 > /sys/module/dmatest/parameters/timeout | 24 | % echo 2000 > /sys/module/dmatest/parameters/timeout |
28 | % echo 1 > /sys/module/dmatest/parameters/iterations | 25 | % echo 1 > /sys/module/dmatest/parameters/iterations |
29 | % echo 1 > /sys/kernel/debug/dmatest/run | 26 | % echo 1 > /sys/module/dmatest/parameters/run |
27 | |||
28 | ...or on the kernel command line: | ||
29 | |||
30 | dmatest.channel=dma0chan0 dmatest.timeout=2000 dmatest.iterations=1 dmatest.run=1 | ||
30 | 31 | ||
31 | Hint: available channel list could be extracted by running the following | 32 | Hint: available channel list could be extracted by running the following |
32 | command: | 33 | command: |
33 | % ls -1 /sys/class/dma/ | 34 | % ls -1 /sys/class/dma/ |
34 | 35 | ||
35 | After a while you will start to get messages about current status or error like | 36 | Once started a message like "dmatest: Started 1 threads using dma0chan0" is |
36 | in the original code. | 37 | emitted. After that only test failure messages are reported until the test |
38 | stops. | ||
37 | 39 | ||
38 | Note that running a new test will not stop any in progress test. | 40 | Note that running a new test will not stop any in progress test. |
39 | 41 | ||
40 | The following command should return actual state of the test. | 42 | The following command returns the state of the test. |
41 | % cat /sys/kernel/debug/dmatest/run | 43 | % cat /sys/module/dmatest/parameters/run |
42 | 44 | ||
43 | To wait for test done the user may perform a busy loop that checks the state. | 45 | To wait for test completion userpace can poll 'run' until it is false, or use |
44 | 46 | the wait parameter. Specifying 'wait=1' when loading the module causes module | |
45 | % while [ $(cat /sys/kernel/debug/dmatest/run) = "Y" ] | 47 | initialization to pause until a test run has completed, while reading |
46 | > do | 48 | /sys/module/dmatest/parameters/wait waits for any running test to complete |
47 | > echo -n "." | 49 | before returning. For example, the following scripts wait for 42 tests |
48 | > sleep 1 | 50 | to complete before exiting. Note that if 'iterations' is set to 'infinite' then |
49 | > done | 51 | waiting is disabled. |
50 | > echo | 52 | |
53 | Example: | ||
54 | % modprobe dmatest run=1 iterations=42 wait=1 | ||
55 | % modprobe -r dmatest | ||
56 | ...or: | ||
57 | % modprobe dmatest run=1 iterations=42 | ||
58 | % cat /sys/module/dmatest/parameters/wait | ||
59 | % modprobe -r dmatest | ||
51 | 60 | ||
52 | Part 3 - When built-in in the kernel... | 61 | Part 3 - When built-in in the kernel... |
53 | 62 | ||
@@ -62,21 +71,22 @@ case. You always could check them at run-time by running | |||
62 | 71 | ||
63 | Part 4 - Gathering the test results | 72 | Part 4 - Gathering the test results |
64 | 73 | ||
65 | The module provides a storage for the test results in the memory. The gathered | 74 | Test results are printed to the kernel log buffer with the format: |
66 | data could be used after test is done. | ||
67 | 75 | ||
68 | The special file 'results' in the debugfs represents gathered data of the in | 76 | "dmatest: result <channel>: <test id>: '<error msg>' with src_off=<val> dst_off=<val> len=<val> (<err code>)" |
69 | progress test. The messages collected are printed to the kernel log as well. | ||
70 | 77 | ||
71 | Example of output: | 78 | Example of output: |
72 | % cat /sys/kernel/debug/dmatest/results | 79 | % dmesg | tail -n 1 |
73 | dma0chan0-copy0: #1: No errors with src_off=0x7bf dst_off=0x8ad len=0x3fea (0) | 80 | dmatest: result dma0chan0-copy0: #1: No errors with src_off=0x7bf dst_off=0x8ad len=0x3fea (0) |
74 | 81 | ||
75 | The message format is unified across the different types of errors. A number in | 82 | The message format is unified across the different types of errors. A number in |
76 | the parens represents additional information, e.g. error code, error counter, | 83 | the parens represents additional information, e.g. error code, error counter, |
77 | or status. | 84 | or status. A test thread also emits a summary line at completion listing the |
85 | number of tests executed, number that failed, and a result code. | ||
78 | 86 | ||
79 | Comparison between buffers is stored to the dedicated structure. | 87 | Example: |
88 | % dmesg | tail -n 1 | ||
89 | dmatest: dma0chan0-copy0: summary 1 test, 0 failures 1000 iops 100000 KB/s (0) | ||
80 | 90 | ||
81 | Note that the verify result is now accessible only via file 'results' in the | 91 | The details of a data miscompare error are also emitted, but do not follow the |
82 | debugfs. | 92 | above format. |