* [PATCH] dw_dmac: fix a regression in dwc_prep_dma_memcpy
@ 2012-10-01 10:06 Andy Shevchenko
2012-10-02 7:48 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2012-10-01 10:06 UTC (permalink / raw)
To: viresh.kumar, Vinod Koul, spear-devel, linux-kernel; +Cc: Andy Shevchenko
Sometimes memory-to-memory test is failed, that's why we need to choose minimum
data portion between source and destination limits together.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/dma/dw_dmac.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 9ca9ca4..c4b0eb3 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -716,6 +716,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
size_t offset;
unsigned int src_width;
unsigned int dst_width;
+ unsigned int data_width;
u32 ctllo;
dev_vdbg(chan2dev(chan),
@@ -728,11 +729,11 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
return NULL;
}
- src_width = min_t(unsigned int, dwc->dw->data_width[dwc_get_sms(dws)],
- dwc_fast_fls(src | len));
+ data_width = min_t(unsigned int, dwc->dw->data_width[dwc_get_sms(dws)],
+ dwc->dw->data_width[dwc_get_dms(dws)]);
- dst_width = min_t(unsigned int, dwc->dw->data_width[dwc_get_dms(dws)],
- dwc_fast_fls(dest | len));
+ src_width = dst_width = min_t(unsigned int, data_width,
+ dwc_fast_fls(src | dest | len));
ctllo = DWC_DEFAULT_CTLLO(chan)
| DWC_CTLL_DST_WIDTH(dst_width)
--
1.7.10.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dw_dmac: fix a regression in dwc_prep_dma_memcpy
2012-10-01 10:06 [PATCH] dw_dmac: fix a regression in dwc_prep_dma_memcpy Andy Shevchenko
@ 2012-10-02 7:48 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2012-10-02 7:48 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: viresh.kumar, spear-devel, linux-kernel
On Mon, 2012-10-01 at 13:06 +0300, Andy Shevchenko wrote:
> Sometimes memory-to-memory test is failed, that's why we need to choose minimum
> data portion between source and destination limits together.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied, thanks for taking care of this
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-02 7:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-01 10:06 [PATCH] dw_dmac: fix a regression in dwc_prep_dma_memcpy Andy Shevchenko
2012-10-02 7:48 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®