lkml.org 
[lkml]   [2012]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/4] dma: imx-sdma: start transfer in issue_pending
    Date
    The DMA API requires that transfers are started in issue_pending
    instead of tx_submit. Fix this.

    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
    ---
    drivers/dma/imx-sdma.c | 11 +++++------
    1 files changed, 5 insertions(+), 6 deletions(-)

    diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
    index f993955..eb28bb0 100644
    --- a/drivers/dma/imx-sdma.c
    +++ b/drivers/dma/imx-sdma.c
    @@ -833,15 +833,12 @@ static struct sdma_channel *to_sdma_chan(struct dma_chan *chan)
    static dma_cookie_t sdma_tx_submit(struct dma_async_tx_descriptor *tx)
    {
    struct sdma_channel *sdmac = to_sdma_chan(tx->chan);
    - struct sdma_engine *sdma = sdmac->sdma;
    dma_cookie_t cookie;

    spin_lock_irq(&sdmac->lock);

    cookie = sdma_assign_cookie(sdmac);

    - sdma_enable_channel(sdma, sdmac->channel);
    -
    spin_unlock_irq(&sdmac->lock);

    return cookie;
    @@ -1126,9 +1123,11 @@ static enum dma_status sdma_tx_status(struct dma_chan *chan,

    static void sdma_issue_pending(struct dma_chan *chan)
    {
    - /*
    - * Nothing to do. We only have a single descriptor
    - */
    + struct sdma_channel *sdmac = to_sdma_chan(chan);
    + struct sdma_engine *sdma = sdmac->sdma;
    +
    + if (sdmac->status == DMA_IN_PROGRESS)
    + sdma_enable_channel(sdma, sdmac->channel);
    }

    #define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 34
    --
    1.7.7.3


    \
     
     \ /
      Last update: 2012-01-09 10:37    [W:0.021 / U:61.996 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site