]> 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)
commite1d111582227308f33496018b89de7821b563760
treeca7b508724fe53c918a3c275034cdbee21c15867
parent7c7b00e5a7e4790990c160d0e36c92c4af5e7dd3
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