Skip to contentSkip to conversation

ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking

PATCH Superseded Santosh Shilimkar 2 participants 9 messages Oct 14, 2009 – Oct 19, 2009

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking

OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when used in linking scenario. This patch fixes the same.

---
 arch/arm/plat-omap/dma.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
arch/arm/plat-omap/dma.c +5 -4
index fd3154a..633c123 100644
@@ -975,6 +975,11 @@ void omap_stop_dma(int lch)
 {
 	u32 l;
 
+	/* Disable the DMA channel */
+	l = dma_read(CCR(lch));
+	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;
 		char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
@@ -1000,10 +1005,6 @@ void omap_stop_dma(int lch)
 	if (cpu_class_is_omap1())
 		dma_write(0, CICR(lch));
 
-	l = dma_read(CCR(lch));
-	l &= ~OMAP_DMA_CCR_EN;
-	dma_write(l, CCR(lch));
-
 	dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
 }
 EXPORT_SYMBOL(omap_stop_dma);
Signature · 1 line
1.5.4.7
#1 lore raw

PATCH 1/1 ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 board

This patch enables omap_serial_early_init() function for OMAP4430 SDP. Without this the bootup would throw oops in omap_serial_init().

---
 arch/arm/mach-omap2/board-4430sdp.c |    4 ++--
 arch/arm/mach-omap2/io.c            |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/board-4430sdp.c +2 -2
index eb37c40..609a5a4 100644
@@ -58,6 +58,8 @@ static void __init gic_init_irq(void)
 
 static void __init omap_4430sdp_init_irq(void)
 {
+	omap_board_config = sdp4430_config;
+	omap_board_config_size = ARRAY_SIZE(sdp4430_config);
 	omap2_init_common_hw(NULL, NULL);
 #ifdef CONFIG_OMAP_32K_TIMER
 	omap2_gp_clockevent_set_gptimer(1);
@@ -70,8 +72,6 @@ static void __init omap_4430sdp_init_irq(void)
 static void __init omap_4430sdp_init(void)
 {
 	platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
-	omap_board_config = sdp4430_config;
-	omap_board_config_size = ARRAY_SIZE(sdp4430_config);
 	omap_serial_init();
 }
 
arch/arm/mach-omap2/io.c +2 -0
index e3a3bad..56be87d 100644
@@ -302,7 +302,9 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
 	pwrdm_init(powerdomains_omap);
 	clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps);
 	omap2_clk_init();
+#endif
 	omap_serial_early_init();
+#ifndef CONFIG_ARCH_OMAP4
 	omap_hwmod_late_init();
 	omap_pm_if_init();
 	omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
Signature · 1 line
1.5.4.7
#2 lore raw

PATCH 1/1 ARM: OMAP4: Fix UART4 platform data

This patch removes the unnecessary UART4 platform which is under data is wrong because of this

There is a separate platform structure for UART4

---
 arch/arm/mach-omap2/serial.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
arch/arm/mach-omap2/serial.c +0 -10
index ae21868..54dfeb5 100644
@@ -109,16 +109,6 @@ static struct plat_serial8250_port serial_platform_data2[] = {
 		.regshift	= 2,
 		.uartclk	= OMAP24XX_BASE_BAUD * 16,
 	}, {
-#ifdef CONFIG_ARCH_OMAP4
-		.membase	= OMAP2_IO_ADDRESS(OMAP_UART4_BASE),
-		.mapbase	= OMAP_UART4_BASE,
-		.irq		= 70,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.iotype		= UPIO_MEM,
-		.regshift	= 2,
-		.uartclk	= OMAP24XX_BASE_BAUD * 16,
-	}, {
-#endif
 		.flags		= 0
 	}
 };
Signature · 1 line
1.5.4.7
maintainer
#3 lore raw

PATCH 1/1 ARM: OMAP4: Fix UART4 platform data

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap-fixes

Initial commit ID (Likely to change): 73f027f05cf29c7e581618f8bac6551aed6a8fcc

PatchWorks
http://patchwork.kernel.org/patch/53600/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=73f027f05cf29c7e581618f8bac6551aed6a8fcc

maintainer
#4 lore raw

PATCH 1/1 ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430

In reply to Santosh Shilimkar

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap-fixes

Initial commit ID (Likely to change): 43eea68cf86f5dbdcd3020bf15c9bec87501f16b

PatchWorks
http://patchwork.kernel.org/patch/53599/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=43eea68cf86f5dbdcd3020bf15c9bec87501f16b

maintainer
#5 lore raw
In reply to Santosh Shilimkar
Quoted 2 lines · Santosh Shilimkar

OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when used in linking scenario. This patch fixes the same.

To me it looks like this will break things for omap1 as the DMA channel interrupt is not disabled first. I guess the fix is to move the "Disable all interrupts on the channel" part above clearing the link mappings.

This fix should be tested in linux-omap before we send this to mainline.

Tony

Quoted 38 lines
---
 arch/arm/plat-omap/dma.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
arch/arm/plat-omap/dma.c +5 -4
index fd3154a..633c123 100644
@@ -975,6 +975,11 @@ void omap_stop_dma(int lch)
 {
 	u32 l;
 
+	/* Disable the DMA channel */
+	l = dma_read(CCR(lch));
+	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;
 		char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
@@ -1000,10 +1005,6 @@ void omap_stop_dma(int lch)
 	if (cpu_class_is_omap1())
 		dma_write(0, CICR(lch));
 
-	l = dma_read(CCR(lch));
-	l &= ~OMAP_DMA_CCR_EN;
-	dma_write(l, CCR(lch));
-
 	dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
 }
 EXPORT_SYMBOL(omap_stop_dma);
Signature · 1 line
1.5.4.7
#6 lore raw
Quoted 9 lines

-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Wednesday, October 14, 2009 10:36 PM
To: Shilimkar, Santosh
Cc: [email protected]; S, Venkatraman; Hari n; Jarkko Nikula
Subject: Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking

* Santosh Shilimkar <[email protected]> [091013 23:14]:

Quoted 8 lines
Quoted 1 line

OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when

used

Quoted 1 line

in linking scenario. This patch fixes the same.

To me it looks like this will break things for omap1 as the DMA channel interrupt is not disabled first. I guess the fix is to move the "Disable all interrupts on the channel" part above clearing the link mappings.

Indeed it will break OMAP1. Initially I thought of putting this change at this place so that it takes care of both normal and linking scenario.

I will rework this and send v2.

Quoted 1 line

This fix should be tested in linux-omap before we send this to mainline.

Yes ofcourse. That what I meant by merge.

Quoted 28 lines
Quoted 28 lines
---
 arch/arm/plat-omap/dma.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
arch/arm/plat-omap/dma.c +5 -0
index fd3154a..633c123 100644
@@ -975,6 +975,11 @@ void omap_stop_dma(int lch)
 {
 	u32 l;
 
+	/* Disable the DMA channel */
+	l = dma_read(CCR(lch));
+	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;
 		char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
@@ -1000,10 +1005,6 @@ void omap_stop_dma(int lch)
 	if (cpu_class_is_omap1())
 		dma_write(0, CICR(lch));
 
Quoted 10 lines
Quoted 10 lines
arch/arm/plat-omap/dma.c +0 -5
-	l = dma_read(CCR(lch));
-	l &= ~OMAP_DMA_CCR_EN;
-	dma_write(l, CCR(lch));
-
 	dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
 }
 EXPORT_SYMBOL(omap_stop_dma);
--

1.5.4.7

Regards,
Santosh

maintainer
#7 lore raw
Quoted 13 lines · Shilimkar, Santosh
Quoted 13 lines

-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Wednesday, October 14, 2009 10:36 PM
To: Shilimkar, Santosh
Cc: [email protected]; S, Venkatraman; Hari n; Jarkko Nikula
Subject: Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking

Quoted 1 line · Santosh Shilimkar

OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when

used

Quoted 1 line

in linking scenario. This patch fixes the same.

Quoted 7 lines
Quoted 4 lines

To me it looks like this will break things for omap1 as the DMA channel interrupt is not disabled first. I guess the fix is to move the "Disable all interrupts on the channel" part above clearing the link mappings.

Indeed it will break OMAP1. Initially I thought of putting this change at this place so that it takes care of both normal and linking scenario.

I will rework this and send v2.

OK, thanks.

Quoted 2 lines
Quoted 1 line

This fix should be tested in linux-omap before we send this to mainline.

Yes ofcourse. That what I meant by merge.

Yeah, we should still have enough time to get it into mainline kernel as a fix during this -rc cycle.

Regards,

Tony

#8 lore raw

<snip>

Quoted 6 lines
Quoted 1 line
Quoted 1 line

This fix should be tested in linux-omap before we send this to

mainline.

Quoted 1 line

Yes ofcourse. That what I meant by merge.

Yeah, we should still have enough time to get it into mainline kernel as a fix during this -rc cycle.

OK. Also please merge other two patches in linux-omap master since omap4 needs those two patches to boot.