]> asedeno.scripts.mit.edu Git - linux.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)
commit88d8622c0071def657a7eb6c7fd97471808ea9bc
treeca7b508724fe53c918a3c275034cdbee21c15867
parent5a6a6202fa9ab63bce1726663ff5573741bfeab3
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