]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: sun6i: Restructure code to allow extension for new SoCs
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Thu, 28 Sep 2017 01:49:20 +0000 (03:49 +0200)
committerVinod Koul <vinod.koul@intel.com>
Mon, 16 Oct 2017 07:01:24 +0000 (12:31 +0530)
commit29073fd5b31c73fe8e1e0571f699b965d36ec3a5
treeca7b508724fe53c918a3c275034cdbee21c15867
parent68539752cff411ee5b759b2bcb2a3167d367afd2
dmaengine: sun6i: Restructure code to allow extension for new SoCs

The current code mixes three distinct operations when transforming
the slave config to register settings:

  1. special handling of DMA_SLAVE_BUSWIDTH_UNDEFINED, maxburst == 0
  2. range checking
  3. conversion of raw to register values

As the range checks depend on the specific SoC, move these out of the
conversion to distinct operations.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/sun6i-dma.c