lkml.org 
[lkml]   [2012]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 08/13] dmaengine: imx-dma: remove 'in_use' field of 'internal' structure.
    Date
    It makes no sense keeping an 'in_use' flag when the multiple descriptor
    mechanism already prevents a new DMA transfer to be issued when another
    one is in course.

    Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
    ---
    drivers/dma/imx-dma.c | 9 ---------
    1 files changed, 0 insertions(+), 9 deletions(-)

    diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
    index dba62bc..8499f15 100644
    --- a/drivers/dma/imx-dma.c
    +++ b/drivers/dma/imx-dma.c
    @@ -130,8 +130,6 @@ enum imxdma_prep_type {
    struct imxdma_channel_internal {
    unsigned int resbytes;

    - int in_use;
    -
    struct timer_list watchdog;

    int hw_chaining;
    @@ -264,9 +262,6 @@ static void imxdma_enable_hw(struct imxdma_desc *d)

    pr_debug("imxdma%d: imx_dma_enable\n", channel);

    - if (imxdmac->internal.in_use)
    - return;
    -
    local_irq_save(flags);

    imx_dmav1_writel(1 << channel, DMA_DISR);
    @@ -285,7 +280,6 @@ static void imxdma_enable_hw(struct imxdma_desc *d)
    DMA_CCR(channel));
    }
    }
    - imxdmac->internal.in_use = 1;

    local_irq_restore(flags);
    }
    @@ -305,7 +299,6 @@ static void imxdma_disable_hw(struct imxdma_channel *imxdmac)
    imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) & ~CCR_CEN,
    DMA_CCR(channel));
    imx_dmav1_writel(1 << channel, DMA_DISR);
    - imxdmac->internal.in_use = 0;
    local_irq_restore(flags);
    }

    @@ -315,7 +308,6 @@ static void imxdma_watchdog(unsigned long data)
    int channel = imxdmac->channel;

    imx_dmav1_writel(0, DMA_CCR(channel));
    - imxdmac->internal.in_use = 0;

    /* Tasklet watchdog error handler */
    tasklet_schedule(&imxdmac->dma_tasklet);
    @@ -434,7 +426,6 @@ static void dma_irq_handle_channel(struct imxdma_channel *imxdmac)

    out:
    imx_dmav1_writel(0, DMA_CCR(chno));
    - imxdma->in_use = 0;
    /* Tasklet irq */
    tasklet_schedule(&imxdmac->dma_tasklet);
    }
    --
    1.7.0.4


    \
     
     \ /
      Last update: 2012-03-09 16:23    [W:5.957 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site