Commit 7fc3b3f9 authored by Vinod Koul's avatar Vinod Koul

Merge branch 'topic/doc' into for-linus

parents 2ef7ff03 397dadf5
...@@ -37,8 +37,8 @@ The slave DMA usage consists of following steps: ...@@ -37,8 +37,8 @@ The slave DMA usage consists of following steps:
2. Set slave and controller specific parameters 2. Set slave and controller specific parameters
Next step is always to pass some specific information to the DMA Next step is always to pass some specific information to the DMA
driver. Most of the generic information which a slave DMA can use driver. Most of the generic information which a slave DMA can use
is in struct dma_slave_config. This allows the clients to specify is in struct dma_slave_config. This allows the clients to specify
DMA direction, DMA addresses, bus widths, DMA burst lengths etc DMA direction, DMA addresses, bus widths, DMA burst lengths etc
for the peripheral. for the peripheral.
...@@ -52,7 +52,7 @@ The slave DMA usage consists of following steps: ...@@ -52,7 +52,7 @@ The slave DMA usage consists of following steps:
struct dma_slave_config *config) struct dma_slave_config *config)
Please see the dma_slave_config structure definition in dmaengine.h Please see the dma_slave_config structure definition in dmaengine.h
for a detailed explanation of the struct members. Please note for a detailed explanation of the struct members. Please note
that the 'direction' member will be going away as it duplicates the that the 'direction' member will be going away as it duplicates the
direction given in the prepare call. direction given in the prepare call.
...@@ -101,7 +101,7 @@ The slave DMA usage consists of following steps: ...@@ -101,7 +101,7 @@ The slave DMA usage consists of following steps:
desc = dmaengine_prep_slave_sg(chan, sgl, nr_sg, direction, flags); desc = dmaengine_prep_slave_sg(chan, sgl, nr_sg, direction, flags);
Once a descriptor has been obtained, the callback information can be Once a descriptor has been obtained, the callback information can be
added and the descriptor must then be submitted. Some DMA engine added and the descriptor must then be submitted. Some DMA engine
drivers may hold a spinlock between a successful preparation and drivers may hold a spinlock between a successful preparation and
submission so it is important that these two operations are closely submission so it is important that these two operations are closely
paired. paired.
...@@ -138,7 +138,7 @@ The slave DMA usage consists of following steps: ...@@ -138,7 +138,7 @@ The slave DMA usage consists of following steps:
activity via other DMA engine calls not covered in this document. activity via other DMA engine calls not covered in this document.
dmaengine_submit() will not start the DMA operation, it merely adds dmaengine_submit() will not start the DMA operation, it merely adds
it to the pending queue. For this, see step 5, dma_async_issue_pending. it to the pending queue. For this, see step 5, dma_async_issue_pending.
5. Issue pending DMA requests and wait for callback notification 5. Issue pending DMA requests and wait for callback notification
...@@ -184,13 +184,13 @@ Further APIs: ...@@ -184,13 +184,13 @@ Further APIs:
3. int dmaengine_resume(struct dma_chan *chan) 3. int dmaengine_resume(struct dma_chan *chan)
Resume a previously paused DMA channel. It is invalid to resume a Resume a previously paused DMA channel. It is invalid to resume a
channel which is not currently paused. channel which is not currently paused.
4. enum dma_status dma_async_is_tx_complete(struct dma_chan *chan, 4. enum dma_status dma_async_is_tx_complete(struct dma_chan *chan,
dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used) dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used)
This can be used to check the status of the channel. Please see This can be used to check the status of the channel. Please see
the documentation in include/linux/dmaengine.h for a more complete the documentation in include/linux/dmaengine.h for a more complete
description of this API. description of this API.
...@@ -200,7 +200,7 @@ Further APIs: ...@@ -200,7 +200,7 @@ Further APIs:
Note: Note:
Not all DMA engine drivers can return reliable information for Not all DMA engine drivers can return reliable information for
a running DMA channel. It is recommended that DMA engine users a running DMA channel. It is recommended that DMA engine users
pause or stop (via dmaengine_terminate_all()) the channel before pause or stop (via dmaengine_terminate_all()) the channel before
using this API. using this API.
......
...@@ -34,7 +34,7 @@ command: ...@@ -34,7 +34,7 @@ command:
% ls -1 /sys/class/dma/ % ls -1 /sys/class/dma/
Once started a message like "dmatest: Started 1 threads using dma0chan0" is Once started a message like "dmatest: Started 1 threads using dma0chan0" is
emitted. After that only test failure messages are reported until the test emitted. After that only test failure messages are reported until the test
stops. stops.
Note that running a new test will not stop any in progress test. Note that running a new test will not stop any in progress test.
...@@ -43,11 +43,11 @@ The following command returns the state of the test. ...@@ -43,11 +43,11 @@ The following command returns the state of the test.
% cat /sys/module/dmatest/parameters/run % cat /sys/module/dmatest/parameters/run
To wait for test completion userpace can poll 'run' until it is false, or use To wait for test completion userpace can poll 'run' until it is false, or use
the wait parameter. Specifying 'wait=1' when loading the module causes module the wait parameter. Specifying 'wait=1' when loading the module causes module
initialization to pause until a test run has completed, while reading initialization to pause until a test run has completed, while reading
/sys/module/dmatest/parameters/wait waits for any running test to complete /sys/module/dmatest/parameters/wait waits for any running test to complete
before returning. For example, the following scripts wait for 42 tests before returning. For example, the following scripts wait for 42 tests
to complete before exiting. Note that if 'iterations' is set to 'infinite' then to complete before exiting. Note that if 'iterations' is set to 'infinite' then
waiting is disabled. waiting is disabled.
Example: Example:
...@@ -81,7 +81,7 @@ Example of output: ...@@ -81,7 +81,7 @@ Example of output:
The message format is unified across the different types of errors. A number in The message format is unified across the different types of errors. A number in
the parens represents additional information, e.g. error code, error counter, the parens represents additional information, e.g. error code, error counter,
or status. A test thread also emits a summary line at completion listing the or status. A test thread also emits a summary line at completion listing the
number of tests executed, number that failed, and a result code. number of tests executed, number that failed, and a result code.
Example: Example:
......
...@@ -384,7 +384,7 @@ where to put them) ...@@ -384,7 +384,7 @@ where to put them)
- The descriptor should be prepared for reuse by invoking - The descriptor should be prepared for reuse by invoking
dmaengine_desc_set_reuse() which will set DMA_CTRL_REUSE. dmaengine_desc_set_reuse() which will set DMA_CTRL_REUSE.
- dmaengine_desc_set_reuse() will succeed only when channel support - dmaengine_desc_set_reuse() will succeed only when channel support
reusable descriptor as exhibited by capablities reusable descriptor as exhibited by capabilities
- As a consequence, if a device driver wants to skip the dma_map_sg() and - As a consequence, if a device driver wants to skip the dma_map_sg() and
dma_unmap_sg() in between 2 transfers, because the DMA'd data wasn't used, dma_unmap_sg() in between 2 transfers, because the DMA'd data wasn't used,
it can resubmit the transfer right after its completion. it can resubmit the transfer right after its completion.
......
...@@ -29,7 +29,7 @@ Constraints ...@@ -29,7 +29,7 @@ Constraints
d) Bandwidth guarantee d) Bandwidth guarantee
The PXA architecture has 4 levels of DMAs priorities : high, normal, low. The PXA architecture has 4 levels of DMAs priorities : high, normal, low.
The high prorities get twice as much bandwidth as the normal, which get twice The high priorities get twice as much bandwidth as the normal, which get twice
as much as the low priorities. as much as the low priorities.
A driver should be able to request a priority, especially the real-time A driver should be able to request a priority, especially the real-time
ones such as pxa_camera with (big) throughputs. ones such as pxa_camera with (big) throughputs.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment