* [PATCH RESEND v3 1/2] dmaengine: sun6i: Fix the access of the IRQ register
2016-04-22 6:22 [PATCH RESEND v3 0/2] dmaengine: sun6i: Fixes Jean-Francois Moine
@ 2016-04-22 6:14 ` Jean-Francois Moine
2016-04-22 6:17 ` [PATCH RESEND v3 2/2] dmaengine: sun6i: Fix impossible settings of burst and bus width Jean-Francois Moine
2016-04-26 3:39 ` [PATCH RESEND v3 0/2] dmaengine: sun6i: Fixes Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Jean-Francois Moine @ 2016-04-22 6:14 UTC (permalink / raw)
To: linux-arm-kernel
The IRQ register number is computed, but this number was not used
and the register was the one indexed by the channel index instead.
Then, only the first DMA channel was working.
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
---
drivers/dma/sun6i-dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
index 2db12e4..2ec320d 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -381,9 +381,9 @@ static int sun6i_dma_start_desc(struct sun6i_vchan *vchan)
irq_reg = pchan->idx / DMA_IRQ_CHAN_NR;
irq_offset = pchan->idx % DMA_IRQ_CHAN_NR;
- irq_val = readl(sdev->base + DMA_IRQ_EN(irq_offset));
+ irq_val = readl(sdev->base + DMA_IRQ_EN(irq_reg));
irq_val |= DMA_IRQ_QUEUE << (irq_offset * DMA_IRQ_CHAN_WIDTH);
- writel(irq_val, sdev->base + DMA_IRQ_EN(irq_offset));
+ writel(irq_val, sdev->base + DMA_IRQ_EN(irq_reg));
writel(pchan->desc->p_lli, pchan->base + DMA_CHAN_LLI_ADDR);
writel(DMA_CHAN_ENABLE_START, pchan->base + DMA_CHAN_ENABLE);
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RESEND v3 2/2] dmaengine: sun6i: Fix impossible settings of burst and bus width
2016-04-22 6:22 [PATCH RESEND v3 0/2] dmaengine: sun6i: Fixes Jean-Francois Moine
2016-04-22 6:14 ` [PATCH RESEND v3 1/2] dmaengine: sun6i: Fix the access of the IRQ register Jean-Francois Moine
@ 2016-04-22 6:17 ` Jean-Francois Moine
2016-04-26 3:39 ` [PATCH RESEND v3 0/2] dmaengine: sun6i: Fixes Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Jean-Francois Moine @ 2016-04-22 6:17 UTC (permalink / raw)
To: linux-arm-kernel
In the commit 1f9cd915b64bb95f ("dmaengine: sun6i: Fix memcpy operation"),
the signed values returned by convert_burst() and convert_buswidth()
were stored in an unsigned value.
Then, these values were considered as errors when non null.
As a result, DMA transfers were rejected when the burst or buswidth
had values different from 1, as 8 for the burst or 4 for the bus width.
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
---
drivers/dma/sun6i-dma.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
index 2ec320d..3579ee7 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -281,25 +281,25 @@ static inline int sun6i_dma_cfg_lli(struct sun6i_dma_lli *lli,
dma_addr_t dst, u32 len,
struct dma_slave_config *config)
{
- u8 src_width, dst_width, src_burst, dst_burst;
+ s8 src_width, dst_width, src_burst, dst_burst;
if (!config)
return -EINVAL;
src_burst = convert_burst(config->src_maxburst);
- if (src_burst)
+ if (src_burst < 0)
return src_burst;
dst_burst = convert_burst(config->dst_maxburst);
- if (dst_burst)
+ if (dst_burst < 0)
return dst_burst;
src_width = convert_buswidth(config->src_addr_width);
- if (src_width)
+ if (src_width < 0)
return src_width;
dst_width = convert_buswidth(config->dst_addr_width);
- if (dst_width)
+ if (dst_width < 0)
return dst_width;
lli->cfg = DMA_CHAN_CFG_SRC_BURST(src_burst) |
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RESEND v3 0/2] dmaengine: sun6i: Fixes
@ 2016-04-22 6:22 Jean-Francois Moine
2016-04-22 6:14 ` [PATCH RESEND v3 1/2] dmaengine: sun6i: Fix the access of the IRQ register Jean-Francois Moine
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jean-Francois Moine @ 2016-04-22 6:22 UTC (permalink / raw)
To: linux-arm-kernel
This patch series replaces part of the previous series
'dmaengine: sun6i: Fixes and upgrade for audio transfers'.
It contains only fixes for a normal use of the DMA driver.
Changes since v2
- Acked-by Maxime Ripard added
- remove the audio requirements
Changes since v1 (comments from Vinod Koul and Sergei Shtylyov - thanks)
- typo fixes
- change some comments
- better handling of burst and bus width
- remove useless code in the cyclic capability patch
Jean-Francois Moine (2):
dmaengine: sun6i: Fix the access of the IRQ register
dmaengine: sun6i: Fix impossible settings of burst and bus width
drivers/dma/sun6i-dma.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--
2.8.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH RESEND v3 0/2] dmaengine: sun6i: Fixes
2016-04-22 6:22 [PATCH RESEND v3 0/2] dmaengine: sun6i: Fixes Jean-Francois Moine
2016-04-22 6:14 ` [PATCH RESEND v3 1/2] dmaengine: sun6i: Fix the access of the IRQ register Jean-Francois Moine
2016-04-22 6:17 ` [PATCH RESEND v3 2/2] dmaengine: sun6i: Fix impossible settings of burst and bus width Jean-Francois Moine
@ 2016-04-26 3:39 ` Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2016-04-26 3:39 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Apr 22, 2016 at 08:22:56AM +0200, Jean-Francois Moine wrote:
> This patch series replaces part of the previous series
> 'dmaengine: sun6i: Fixes and upgrade for audio transfers'.
> It contains only fixes for a normal use of the DMA driver.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-26 3:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-22 6:22 [PATCH RESEND v3 0/2] dmaengine: sun6i: Fixes Jean-Francois Moine
2016-04-22 6:14 ` [PATCH RESEND v3 1/2] dmaengine: sun6i: Fix the access of the IRQ register Jean-Francois Moine
2016-04-22 6:17 ` [PATCH RESEND v3 2/2] dmaengine: sun6i: Fix impossible settings of burst and bus width Jean-Francois Moine
2016-04-26 3:39 ` [PATCH RESEND v3 0/2] dmaengine: sun6i: Fixes Vinod Koul
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).