diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/dmatest.txt | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Documentation/dmatest.txt b/Documentation/dmatest.txt new file mode 100644 index 000000000000..9a90729bdee6 --- /dev/null +++ b/Documentation/dmatest.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | DMA Test Guide | ||
2 | ============== | ||
3 | |||
4 | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
5 | |||
6 | This small document introduces how to test DMA drivers using dmatest module. | ||
7 | |||
8 | Part 1 - How to build the test module | ||
9 | |||
10 | The menuconfig contains an option that could be found by following path: | ||
11 | Device Drivers -> DMA Engine support -> DMA Test client | ||
12 | |||
13 | In the configuration file the option called CONFIG_DMATEST. The dmatest could | ||
14 | be built as module or inside kernel. Let's consider those cases. | ||
15 | |||
16 | Part 2 - When dmatest is built as a module... | ||
17 | |||
18 | After mounting debugfs and loading the module, the /sys/kernel/debug/dmatest | ||
19 | folder with nodes will be created. They are the same as module parameters with | ||
20 | addition of the 'run' node that controls run and stop phases of the test. | ||
21 | |||
22 | Note that in this case test will not run on load automatically. | ||
23 | |||
24 | Example of usage: | ||
25 | % echo dma0chan0 > /sys/kernel/debug/dmatest/channel | ||
26 | % echo 2000 > /sys/kernel/debug/dmatest/timeout | ||
27 | % echo 1 > /sys/kernel/debug/dmatest/iterations | ||
28 | % echo 1 > /sys/kernel/debug/dmatest/run | ||
29 | |||
30 | Hint: available channel list could be extracted by running the following | ||
31 | command: | ||
32 | % ls -1 /sys/class/dma/ | ||
33 | |||
34 | After a while you will start to get messages about current status or error like | ||
35 | in the original code. | ||
36 | |||
37 | Note that running a new test will stop any in progress test. | ||
38 | |||
39 | Part 3 - When built-in in the kernel... | ||
40 | |||
41 | The module parameters that is supplied to the kernel command line will be used | ||
42 | for the first performed test. After user gets a control, the test could be | ||
43 | interrupted or re-run with same or different parameters. For the details see | ||
44 | the above section "Part 2 - When dmatest is built as a module..." | ||
45 | |||
46 | In both cases the module parameters are used as initial values for the test case. | ||
47 | You always could check them at run-time by running | ||
48 | % grep -H . /sys/module/dmatest/parameters/* | ||