* [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain
@ 2015-12-21 19:10 Mans Rullgard
2015-12-21 19:34 ` Andy Shevchenko
2015-12-22 5:38 ` Viresh Kumar
0 siblings, 2 replies; 5+ messages in thread
From: Mans Rullgard @ 2015-12-21 19:10 UTC (permalink / raw)
To: Viresh Kumar, Andy Shevchenko, Dan Williams, Vinod Koul,
dmaengine, linux-kernel
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.
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;
--
2.6.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain
2015-12-21 19:10 [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain Mans Rullgard
@ 2015-12-21 19:34 ` Andy Shevchenko
2015-12-22 16:54 ` Shevchenko, Andriy
2015-12-22 5:38 ` Viresh Kumar
1 sibling, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2015-12-21 19:34 UTC (permalink / raw)
To: Mans Rullgard, Viresh Kumar, Dan Williams, Vinod Koul, dmaengine,
linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain
2015-12-21 19:10 [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain Mans Rullgard
2015-12-21 19:34 ` Andy Shevchenko
@ 2015-12-22 5:38 ` Viresh Kumar
1 sibling, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2015-12-22 5:38 UTC (permalink / raw)
To: Mans Rullgard
Cc: Viresh Kumar, Andy Shevchenko, Dan Williams, Vinod Koul,
dmaengine, linux-kernel
On 21-12-15, 19:10, 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.
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> ---
> drivers/dma/dw/core.c | 2 ++
> 1 file changed, 2 insertions(+)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain
2015-12-21 19:34 ` Andy Shevchenko
@ 2015-12-22 16:54 ` Shevchenko, Andriy
2016-01-06 9:20 ` Vinod Koul
0 siblings, 1 reply; 5+ messages in thread
From: Shevchenko, Andriy @ 2015-12-22 16:54 UTC (permalink / raw)
To: mans@mansr.com, vireshk@kernel.org, linux-kernel@vger.kernel.org,
Williams, Dan J, Koul, Vinod, dmaengine@vger.kernel.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2405 bytes --]
On Mon, 2015-12-21 at 21:34 +0200, Andy Shevchenko wrote:
> 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>
Vinod, I would like to postpone this patch for a while to make a bit
easier back porting of other dw_dmac changes wrt fix SATA on 460EX (*).
I will send it later in a bunch. Hope MÃ¥ns has no objections on this.
(*) Now I'm pretty sure that the main issues with SATA are a) wrong
master settings for transfers and LLP, and b) endiannes issue with
values in LLP. That's why I hope to have those patches coming first
with a proper Fixes: tag.
>
> >
> > 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@intel.com>
Intel Finland Oy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain
2015-12-22 16:54 ` Shevchenko, Andriy
@ 2016-01-06 9:20 ` Vinod Koul
0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2016-01-06 9:20 UTC (permalink / raw)
To: Shevchenko, Andriy
Cc: mans@mansr.com, vireshk@kernel.org, linux-kernel@vger.kernel.org,
Williams, Dan J, dmaengine@vger.kernel.org
On Tue, Dec 22, 2015 at 10:24:49PM +0530, Shevchenko, Andriy wrote:
> On Mon, 2015-12-21 at 21:34 +0200, Andy Shevchenko wrote:
> > 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>
>
> Vinod, I would like to postpone this patch for a while to make a bit
> easier back porting of other dw_dmac changes wrt fix SATA on 460EX (*).
>
> I will send it later in a bunch. Hope Måns has no objections on this.
Okay by me as long as Måns is okay
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-06 9:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-21 19:10 [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain Mans Rullgard
2015-12-21 19:34 ` Andy Shevchenko
2015-12-22 16:54 ` Shevchenko, Andriy
2016-01-06 9:20 ` Vinod Koul
2015-12-22 5:38 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).