Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1296172

Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain

From Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain
Date 2015-12-21 20:40 +0100
Message-ID <qIetk-2e0-7@gated-at.bofh.it> (permalink)
References <qIe9X-25k-9@gated-at.bofh.it>
Organization Intel Finland Oy

Show all headers | View raw


On Mon, 2015-12-21 at 19:10 +0000, Mans Rullgard wrote:
> The datasheet requires that the LLP_[SD]_EN bits be cleared whenever
> LLP.LOC is zero, i.e. in the last descriptor of a multi-block chain.
> Make the driver do this.

Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> ---
>  drivers/dma/dw/core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
> index 7067b6ddc1db..ca7cafc82f6b 100644
> --- a/drivers/dma/dw/core.c
> +++ b/drivers/dma/dw/core.c
> @@ -751,6 +751,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan,
> dma_addr_t dest, dma_addr_t src,
>  		prev->lli.ctllo |= DWC_CTLL_INT_EN;
>  
>  	prev->lli.llp = 0;
> +	prev->lli.ctllo &= ~(DWC_CTLL_LLP_D_EN | DWC_CTLL_LLP_S_EN);
>  	first->txd.flags = flags;
>  	first->total_len = len;
>  
> @@ -912,6 +913,7 @@ slave_sg_fromdev_fill_desc:
>  		prev->lli.ctllo |= DWC_CTLL_INT_EN;
>  
>  	prev->lli.llp = 0;
> +	prev->lli.ctllo &= ~(DWC_CTLL_LLP_D_EN | DWC_CTLL_LLP_S_EN);
>  	first->total_len = total_len;
>  
>  	return &first->txd;

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain Mans Rullgard <mans@mansr.com> - 2015-12-21 20:20 +0100
  Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last  descriptor of a chain Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-21 20:40 +0100
    Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last  descriptor of a chain "Shevchenko, Andriy" <andriy.shevchenko@intel.com> - 2015-12-22 18:00 +0100
  Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor  of a chain Viresh Kumar <viresh.kumar@linaro.org> - 2015-12-22 06:40 +0100

csiph-web