]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
dma/ep93xx_dma: fix initialization of M2M control register
authorRafal Prylowski <prylowski@metasoft.pl>
Sat, 26 Nov 2011 10:54:07 +0000 (12:54 +0200)
committerVinod Koul <vinod.koul@linux.intel.com>
Mon, 5 Dec 2011 02:44:57 +0000 (08:14 +0530)
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 <prylowski@metasoft.pl>
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/ep93xx_dma.c

index 009851b2aeeadf3392a6d4c06b8b872efa520f36..526a7424f6a92d230b84f1924f1b60b01dcbab9b 100644 (file)
@@ -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: