dmaengine: dmatest: Add support for multi channel testing
authorSeraj Alijan <seraj.alijan@sondrel.com>
Mon, 10 Dec 2018 08:52:31 +0000 (08:52 +0000)
committerVinod Koul <vkoul@kernel.org>
Mon, 17 Dec 2018 06:15:11 +0000 (11:45 +0530)
commitd53513d5dc285d9a95a534fc41c5c08af6b60eac
tree0adf4b0aef80fbca6b89699de6baa69b95379e05
parent3f3c75541ffe082194e48ea9aa5edf2341f77753
dmaengine: dmatest: Add support for multi channel testing

Add support for running tests on multiple channels simultaneously as the
driver currently limits to 1 channel per test run. This will add support
for stress testing DMA controllers with multi channel capabilities.

This is done by adding a callback function to the "channel" parameter
that registers the requested channel prior to the "run" parameter being
set to 1. Each time the "channel" parameter is populated with a new
dma channel, a new test is appended to the thread queue. Once the "run"
parameter is set to 1, the test will kick start all pending threads.

Signed-off-by: Seraj Alijan <seraj.alijan@sondrel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dmatest.c