]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dmaengine/amba-pl08x: Simplify pl08x_ensure_on()
authorViresh Kumar <viresh.kumar@st.com>
Fri, 5 Aug 2011 10:02:34 +0000 (15:32 +0530)
committerVinod Koul <vinod.koul@intel.com>
Thu, 25 Aug 2011 14:03:38 +0000 (19:33 +0530)
Simply writing 1 on bit 0 is sufficient instead of reading and clearing bits.
Also as per manual, for bit 3-31 of DMACConfiguration register:
"read undefined, write as 0"

So, we must not rely on values read from this registers bit 3-31.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/amba-pl08x.c

index 5dd97f45092596ed4dc050bac477c46e745fc7ae..d79688d64886cbe14abdc76e2add4c5baa3f88f4 100644 (file)
@@ -1502,13 +1502,7 @@ bool pl08x_filter_id(struct dma_chan *chan, void *chan_id)
  */
 static void pl08x_ensure_on(struct pl08x_driver_data *pl08x)
 {
-       u32 val;
-
-       val = readl(pl08x->base + PL080_CONFIG);
-       val &= ~(PL080_CONFIG_M2_BE | PL080_CONFIG_M1_BE | PL080_CONFIG_ENABLE);
-       /* We implicitly clear bit 1 and that means little-endian mode */
-       val |= PL080_CONFIG_ENABLE;
-       writel(val, pl08x->base + PL080_CONFIG);
+       writel(PL080_CONFIG_ENABLE, pl08x->base + PL080_CONFIG);
 }
 
 static void pl08x_unmap_buffers(struct pl08x_txd *txd)