summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHanna Hawa <hannah@marvell.com>2017-05-05 11:57:47 +0200
committerVinod Koul <vinod.koul@intel.com>2017-05-14 14:54:40 +0200
commitab2c5f0a77fe49bdb6e307b397496373cb47d2c2 (patch)
treef7495766583eccc0afc0e16ecf1d395547f235ec /drivers
parentdmaengine: mv_xor_v2: do not use descriptors not acked by async_tx (diff)
downloadlinux-ab2c5f0a77fe49bdb6e307b397496373cb47d2c2.tar.xz
linux-ab2c5f0a77fe49bdb6e307b397496373cb47d2c2.zip
dmaengine: mv_xor_v2: enable XOR engine after its configuration
The engine was enabled prior to its configuration, which isn't correct. This patch relocates the activation of the XOR engine, to be after the configuration of the XOR engine. Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver") Cc: <stable@vger.kernel.org> Signed-off-by: Hanna Hawa <hannah@marvell.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/mv_xor_v2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c
index cb60e7c4aa16..211b8c0e3cfb 100644
--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -653,9 +653,6 @@ static int mv_xor_v2_descq_init(struct mv_xor_v2_device *xor_dev)
writel((xor_dev->hw_desq & 0xFFFF00000000) >> 32,
xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_BAHR_OFF);
- /* enable the DMA engine */
- writel(0, xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_STOP_OFF);
-
/*
* This is a temporary solution, until we activate the
* SMMU. Set the attributes for reading & writing data buffers
@@ -699,6 +696,9 @@ static int mv_xor_v2_descq_init(struct mv_xor_v2_device *xor_dev)
reg |= MV_XOR_V2_GLOB_PAUSE_AXI_TIME_DIS_VAL;
writel(reg, xor_dev->glob_base + MV_XOR_V2_GLOB_PAUSE);
+ /* enable the DMA engine */
+ writel(0, xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_STOP_OFF);
+
return 0;
}