diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2010-08-09 08:08:41 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-09-22 17:53:46 -0400 |
commit | 9dbfbd35ce16e4f5a4d0d9e3f6e012b136fe80ea (patch) | |
tree | 343750610afe11e4637a450bba74ec6a9106e733 /drivers/dma | |
parent | 767a9675c4a68ada55f0f30d629db627bd47f012 (diff) |
DMAENGINE: ste_dma40: corrected is_paused behavior
The handling of pause detection was slightly incorrect.
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/ste_dma40.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 7a4919bf1e92..2b209fa004ba 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -1521,16 +1521,22 @@ static bool d40_is_paused(struct d40_chan *d40c) | |||
1521 | } | 1521 | } |
1522 | 1522 | ||
1523 | if (d40c->dma_cfg.dir == STEDMA40_MEM_TO_PERIPH || | 1523 | if (d40c->dma_cfg.dir == STEDMA40_MEM_TO_PERIPH || |
1524 | d40c->dma_cfg.dir == STEDMA40_MEM_TO_MEM) | 1524 | d40c->dma_cfg.dir == STEDMA40_MEM_TO_MEM) { |
1525 | event = D40_TYPE_TO_EVENT(d40c->dma_cfg.dst_dev_type); | 1525 | event = D40_TYPE_TO_EVENT(d40c->dma_cfg.dst_dev_type); |
1526 | else if (d40c->dma_cfg.dir == STEDMA40_PERIPH_TO_MEM) | 1526 | status = readl(d40c->base->virtbase + D40_DREG_PCBASE + |
1527 | d40c->phy_chan->num * D40_DREG_PCDELTA + | ||
1528 | D40_CHAN_REG_SDLNK); | ||
1529 | } else if (d40c->dma_cfg.dir == STEDMA40_PERIPH_TO_MEM) { | ||
1527 | event = D40_TYPE_TO_EVENT(d40c->dma_cfg.src_dev_type); | 1530 | event = D40_TYPE_TO_EVENT(d40c->dma_cfg.src_dev_type); |
1528 | else { | 1531 | status = readl(d40c->base->virtbase + D40_DREG_PCBASE + |
1532 | d40c->phy_chan->num * D40_DREG_PCDELTA + | ||
1533 | D40_CHAN_REG_SSLNK); | ||
1534 | } else { | ||
1529 | dev_err(&d40c->chan.dev->device, | 1535 | dev_err(&d40c->chan.dev->device, |
1530 | "[%s] Unknown direction\n", __func__); | 1536 | "[%s] Unknown direction\n", __func__); |
1531 | goto _exit; | 1537 | goto _exit; |
1532 | } | 1538 | } |
1533 | status = d40_chan_has_events(d40c); | 1539 | |
1534 | status = (status & D40_EVENTLINE_MASK(event)) >> | 1540 | status = (status & D40_EVENTLINE_MASK(event)) >> |
1535 | D40_EVENTLINE_POS(event); | 1541 | D40_EVENTLINE_POS(event); |
1536 | 1542 | ||