linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking
@ 2009-10-14  6:14 Santosh Shilimkar
  2009-10-14  6:14 ` [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 board Santosh Shilimkar
  2009-10-14 17:06 ` [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking Tony Lindgren
  0 siblings, 2 replies; 9+ messages in thread
From: Santosh Shilimkar @ 2009-10-14  6:14 UTC (permalink / raw)
  To: tony; +Cc: linux-omap, Santosh Shilimkar, Venkatraman S, Hari n,
	Jarkko Nikula

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

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
CC: Hari n <hari.zoom@gmail.com>
CC: Jarkko Nikula <jhnikula@gmail.com>
---
 arch/arm/plat-omap/dma.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index fd3154a..633c123 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -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);
-- 
1.5.4.7


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 board
  2009-10-14  6:14 [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking Santosh Shilimkar
@ 2009-10-14  6:14 ` Santosh Shilimkar
  2009-10-14  6:14   ` [PATCH] ARM: OMAP4: Fix UART4 platform data Santosh Shilimkar
  2009-10-19 17:25   ` [APPLIED] [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 Tony Lindgren
  2009-10-14 17:06 ` [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking Tony Lindgren
  1 sibling, 2 replies; 9+ messages in thread
From: Santosh Shilimkar @ 2009-10-14  6:14 UTC (permalink / raw)
  To: tony; +Cc: linux-omap, Santosh Shilimkar

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

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-By: Tony Lindgren <tony@atomide.com>
Reviewed-By: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/board-4430sdp.c |    4 ++--
 arch/arm/mach-omap2/io.c            |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index eb37c40..609a5a4 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -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();
 }
 
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index e3a3bad..56be87d 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -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);
-- 
1.5.4.7


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] ARM: OMAP4: Fix UART4 platform data
  2009-10-14  6:14 ` [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 board Santosh Shilimkar
@ 2009-10-14  6:14   ` Santosh Shilimkar
  2009-10-19 17:28     ` [APPLIED] " Tony Lindgren
  2009-10-19 17:25   ` [APPLIED] [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 Tony Lindgren
  1 sibling, 1 reply; 9+ messages in thread
From: Santosh Shilimkar @ 2009-10-14  6:14 UTC (permalink / raw)
  To: tony; +Cc: linux-omap, Santosh Shilimkar

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

There is a separate platform structure for UART4

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-By: Tony Lindgren <tony@atomide.com>
Reviewed-By: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/serial.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index ae21868..54dfeb5 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -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
 	}
 };
-- 
1.5.4.7


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking
  2009-10-14  6:14 [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking Santosh Shilimkar
  2009-10-14  6:14 ` [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 board Santosh Shilimkar
@ 2009-10-14 17:06 ` Tony Lindgren
  2009-10-15  4:40   ` Shilimkar, Santosh
  1 sibling, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2009-10-14 17:06 UTC (permalink / raw)
  To: Santosh Shilimkar; +Cc: linux-omap, Venkatraman S, Hari n, Jarkko Nikula

* Santosh Shilimkar <santosh.shilimkar@ti.com> [091013 23:14]:
> 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
 
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Signed-off-by: Venkatraman S <svenkatr@ti.com>
> CC: Hari n <hari.zoom@gmail.com>
> CC: Jarkko Nikula <jhnikula@gmail.com>
> ---
>  arch/arm/plat-omap/dma.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index fd3154a..633c123 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -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);
> -- 
> 1.5.4.7
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking
  2009-10-14 17:06 ` [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking Tony Lindgren
@ 2009-10-15  4:40   ` Shilimkar, Santosh
  2009-10-15 18:40     ` Tony Lindgren
  0 siblings, 1 reply; 9+ messages in thread
From: Shilimkar, Santosh @ 2009-10-15  4:40 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap@vger.kernel.org, S, Venkatraman, Hari n, Jarkko Nikula

> -----Original Message-----
> From: Tony Lindgren [mailto:tony@atomide.com]
> Sent: Wednesday, October 14, 2009 10:36 PM
> To: Shilimkar, Santosh
> Cc: linux-omap@vger.kernel.org; S, Venkatraman; Hari n; Jarkko Nikula
> Subject: Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel
> linking
> 
> * Santosh Shilimkar <santosh.shilimkar@ti.com> [091013 23:14]:
> > 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.
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.

> This fix should be tested in linux-omap before we send this to mainline.
Yes ofcourse. That what I meant by merge.

> > Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > Signed-off-by: Venkatraman S <svenkatr@ti.com>
> > CC: Hari n <hari.zoom@gmail.com>
> > CC: Jarkko Nikula <jhnikula@gmail.com>
> > ---
> >  arch/arm/plat-omap/dma.c |    9 +++++----
> >  1 files changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> > index fd3154a..633c123 100644
> > --- a/arch/arm/plat-omap/dma.c
> > +++ b/arch/arm/plat-omap/dma.c
> > @@ -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);
> > --
> > 1.5.4.7
> >
Regards,
Santosh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking
  2009-10-15  4:40   ` Shilimkar, Santosh
@ 2009-10-15 18:40     ` Tony Lindgren
  2009-10-16  5:07       ` Shilimkar, Santosh
  0 siblings, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2009-10-15 18:40 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: linux-omap@vger.kernel.org, S, Venkatraman, Hari n, Jarkko Nikula

* Shilimkar, Santosh <santosh.shilimkar@ti.com> [091014 21:40]:
> > -----Original Message-----
> > From: Tony Lindgren [mailto:tony@atomide.com]
> > Sent: Wednesday, October 14, 2009 10:36 PM
> > To: Shilimkar, Santosh
> > Cc: linux-omap@vger.kernel.org; S, Venkatraman; Hari n; Jarkko Nikula
> > Subject: Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel
> > linking
> > 
> > * Santosh Shilimkar <santosh.shilimkar@ti.com> [091013 23:14]:
> > > 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.
> 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.
 
> > 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking
  2009-10-15 18:40     ` Tony Lindgren
@ 2009-10-16  5:07       ` Shilimkar, Santosh
  0 siblings, 0 replies; 9+ messages in thread
From: Shilimkar, Santosh @ 2009-10-16  5:07 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap@vger.kernel.org, S, Venkatraman, Hari n, Jarkko Nikula

<snip> 
> > > 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.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [APPLIED] [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430
  2009-10-14  6:14 ` [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 board Santosh Shilimkar
  2009-10-14  6:14   ` [PATCH] ARM: OMAP4: Fix UART4 platform data Santosh Shilimkar
@ 2009-10-19 17:25   ` Tony Lindgren
  1 sibling, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-10-19 17:25 UTC (permalink / raw)
  To: linux-omap

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [APPLIED] [PATCH] ARM: OMAP4: Fix UART4 platform data
  2009-10-14  6:14   ` [PATCH] ARM: OMAP4: Fix UART4 platform data Santosh Shilimkar
@ 2009-10-19 17:28     ` Tony Lindgren
  0 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-10-19 17:28 UTC (permalink / raw)
  To: linux-omap

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-10-19 17:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14  6:14 [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking Santosh Shilimkar
2009-10-14  6:14 ` [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 board Santosh Shilimkar
2009-10-14  6:14   ` [PATCH] ARM: OMAP4: Fix UART4 platform data Santosh Shilimkar
2009-10-19 17:28     ` [APPLIED] " Tony Lindgren
2009-10-19 17:25   ` [APPLIED] [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 Tony Lindgren
2009-10-14 17:06 ` [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking Tony Lindgren
2009-10-15  4:40   ` Shilimkar, Santosh
2009-10-15 18:40     ` Tony Lindgren
2009-10-16  5:07       ` Shilimkar, Santosh

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).