Skip to contentSkip to conversation

OMAP2/3: DMA: FIFO drain errata fixes

PATCH Superseded Peter Ujfalusi 4 participants 15 messages Oct 4, 2010

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover OMAP2/3: DMA: FIFO drain errata fixes

Hello,

Changes since v3:
- use flags for errata handling
- OMAP2 buffering disable converted to use flags
- OMAP3 i541 is using the dma_errata flag
- Spelling fix in OMAP3 drain timeout message
Changes since v2:
- remove multiple assignment
Changes since v1:
- Errata ID added to the comment (i541)

Intro mail from v1:

The following series fixes the sDMA FIFO drain issue present for OMAP2 and OMAP3, and covered by an errata.
For OMAP2 the omap_start_dma had a comment about this errata, but the workaround configured wrong bit (CCR_EN instead of the correct BUFFERING_DISABLE bit). The first patch from Jarkko Nikula <[email protected]> fixes this. For OMAP3 the suggestion is to set sDMA to NoStandby before disabling the channel, and wait for the drain to finish, than configure sDMA to SmartStandby again. The second patch implements this workaround for OMAP3.

The FIFO drain problem can be reproduced on both OMAP2 and OMAP3 while using audio (capture case):
Either introduce load to the CPU:
nice -19 arecord -D hw:0 -M -B 10000 -F 5000 -f dat > /dev/null & \
dd if=/dev/urandom of=/dev/null

or suspending the arecord, and resuming it:
arecord -D hw:0 -M -B 10000 -F 5000 -f dat > /dev/null CTRL+Z; fg; CTRL+Z; fg; ...

On OMAP2 we can not recover from this problem. The board has to be rebooted, while OMAP3 can be recovered by reseting the sDMA channel, or introducing unrelated sDMA activity (which takes sDMA out from Standby - but this is not working all the time).

---
Peter Ujfalusi (3):
OMAP: DMA: Introduce errata handling variable, and macro
OMAP2: DMA: Use errata flag for disabling buffering
OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish

ext Jarkko Nikula (1):
omap: dma: Fix buffering disable bit setting for omap24xx

 arch/arm/plat-omap/dma.c              |   60 ++++++++++++++++++++++++++++++--
 arch/arm/plat-omap/include/plat/dma.h |    4 ++
 2 files changed, 60 insertions(+), 4 deletions(-)

--
1.7.3

#1 lore raw

PATCH v4 1/4 omap: dma: Fix buffering disable bit setting for omap24xx

From: ext Jarkko Nikula <[email protected]>

An errata workaround for omap24xx is not setting the buffering disable bit 25 what is the purpose but channel enable bit 7 instead.

Background for this fix is the DMA stalling issue with ASoC omap-mcbsp driver. Peter Ujfalusi <[email protected]> has found an issue in recording that the DMA stall could happen if there were a buffer overrun detected by ALSA and the DMA was stopped and restarted due that. This problem is known to occur on both OMAP2420 and OMAP3. It can recover on OMAP3 after dma free, dma request and reconfiguration cycle. However, on OMAP2420 it seems that only way to recover is a reset.

Problem was not visible before the commit c12abc0. That commit changed that the McBSP transmitter/receiver is released from reset only when needed. That is, only enabled McBSP transmitter without transmission was able to prevent this DMA stall problem in receiving side and underlying problem did not show up until now. McBSP transmitter itself seems to no be reason since DMA stall does not recover by enabling the transmission after stall.

Debugging showed that there were a DMA write active during DMA stop time and it never completed even when restarting the DMA. Experimenting showed that the DMA buffering disable bit could be used to avoid stalling when using source synchronized transfers. However that could have performance hit and OMAP3 TRM states that buffering disable is not allowed for destination synchronized transfers so subsequent patch will implement a method to complete DMA writes when stopping.

This patch is based on assumtion that complete lock-up on OMAP2420 is different but related problem. I don't have access to OMAP2420 errata but I believe this old workaround here is put for a reason but unfortunately a wrong bit was typed and problem showed up only now.

v2: Issue is applicaple only to OMAP2420 and ES1.0 of OMAP2430. Thanks to G, Manjunath Kondaiah <[email protected]> for noticing.

---
 arch/arm/plat-omap/dma.c              |    5 +++--
 arch/arm/plat-omap/include/plat/dma.h |    1 +
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dma.c +3 -2
index ec7eddf..6914ccf 100644
@@ -999,8 +999,9 @@ void omap_start_dma(int lch)
 	 * Errata: On ES2.0 BUFFERING disable must be set.
 	 * This will always fail on ES1.0
 	 */
-	if (cpu_is_omap24xx())
-		l |= OMAP_DMA_CCR_EN;
+	if (cpu_is_omap2420() ||
+	    (cpu_is_omap2430() && (omap_type() == OMAP2430_REV_ES1_0)))
+		l |= OMAP_DMA_CCR_BUFFERING_DISABLE;
 
 	l |= OMAP_DMA_CCR_EN;
 	dma_write(l, CCR(lch));
arch/arm/plat-omap/include/plat/dma.h +1 -0
index af3a039..776ba44 100644
@@ -335,6 +335,7 @@
 #define OMAP2_DMA_MISALIGNED_ERR_IRQ	(1 << 11)
 
 #define OMAP_DMA_CCR_EN			(1 << 7)
+#define OMAP_DMA_CCR_BUFFERING_DISABLE	(1 << 25)
 
 #define OMAP_DMA_DATA_TYPE_S8		0x00
 #define OMAP_DMA_DATA_TYPE_S16		0x01
Signature · 1 line
1.7.3
#2 lore raw

PATCH v4 1/4 omap: dma: Fix buffering disable bit setting for omap24xx

Quoted 17 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Peter Ujfalusi
Sent: Monday, October 04, 2010 1:48 PM
To: Tony Lindgren
Cc: linux-omap at vger.kernel.org; Jarkko Nikula; linux-arm-kernel at lists.infradead.org
Subject: [PATCH v4 1/4] omap: dma: Fix buffering disable bit setting for omap24xx

From: ext Jarkko Nikula <[email protected]>

An errata workaround for omap24xx is not setting the buffering disable bit
25 what is the purpose but channel enable bit 7 instead.

...

arch/arm/plat-omap/dma.c void omap_start_dma(int lch) · line 1001

Quoted 8 lines
(quoted diff) +0 -0

b/arch/arm/plat-omap/dma.c index ec7eddf..6914ccf 100644

arch/arm/plat-omap/dma.c +0 -0
@@ -999,8 +999,9 @@ void omap_start_dma(int lch)
 	 * Errata: On ES2.0 BUFFERING disable must be set.
 	 * This will always fail on ES1.0
 	 */

Sorry, I didn't catch this with earlier patch.

Looks like wrong comment. only on 2430ES1.0 and for all omap2420, buffer disable should be set.
I feel below description will be useful to the reader:
"Errata: Inter Frame DMA buffering issue(All OMAP2420 and OMAP2430ES1.0):
DMA will wrongly buffer elements if packing and bursting is enabled. This might result in data gets stalled in FIFO at the end of the block.
Workaround: DMA channels must have BUFFERING_DISABLED bit set to guarantee no data will stay in the DMA FIFO in case inter frame buffering occurs.

-Manjunath

#3 lore raw

PATCH v4 1/4 omap: dma: Fix buffering disable bit setting for omap24xx

Quoted 31 lines · Manjunath Kondaiah
Quoted 17 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Ujfalusi
Sent: Monday, October 04, 2010 1:48 PM
To: Tony Lindgren
Cc: [email protected]; Jarkko Nikula; [email protected]
Subject: [PATCH v4 1/4] omap: dma: Fix buffering disable bit setting for omap24xx

From: ext Jarkko Nikula <[email protected]>

An errata workaround for omap24xx is not setting the buffering disable bit
25 what is the purpose but channel enable bit 7 instead.

...

arch/arm/plat-omap/dma.c void omap_start_dma(int lch) · line 1001

Quoted 8 lines
(quoted diff) +0 -0

b/arch/arm/plat-omap/dma.c index ec7eddf..6914ccf 100644

arch/arm/plat-omap/dma.c +0 -0
@@ -999,8 +999,9 @@ void omap_start_dma(int lch)
 	 * Errata: On ES2.0 BUFFERING disable must be set.
 	 * This will always fail on ES1.0
 	 */

Sorry, I didn't catch this with earlier patch.

Quoted 9 lines

Looks like wrong comment. only on 2430ES1.0 and for all omap2420, buffer disable should be set.
I feel below description will be useful to the reader:
"Errata: Inter Frame DMA buffering issue(All OMAP2420 and OMAP2430ES1.0):
DMA will wrongly buffer elements if packing and bursting is enabled. This might result in data gets stalled in FIFO at the end of the block.
Workaround: DMA channels must have BUFFERING_DISABLED bit set to guarantee no data will stay in the DMA FIFO in case inter frame buffering occurs.

Ok, no problem. I'll add this to the next version. This is good to get documented.

Signature · 1 line
Jarkko
#4 lore raw

PATCH v4 2/4 OMAP: DMA: Introduce errata handling variable, and macro

In reply to Peter Ujfalusi

Use flags for errata handling.

---
 arch/arm/plat-omap/dma.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
arch/arm/plat-omap/dma.c +10 -0
index 6914ccf..ae0ff64 100644
@@ -146,6 +146,10 @@ static const u8 omap1_dma_irq[OMAP1_LOGICAL_DMA_CH_COUNT] = {
 	INT_1610_DMA_CH14, INT_1610_DMA_CH15, INT_DMA_LCD
 };
 
+/* Errata handling */
+static u16 dma_errata;
+#define IS_DMA_ERRATA(id)	(dma_errata & (id))
+
 static inline void disable_lnk(int lch);
 static void omap_disable_channel_irq(int lch);
 static inline void omap_enable_channel_irq(int lch);
@@ -2042,6 +2046,10 @@ void omap_dma_global_context_restore(void)
 
 /*----------------------------------------------------------------------------*/
 
+static void dma_errata_configure(void)
+{
+}
+
 static int __init omap_init_dma(void)
 {
 	unsigned long base;
@@ -2064,6 +2072,8 @@ static int __init omap_init_dma(void)
 		return -ENODEV;
 	}
 
+	dma_errata_configure();
+
 	omap_dma_base = ioremap(base, SZ_4K);
 	BUG_ON(!omap_dma_base);
 
Signature · 1 line
1.7.3
#5 lore raw

PATCH v4 3/4 OMAP2: DMA: Use errata flag for disabling buffering

In reply to Peter Ujfalusi

Convert the errata handling of buffering disable on OMAP2 platforms.

---
 arch/arm/plat-omap/dma.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dma.c +5 -2
index ae0ff64..c116c41 100644
@@ -147,6 +147,7 @@ static const u8 omap1_dma_irq[OMAP1_LOGICAL_DMA_CH_COUNT] = {
 };
 
 /* Errata handling */
+#define DMA_ERRATA_IFRAME_BUFFERING	(1 << 0)
 static u16 dma_errata;
 #define IS_DMA_ERRATA(id)	(dma_errata & (id))
 
@@ -1003,8 +1004,7 @@ void omap_start_dma(int lch)
 	 * Errata: On ES2.0 BUFFERING disable must be set.
 	 * This will always fail on ES1.0
 	 */
-	if (cpu_is_omap2420() ||
-	    (cpu_is_omap2430() && (omap_type() == OMAP2430_REV_ES1_0)))
+	if (IS_DMA_ERRATA(DMA_ERRATA_IFRAME_BUFFERING))
 		l |= OMAP_DMA_CCR_BUFFERING_DISABLE;
 
 	l |= OMAP_DMA_CCR_EN;
@@ -2048,6 +2048,9 @@ void omap_dma_global_context_restore(void)
 
 static void dma_errata_configure(void)
 {
+	if (cpu_is_omap2420() ||
+	    (cpu_is_omap2430() && (omap_type() == OMAP2430_REV_ES1_0)))
+		dma_errata |= DMA_ERRATA_IFRAME_BUFFERING;
 }
 
 static int __init omap_init_dma(void)
Signature · 1 line
1.7.3
#6 lore raw

PATCH v4 3/4 OMAP2: DMA: Use errata flag for disabling buffering

Quoted 11 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Peter Ujfalusi
Sent: Monday, October 04, 2010 1:48 PM
To: Tony Lindgren
Cc: linux-omap at vger.kernel.org; Jarkko Nikula; linux-arm-kernel at lists.infradead.org
Subject: [PATCH v4 3/4] OMAP2: DMA: Use errata flag for disabling buffering

...

Quoted 6 lines

/* Errata handling */
+#define DMA_ERRATA_IFRAME_BUFFERING (1 << 0)
static u16 dma_errata;
#define IS_DMA_ERRATA(id) (dma_errata & (id))

These macros should move to header file since these macros will be used in mach-omap2/dma.c and plat-omap/dma.c with upcoming dma hwmod series.

-Manjunath

#7 lore raw

PATCH v4 4/4 OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish

In reply to Peter Ujfalusi

Implement the suggested workaround for OMAP3 regarding to sDMA draining issue, when the channel is disabled on the fly.
This errata affects the following configuration:
sDMA transfer is source synchronized
Buffering is enabled
SmartStandby is selected.

The issue can be easily reproduced by creating overrun situation while recording audio.
Either introduce load to the CPU:
nice -19 arecord -D hw:0 -M -B 10000 -F 5000 -f dat > /dev/null & \
dd if=/dev/urandom of=/dev/null

or suspending the arecord, and resuming it:
arecord -D hw:0 -M -B 10000 -F 5000 -f dat > /dev/null CTRL+Z; fg; CTRL+Z; fg; ...

In case of overrun audio stops DMA, and restarts it (without reseting the sDMA channel). When we hit this errata in stop case (sDMA drain did not complete), at the coming start the sDMA will not going to be operational (it is still draining).
This leads to DMA stall condition.
On OMAP3 we can recover with sDMA channel reset, it has been observed that by introducing unrelated sDMA activity might also help (reading from MMC for example).

The same errata exists for OMAP2, where the suggestion is to disable the buffering to avoid this type of error.
On OMAP3 the suggestion is to set sDMA to NoStandby before disabling the channel, and wait for the drain to finish, than configure sDMA to SmartStandby again.

---
 arch/arm/plat-omap/dma.c              |   42 +++++++++++++++++++++++++++++++-
 arch/arm/plat-omap/include/plat/dma.h |    3 ++
 2 files changed, 43 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dma.c +40 -2
index c116c41..a102cf5 100644
@@ -30,6 +30,7 @@
 #include <linux/irq.h>
 #include <linux/io.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
@@ -148,6 +149,8 @@ static const u8 omap1_dma_irq[OMAP1_LOGICAL_DMA_CH_COUNT] = {
 
 /* Errata handling */
 #define DMA_ERRATA_IFRAME_BUFFERING	(1 << 0)
+/* OMAP3 Errata i541: sDMA FIFO draining does not finish */
+#define DMA_ERRATA_i541			(1 << 1)
 static u16 dma_errata;
 #define IS_DMA_ERRATA(id)	(dma_errata & (id))
 
@@ -1023,8 +1026,40 @@ void omap_stop_dma(int lch)
 		dma_write(0, CICR(lch));
 
 	l = dma_read(CCR(lch));
-	l &= ~OMAP_DMA_CCR_EN;
-	dma_write(l, CCR(lch));
+	/* OMAP3 Errata i541: sDMA FIFO draining does not finish */
+	if (IS_DMA_ERRATA(DMA_ERRATA_i541) &&
+	    (l & OMAP_DMA_CCR_SEL_SRC_DST_SYNC)) {
+		int i = 0;
+		u32 sys_cf;
+
+		/* Configure No-Standby */
+		l = dma_read(OCP_SYSCONFIG);
+		sys_cf = l;
+		l &= ~DMA_SYSCONFIG_MIDLEMODE_MASK;
+		l |= DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_NO_IDLE);
+		dma_write(l , OCP_SYSCONFIG);
+
+		l = dma_read(CCR(lch));
+		l &= ~OMAP_DMA_CCR_EN;
+		dma_write(l, CCR(lch));
+
+		/* Wait for sDMA FIFO drain */
+		l = dma_read(CCR(lch));
+		while (i < 100 && (l & (OMAP_DMA_CCR_RD_ACTIVE |
+					OMAP_DMA_CCR_WR_ACTIVE))) {
+			udelay(5);
+			i++;
+			l = dma_read(CCR(lch));
+		}
+		if (i >= 100)
+			printk(KERN_ERR "DMA drain did not complete on "
+					"lch %d\n", lch);
+		/* Restore OCP_SYSCONFIG */
+		dma_write(sys_cf, OCP_SYSCONFIG);
+	} else {
+		l &= ~OMAP_DMA_CCR_EN;
+		dma_write(l, CCR(lch));
+	}
 
 	if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
 		int next_lch, cur_lch = lch;
@@ -2051,6 +2086,9 @@ static void dma_errata_configure(void)
 	if (cpu_is_omap2420() ||
 	    (cpu_is_omap2430() && (omap_type() == OMAP2430_REV_ES1_0)))
 		dma_errata |= DMA_ERRATA_IFRAME_BUFFERING;
+
+	if (cpu_is_omap34xx())
+		dma_errata |= DMA_ERRATA_i541;
 }
 
 static int __init omap_init_dma(void)
arch/arm/plat-omap/include/plat/dma.h +3 -0
index 776ba44..cf66f85 100644
@@ -335,6 +335,9 @@
 #define OMAP2_DMA_MISALIGNED_ERR_IRQ	(1 << 11)
 
 #define OMAP_DMA_CCR_EN			(1 << 7)
+#define OMAP_DMA_CCR_RD_ACTIVE		(1 << 9)
+#define OMAP_DMA_CCR_WR_ACTIVE		(1 << 10)
+#define OMAP_DMA_CCR_SEL_SRC_DST_SYNC	(1 << 24)
 #define OMAP_DMA_CCR_BUFFERING_DISABLE	(1 << 25)
 
 #define OMAP_DMA_DATA_TYPE_S8		0x00
Signature · 1 line
1.7.3
#8 lore raw

PATCH v4 4/4 OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish

Quoted 12 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Peter Ujfalusi
Sent: Monday, October 04, 2010 1:48 PM
To: Tony Lindgren
Cc: linux-omap at vger.kernel.org; Jarkko Nikula; linux-arm-kernel at lists.infradead.org
Subject: [PATCH v4 4/4] OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish

...

Review

Quoted 1 line
(quoted diff) +1 -0
+	/* OMAP3 Errata i541: sDMA FIFO draining does not finish */

This logic is required for multiple erratas. Can we have seperate function for handling this logic. More details at:
https://patchwork.kernel.org/patch/126271/

...

arch/arm/plat-omap/include/plat/dma.h line 341

Quoted 10 lines
arch/arm/plat-omap/include/plat/dma.h +3 -0
@@ -335,6 +335,9 @@
 #define OMAP2_DMA_MISALIGNED_ERR_IRQ	(1 << 11)
 
 #define OMAP_DMA_CCR_EN			(1 << 7)
+#define OMAP_DMA_CCR_RD_ACTIVE		(1 << 9)
+#define OMAP_DMA_CCR_WR_ACTIVE		(1 << 10)
+#define OMAP_DMA_CCR_SEL_SRC_DST_SYNC	(1 << 24)
 #define OMAP_DMA_CCR_BUFFERING_DISABLE	(1 << 25)

As I mentioned in other mail, if you are introducing this feature, it is better to convert existing erratas also to use this feature.

-Manjunath

#9 lore raw

PATCH v4 4/4 OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish

Quoted 6 lines · Manjunath Kondaiah

...

Review

Quoted 1 line
(quoted diff) +1 -0
+	/* OMAP3 Errata i541: sDMA FIFO draining does not finish */

This logic is required for multiple erratas.

As Tony requested, I have added a variable for flags to handle the different erratas. I even added a macro to check that the errata applies, so one can use:
if (IS_DMA_ERRATA(DMA_ERRATA_XXXXX))

Quoted 3 lines

Can we have seperate
function for handling this logic. More details at:
https://patchwork.kernel.org/patch/126271/

I see. That patch is for hwmod converted dma code, right?
We need this fix without the hwmod to applied, and than backport it to earlier kernel releases.

Quoted 2 lines

As I mentioned in other mail, if you are introducing this feature, it is better to convert existing erratas also to use this feature.

The upcoming hwmod conversion will take care of the cleanup.
We _need_ these two small fixes ASAP, since it is fixing serious problem in audio (and the same issue might bite other areas as well).
It is not the intention of this series to clean up the arc/arm/plat-omap/dma.c.

I have added the dma_errata variable, since Tony asked for it, but even that addition is a bigger change than what I was planning to do here.

Signature · 1 line
P?ter
#10 lore raw

PATCH v4 4/4 OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish

Quoted 32 lines

-----Original Message-----
From: Peter Ujfalusi [mailto:peter.ujfalusi at nokia.com]
Sent: Monday, October 04, 2010 4:13 PM
To: G, Manjunath Kondaiah
Cc: Tony Lindgren; linux-omap at vger.kernel.org; Jarkko Nikula; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH v4 4/4] OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish

Quoted 6 lines · Manjunath Kondaiah

...

Review

Quoted 1 line
(quoted diff) +1 -0
+	/* OMAP3 Errata i541: sDMA FIFO draining does not finish */

This logic is required for multiple erratas.

As Tony requested, I have added a variable for flags to handle the different erratas. I even added a macro to check that the errata applies, so one can use:
if (IS_DMA_ERRATA(DMA_ERRATA_XXXXX))

Quoted 3 lines

Can we have seperate
function for handling this logic. More details at:
https://patchwork.kernel.org/patch/126271/

I see. That patch is for hwmod converted dma code, right? We need this fix without the hwmod to applied, and than backport it to earlier kernel releases.

Quoted 5 lines
Quoted 1 line

As I mentioned in other mail, if you are introducing this

feature, it

Quoted 1 line

is better to convert existing erratas also to use this feature.

The upcoming hwmod conversion will take care of the cleanup.

If this is the case, not sure about intention of having dma_errata only for these two erratas since all the erratas are not handled.

All the erratas will get cleaned up and errata handling feature will be introduced along with dma hwmod changes.

If feel v3 version is better so that I can use these changes along dma hwmod.

It is upto Tony to decide.

Quoted 5 lines

We _need_ these two small fixes ASAP, since it is fixing serious problem in audio (and the same issue might bite other areas as well).
It is not the intention of this series to clean up the arc/arm/plat-omap/dma.c.

Tony,
How about having v3 series + review comments fixed(except comments related errata handling). Errata handling will be done as part dma hwmod. I am waiting for these patches so that I can rebase these patches in DMA hwmod.

-Manjunath

#11 lore raw

PATCH v4 4/4 OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish

In reply to Peter Ujfalusi
Quoted 23 lines · Peter Ujfalusi
Quoted 6 lines · Manjunath Kondaiah

...

Review

Quoted 1 line
(quoted diff) +1 -0
+	/* OMAP3 Errata i541: sDMA FIFO draining does not finish */

This logic is required for multiple erratas.

As Tony requested, I have added a variable for flags to handle the different erratas. I even added a macro to check that the errata applies, so one can use:
if (IS_DMA_ERRATA(DMA_ERRATA_XXXXX))

Quoted 3 lines

Can we have seperate
function for handling this logic. More details at:
https://patchwork.kernel.org/patch/126271/

I see. That patch is for hwmod converted dma code, right?
We need this fix without the hwmod to applied, and than backport it to earlier kernel releases.

Quoted 2 lines

As I mentioned in other mail, if you are introducing this feature, it is better to convert existing erratas also to use this feature.

Quoted 7 lines

The upcoming hwmod conversion will take care of the cleanup.
We _need_ these two small fixes ASAP, since it is fixing serious problem in audio (and the same issue might bite other areas as well).
It is not the intention of this series to clean up the arc/arm/plat-omap/dma.c.

I have added the dma_errata variable, since Tony asked for it, but even that addition is a bigger change than what I was planning to do here.

Yeah.. Let's just use your original patch for the fix, then queue adding the errata flag for the upcoming merge window.

Regards,

Tony

#12 lore raw

v4 cover OMAP2/3: DMA: FIFO drain errata fixes

In reply to Peter Ujfalusi

Hello,

Will resend, since

On Monday 04 October 2010 11:18:10 ext Peter Ujfalusi wrote:

...

Quoted 2 lines

ext Jarkko Nikula (1):
omap: dma: Fix buffering disable bit setting for omap24xx

Our mail server changed Jarkko's name.
Sorry.

Signature · 1 line
P?ter
#13 lore raw

v4 cover OMAP2/3: DMA: FIFO drain errata fixes

Quoted 3 lines · On Monday 04 October 2010 11:29:16 ext Peter Ujfalusi wrote:

Hello,

Will resend, since

I'll wait for comments on v4 series, and I'll send the v5 later today after the comments to reduce the noise.

Signature · 1 line
P?ter
#14 lore raw

v4 cover OMAP2/3: DMA: FIFO drain errata fixes

Quoted 7 lines · Peter Ujfalusi
Quoted 3 lines · On Monday 04 October 2010 11:29:16 ext Peter Ujfalusi wrote:

Hello,

Will resend, since

I'll wait for comments on v4 series, and I'll send the v5 later today after the comments to reduce the noise.

Looks like we should have the minimal two patches to queue as fixes for v2.6.36, then queue the errata flag changes for the upcoming merge window.

Regards,

Tony