aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ste_dma40.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r--drivers/dma/ste_dma40.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index df2e1a30ee7e..8aff86594141 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -640,19 +640,15 @@ static void d40_config_set_event(struct d40_chan *d40c, bool do_enable)
640 640
641static u32 d40_chan_has_events(struct d40_chan *d40c) 641static u32 d40_chan_has_events(struct d40_chan *d40c)
642{ 642{
643 u32 val = 0; 643 u32 val;
644 644
645 /* If SSLNK or SDLNK is zero all events are disabled */ 645 val = readl(d40c->base->virtbase + D40_DREG_PCBASE +
646 if ((d40c->dma_cfg.dir == STEDMA40_PERIPH_TO_MEM) || 646 d40c->phy_chan->num * D40_DREG_PCDELTA +
647 (d40c->dma_cfg.dir == STEDMA40_PERIPH_TO_PERIPH)) 647 D40_CHAN_REG_SSLNK);
648 val = readl(d40c->base->virtbase + D40_DREG_PCBASE + 648
649 d40c->phy_chan->num * D40_DREG_PCDELTA + 649 val |= readl(d40c->base->virtbase + D40_DREG_PCBASE +
650 D40_CHAN_REG_SSLNK); 650 d40c->phy_chan->num * D40_DREG_PCDELTA +
651 651 D40_CHAN_REG_SDLNK);
652 if (d40c->dma_cfg.dir != STEDMA40_PERIPH_TO_MEM)
653 val = readl(d40c->base->virtbase + D40_DREG_PCBASE +
654 d40c->phy_chan->num * D40_DREG_PCDELTA +
655 D40_CHAN_REG_SDLNK);
656 return val; 652 return val;
657} 653}
658 654