dmaengine: ste_dma40: Separate Logical Global Interrupt Mask (GIM) unmasking
authorLee Jones <lee.jones@linaro.org>
Wed, 15 May 2013 09:51:24 +0000 (10:51 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 23 May 2013 19:13:16 +0000 (21:13 +0200)
During the initial setup of a logical channel, it is necessary to unmask
the GIM in order to receive generated terminal count and error interrupts.
We're separating out this required code so it will be possible to move
the remaining code in d40_phy_cfg(), which is mostly runtime configuration
into the runtime_config() routine.

Cc: Dan Williams <djbw@fb.com>
Cc: Per Forlin <per.forlin@stericsson.com>
Cc: Rabin Vincent <rabin@rab.in>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/dma/ste_dma40.c
drivers/dma/ste_dma40_ll.c

index 5e9f6d67089126f98bd66b345cd4055b8dbd915c..759293e4a1ccfc884d70a0d2c1ee94b651649e41 100644 (file)
@@ -2513,6 +2513,10 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)
                        d40c->lcpa = d40c->base->lcpa_base +
                                d40c->dma_cfg.dev_type *
                                D40_LCPA_CHAN_SIZE + D40_LCPA_CHAN_DST_DELTA;
+
+               /* Unmask the Global Interrupt Mask. */
+               d40c->src_def_cfg |= BIT(D40_SREG_CFG_LOG_GIM_POS);
+               d40c->dst_def_cfg |= BIT(D40_SREG_CFG_LOG_GIM_POS);
        }
 
        dev_dbg(chan2dev(d40c), "allocated %s channel (phy %d%s)\n",
index 5eb6c10beae15711cdb58d750170e3b71b17d523..435a223c891f3b27a259ade16b099a373c04eda5 100644 (file)
@@ -107,11 +107,6 @@ void d40_phy_cfg(struct stedma40_chan_cfg *cfg,
                        src |= 1 << D40_SREG_CFG_PRI_POS;
                        dst |= 1 << D40_SREG_CFG_PRI_POS;
                }
-
-       } else {
-               /* Logical channel */
-               dst |= 1 << D40_SREG_CFG_LOG_GIM_POS;
-               src |= 1 << D40_SREG_CFG_LOG_GIM_POS;
        }
 
        if (cfg->src_info.big_endian)