From: Rafal Prylowski Date: Sat, 26 Nov 2011 10:54:07 +0000 (+0200) Subject: dma/ep93xx_dma: fix initialization of M2M control register X-Git-Tag: firefly_0821_release~3680^2~3671^2~24 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b62cfc5e0e59d1e0192105144b724b0c332720a0;p=firefly-linux-kernel-4.4.55.git dma/ep93xx_dma: fix initialization of M2M control register Setting the flags in case of IDE didn't have any effect since the control register is overwritten few lines below. So move these to be after the control register is initialized. Signed-off-by: Rafal Prylowski Signed-off-by: Mika Westerberg Acked-by: H Hartley Sweeten Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c index 009851b2aeea..526a7424f6a9 100644 --- a/drivers/dma/ep93xx_dma.c +++ b/drivers/dma/ep93xx_dma.c @@ -459,10 +459,6 @@ static int m2m_hw_setup(struct ep93xx_dma_chan *edmac) * This IDE part is totally untested. Values below are taken * from the EP93xx Users's Guide and might not be correct. */ - control |= M2M_CONTROL_NO_HDSK; - control |= M2M_CONTROL_RSS_IDE; - control |= M2M_CONTROL_PW_16; - if (data->direction == DMA_MEM_TO_DEV) { /* Worst case from the UG */ control = (3 << M2M_CONTROL_PWSC_SHIFT); @@ -473,6 +469,10 @@ static int m2m_hw_setup(struct ep93xx_dma_chan *edmac) control |= M2M_CONTROL_SAH; control |= M2M_CONTROL_TM_RX; } + + control |= M2M_CONTROL_NO_HDSK; + control |= M2M_CONTROL_RSS_IDE; + control |= M2M_CONTROL_PW_16; break; default: