All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash.
@ 2009-08-21  9:14 Santosh Shilimkar
  2009-08-21  9:14 ` [PATCH 2/2] ARM: OMAP4: Bypass the clock check Santosh Shilimkar
  2009-08-24 14:10 ` [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash Tony Lindgren
  0 siblings, 2 replies; 8+ messages in thread
From: Santosh Shilimkar @ 2009-08-21  9:14 UTC (permalink / raw)
  To: rmk
  Cc: tony, khilman, linux-arm-kernel, linux-omap, Santosh Shilimkar,
	Syed Rafiuddin

After the patch series "[PATCH 00/14] OMAP PM fixes for .31-rc"
merge in 2.6.31-rc5, the kernel crashed during boot on OMAP4430.
This patch fixes it by adding UART4 support and related code.
Without this patch omap_serial_init() would produce " NULL pointer
dereference" and kernel crashes in the bootup on OMAP4430 platform.

Some more info on the merge issue can be found here.
More info- http://lkml.org/lkml/2009/8/20/192

Note: While merging this patch,"IO_ADDRESS" needs to be changed 
to "OMAP2_IO_ADDRESS" if the Tony's below series is already merged in.
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg15072.html

Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-4430sdp.c |    2 +-
 arch/arm/mach-omap2/serial.c        |   27 ++++++++++++++++++++++++++-
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index b0c7402..1b22307 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -39,7 +39,7 @@ static struct platform_device *sdp4430_devices[] __initdata = {
 };
 
 static struct omap_uart_config sdp4430_uart_config __initdata = {
-	.enabled_uarts	= (1 << 0) | (1 << 1) | (1 << 2),
+	.enabled_uarts	= (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3),
 };
 
 static struct omap_lcd_config sdp4430_lcd_config __initdata = {
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index a7421a5..e1be77b 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -112,7 +112,21 @@ static struct plat_serial8250_port serial_platform_data2[] = {
 		.flags		= 0
 	}
 };
-
+#ifdef CONFIG_ARCH_OMAP4
+static struct plat_serial8250_port serial_platform_data3[] = {
+	{
+		.membase	= 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,
+	}, {
+		.flags		= 0
+	}
+};
+#endif
 static inline unsigned int serial_read_reg(struct plat_serial8250_port *up,
 					   int offset)
 {
@@ -550,6 +564,17 @@ static struct omap_uart_state omap_uart[OMAP_MAX_NR_PORTS] = {
 			},
 		},
 	},
+#ifdef CONFIG_ARCH_OMAP4
+	{
+		.pdev = {
+			.name			= "serial8250",
+			.id			= PLAT8250_DEV_FOURPORT,
+			.dev			= {
+				.platform_data	= serial_platform_data3,
+			},
+		},
+	},
+#endif
 };
 
 void __init omap_serial_init(void)
-- 
1.5.4.7


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

* [PATCH 2/2] ARM: OMAP4: Bypass the clock check.
  2009-08-21  9:14 [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash Santosh Shilimkar
@ 2009-08-21  9:14 ` Santosh Shilimkar
  2009-08-21 15:59   ` Kevin Hilman
  2009-08-24 14:10 ` [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash Tony Lindgren
  1 sibling, 1 reply; 8+ messages in thread
From: Santosh Shilimkar @ 2009-08-21  9:14 UTC (permalink / raw)
  To: rmk
  Cc: tony, khilman, linux-arm-kernel, linux-omap, Santosh Shilimkar,
	Syed Rafiuddin

Second reason of OMAP4 boot failure on 2.6.31.rc6, the UART
platform data is not getting registered to kernel.
Registration was failing because of clock check failure in
omap_serial_init().
Below patch fix the same.

OMAP4 clock framework patches are still getting discussed on mailing
list so till then we need this.

Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/mach-omap2/serial.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index e1be77b..e8d55f4 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -620,8 +620,10 @@ void __init omap_serial_init(void)
 			uart->fck = NULL;
 		}
 
-		if (!uart->ick || !uart->fck)
-			continue;
+		if (!cpu_is_omap44xx()) {
+			if (!uart->ick || !uart->fck)
+				continue;
+		}
 
 		uart->num = i;
 		p->private_data = uart;
-- 
1.5.4.7


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

* Re: [PATCH 2/2] ARM: OMAP4: Bypass the clock check.
  2009-08-21  9:14 ` [PATCH 2/2] ARM: OMAP4: Bypass the clock check Santosh Shilimkar
@ 2009-08-21 15:59   ` Kevin Hilman
  0 siblings, 0 replies; 8+ messages in thread
From: Kevin Hilman @ 2009-08-21 15:59 UTC (permalink / raw)
  To: Santosh Shilimkar; +Cc: rmk, tony, linux-arm-kernel, linux-omap, Syed Rafiuddin

Santosh Shilimkar <santosh.shilimkar@ti.com> writes:

> Second reason of OMAP4 boot failure on 2.6.31.rc6, the UART
> platform data is not getting registered to kernel.
> Registration was failing because of clock check failure in
> omap_serial_init().
> Below patch fix the same.
>
> OMAP4 clock framework patches are still getting discussed on mailing
> list so till then we need this.
>
> Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>
> ---
>  arch/arm/mach-omap2/serial.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index e1be77b..e8d55f4 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -620,8 +620,10 @@ void __init omap_serial_init(void)
>  			uart->fck = NULL;
>  		}
>  
> -		if (!uart->ick || !uart->fck)
> -			continue;

I'd like to see another FIXME here to the effect that this can be removed
when OMAP4 clock framework is in place.

> +		if (!cpu_is_omap44xx()) {
> +			if (!uart->ick || !uart->fck)
> +				continue;
> +		}
>  
>  		uart->num = i;
>  		p->private_data = uart;
> -- 
> 1.5.4.7

Other than that,

Acked-by: Kevin Hilman <khilman@deeprootsystems.com>

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

* Re: [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash.
  2009-08-21  9:14 [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash Santosh Shilimkar
  2009-08-21  9:14 ` [PATCH 2/2] ARM: OMAP4: Bypass the clock check Santosh Shilimkar
@ 2009-08-24 14:10 ` Tony Lindgren
  2009-08-24 14:29   ` Shilimkar, Santosh
  1 sibling, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2009-08-24 14:10 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: rmk, khilman, linux-arm-kernel, linux-omap, Syed Rafiuddin

* Santosh Shilimkar <santosh.shilimkar@ti.com> [090821 12:15]:
> After the patch series "[PATCH 00/14] OMAP PM fixes for .31-rc"
> merge in 2.6.31-rc5, the kernel crashed during boot on OMAP4430.
> This patch fixes it by adding UART4 support and related code.
> Without this patch omap_serial_init() would produce " NULL pointer
> dereference" and kernel crashes in the bootup on OMAP4430 platform.
> 
> Some more info on the merge issue can be found here.
> More info- http://lkml.org/lkml/2009/8/20/192
> 
> Note: While merging this patch,"IO_ADDRESS" needs to be changed 
> to "OMAP2_IO_ADDRESS" if the Tony's below series is already merged in.
> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg15072.html
> 
> Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Acked-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/board-4430sdp.c |    2 +-
>  arch/arm/mach-omap2/serial.c        |   27 ++++++++++++++++++++++++++-
>  2 files changed, 27 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> index b0c7402..1b22307 100644
> --- a/arch/arm/mach-omap2/board-4430sdp.c
> +++ b/arch/arm/mach-omap2/board-4430sdp.c
> @@ -39,7 +39,7 @@ static struct platform_device *sdp4430_devices[] __initdata = {
>  };
>  
>  static struct omap_uart_config sdp4430_uart_config __initdata = {
> -	.enabled_uarts	= (1 << 0) | (1 << 1) | (1 << 2),
> +	.enabled_uarts	= (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3),
>  };
>  

This part above won't be needed any longer with patches in omap for next.


>  static struct omap_lcd_config sdp4430_lcd_config __initdata = {
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index a7421a5..e1be77b 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -112,7 +112,21 @@ static struct plat_serial8250_port serial_platform_data2[] = {
>  		.flags		= 0
>  	}
>  };
> -
> +#ifdef CONFIG_ARCH_OMAP4
> +static struct plat_serial8250_port serial_platform_data3[] = {
> +	{
> +		.membase	= 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,
> +	}, {
> +		.flags		= 0
> +	}
> +};
> +#endif
>  static inline unsigned int serial_read_reg(struct plat_serial8250_port *up,
>  					   int offset)
>  {
> @@ -550,6 +564,17 @@ static struct omap_uart_state omap_uart[OMAP_MAX_NR_PORTS] = {
>  			},
>  		},
>  	},
> +#ifdef CONFIG_ARCH_OMAP4
> +	{
> +		.pdev = {
> +			.name			= "serial8250",
> +			.id			= PLAT8250_DEV_FOURPORT,
> +			.dev			= {
> +				.platform_data	= serial_platform_data3,
> +			},
> +		},
> +	},
> +#endif
>  };
>  
>  void __init omap_serial_init(void)
> -- 
> 1.5.4.7
> 

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

* RE: [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash.
  2009-08-24 14:10 ` [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash Tony Lindgren
@ 2009-08-24 14:29   ` Shilimkar, Santosh
  2009-08-24 15:26     ` Kevin Hilman
  0 siblings, 1 reply; 8+ messages in thread
From: Shilimkar, Santosh @ 2009-08-24 14:29 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: rmk, khilman, linux-arm-kernel, linux-omap, Syed, Rafiuddin

Kevin,
> -----Original Message-----
> From: Tony Lindgren [mailto:tony@atomide.com]
> Sent: Monday, August 24, 2009 7:41 PM
> To: Shilimkar, Santosh
> Cc: rmk@arm.linux.org.uk; khilman@deeprootsystems.com; linux-arm-
> kernel@lists.arm.linux.org.uk; linux-omap@vger.kernel.org; Syed, Rafiuddin
> Subject: Re: [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash.
> 
> * Santosh Shilimkar <santosh.shilimkar@ti.com> [090821 12:15]:
> > After the patch series "[PATCH 00/14] OMAP PM fixes for .31-rc"
> > merge in 2.6.31-rc5, the kernel crashed during boot on OMAP4430.
> > This patch fixes it by adding UART4 support and related code.
> > Without this patch omap_serial_init() would produce " NULL pointer
> > dereference" and kernel crashes in the bootup on OMAP4430 platform.
> >
> > Some more info on the merge issue can be found here.
> > More info- http://lkml.org/lkml/2009/8/20/192
> >
> > Note: While merging this patch,"IO_ADDRESS" needs to be changed
> > to "OMAP2_IO_ADDRESS" if the Tony's below series is already merged in.
> > http://www.mail-archive.com/linux-omap@vger.kernel.org/msg15072.html
> >
> > Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
> > Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > Acked-by: Tony Lindgren <tony@atomide.com>
> > ---
> >  arch/arm/mach-omap2/board-4430sdp.c |    2 +-
> >  arch/arm/mach-omap2/serial.c        |   27 ++++++++++++++++++++++++++-
> >  2 files changed, 27 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-
> omap2/board-4430sdp.c
> > index b0c7402..1b22307 100644
> > --- a/arch/arm/mach-omap2/board-4430sdp.c
> > +++ b/arch/arm/mach-omap2/board-4430sdp.c
> > @@ -39,7 +39,7 @@ static struct platform_device *sdp4430_devices[]
> __initdata = {
> >  };
> >
> >  static struct omap_uart_config sdp4430_uart_config __initdata = {
> > -	.enabled_uarts	= (1 << 0) | (1 << 1) | (1 << 2),
> > +	.enabled_uarts	= (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3),
> >  };
> >
> 
> This part above won't be needed any longer with patches in omap for next.

Will you fix this in your branch or shall I post v4.

Regards
Santosh
 

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

* Re: [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash.
  2009-08-24 14:29   ` Shilimkar, Santosh
@ 2009-08-24 15:26     ` Kevin Hilman
  2009-08-24 15:28       ` Shilimkar, Santosh
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Hilman @ 2009-08-24 15:26 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: Tony Lindgren, rmk, linux-arm-kernel, linux-omap, Syed, Rafiuddin

"Shilimkar, Santosh" <santosh.shilimkar@ti.com> writes:

> Kevin,
>> -----Original Message-----
>> From: Tony Lindgren [mailto:tony@atomide.com]
>> Sent: Monday, August 24, 2009 7:41 PM
>> To: Shilimkar, Santosh
>> Cc: rmk@arm.linux.org.uk; khilman@deeprootsystems.com; linux-arm-
>> kernel@lists.arm.linux.org.uk; linux-omap@vger.kernel.org; Syed, Rafiuddin
>> Subject: Re: [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash.
>> 
>> * Santosh Shilimkar <santosh.shilimkar@ti.com> [090821 12:15]:
>> > After the patch series "[PATCH 00/14] OMAP PM fixes for .31-rc"
>> > merge in 2.6.31-rc5, the kernel crashed during boot on OMAP4430.
>> > This patch fixes it by adding UART4 support and related code.
>> > Without this patch omap_serial_init() would produce " NULL pointer
>> > dereference" and kernel crashes in the bootup on OMAP4430 platform.
>> >
>> > Some more info on the merge issue can be found here.
>> > More info- http://lkml.org/lkml/2009/8/20/192
>> >
>> > Note: While merging this patch,"IO_ADDRESS" needs to be changed
>> > to "OMAP2_IO_ADDRESS" if the Tony's below series is already merged in.
>> > http://www.mail-archive.com/linux-omap@vger.kernel.org/msg15072.html
>> >
>> > Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
>> > Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> > Acked-by: Tony Lindgren <tony@atomide.com>
>> > ---
>> >  arch/arm/mach-omap2/board-4430sdp.c |    2 +-
>> >  arch/arm/mach-omap2/serial.c        |   27 ++++++++++++++++++++++++++-
>> >  2 files changed, 27 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-
>> omap2/board-4430sdp.c
>> > index b0c7402..1b22307 100644
>> > --- a/arch/arm/mach-omap2/board-4430sdp.c
>> > +++ b/arch/arm/mach-omap2/board-4430sdp.c
>> > @@ -39,7 +39,7 @@ static struct platform_device *sdp4430_devices[]
>> __initdata = {
>> >  };
>> >
>> >  static struct omap_uart_config sdp4430_uart_config __initdata = {
>> > -	.enabled_uarts	= (1 << 0) | (1 << 1) | (1 << 2),
>> > +	.enabled_uarts	= (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3),
>> >  };
>> >
>> 
>> This part above won't be needed any longer with patches in omap for next.
>
> Will you fix this in your branch or shall I post v4.

Santosh,

I'll fix this.

Kevin


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

* RE: [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash.
  2009-08-24 15:26     ` Kevin Hilman
@ 2009-08-24 15:28       ` Shilimkar, Santosh
  0 siblings, 0 replies; 8+ messages in thread
From: Shilimkar, Santosh @ 2009-08-24 15:28 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: Tony Lindgren, rmk, linux-arm-kernel, linux-omap, Syed, Rafiuddin



Regards,
Santosh

> >> This part above won't be needed any longer with patches in omap for
> next.
> >
> > Will you fix this in your branch or shall I post v4.
> 
> Santosh,
> 
> I'll fix this.
> 
> Kevin

Thanks Kevin!!

Regards
Santosh

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

* [PATCH 2/2] ARM: OMAP4: Bypass the clock check.
  2009-08-20 16:34 Santosh Shilimkar
@ 2009-08-20 16:34 ` Santosh Shilimkar
  0 siblings, 0 replies; 8+ messages in thread
From: Santosh Shilimkar @ 2009-08-20 16:34 UTC (permalink / raw)
  To: khilman, tony; +Cc: linux-omap, Santosh Shilimkar, Syed Rafiuddin

Second reason of OMAP4 boot failure on 2.6.31.rc6, the UART
platform data is not getting registered to kernel.
Registration was failing because of clock check failure in
omap_serial_init().
Below patch fix the same.

Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/mach-omap2/serial.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index e1be77b..e8d55f4 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -620,8 +620,10 @@ void __init omap_serial_init(void)
 			uart->fck = NULL;
 		}
 
-		if (!uart->ick || !uart->fck)
-			continue;
+		if (!cpu_is_omap44xx()) {
+			if (!uart->ick || !uart->fck)
+				continue;
+		}
 
 		uart->num = i;
 		p->private_data = uart;
-- 
1.5.4.7


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

end of thread, other threads:[~2009-08-24 15:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-21  9:14 [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash Santosh Shilimkar
2009-08-21  9:14 ` [PATCH 2/2] ARM: OMAP4: Bypass the clock check Santosh Shilimkar
2009-08-21 15:59   ` Kevin Hilman
2009-08-24 14:10 ` [PATCH 1/2] ARM: OMAP4: Fix NULL pointer dereference crash Tony Lindgren
2009-08-24 14:29   ` Shilimkar, Santosh
2009-08-24 15:26     ` Kevin Hilman
2009-08-24 15:28       ` Shilimkar, Santosh
  -- strict thread matches above, loose matches on Subject: below --
2009-08-20 16:34 Santosh Shilimkar
2009-08-20 16:34 ` [PATCH 2/2] ARM: OMAP4: Bypass the clock check Santosh Shilimkar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.