diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2009-08-22 04:00:11 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-09-02 18:07:53 -0400 |
commit | 0e3eaadfe3da84f98250ad8a2c36e87fe00e42ee (patch) | |
tree | 1404b0951aa4489b0992c04ca212d2002b503a95 /arch/arm/mach-omap2/serial.c | |
parent | 36d568ec055cb3ac4507d38ebabba955cdbb443e (diff) |
ARM: OMAP4: Fix NULL pointer dereference crash.
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>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/serial.c')
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index dd3c735b5588..645546cbd265 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -113,6 +113,21 @@ static struct plat_serial8250_port serial_platform_data2[] = { | |||
113 | } | 113 | } |
114 | }; | 114 | }; |
115 | 115 | ||
116 | #ifdef CONFIG_ARCH_OMAP4 | ||
117 | static struct plat_serial8250_port serial_platform_data3[] = { | ||
118 | { | ||
119 | .membase = IO_ADDRESS(OMAP_UART4_BASE), | ||
120 | .mapbase = OMAP_UART4_BASE, | ||
121 | .irq = 70, | ||
122 | .flags = UPF_BOOT_AUTOCONF, | ||
123 | .iotype = UPIO_MEM, | ||
124 | .regshift = 2, | ||
125 | .uartclk = OMAP24XX_BASE_BAUD * 16, | ||
126 | }, { | ||
127 | .flags = 0 | ||
128 | } | ||
129 | }; | ||
130 | #endif | ||
116 | static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, | 131 | static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, |
117 | int offset) | 132 | int offset) |
118 | { | 133 | { |
@@ -550,6 +565,17 @@ static struct omap_uart_state omap_uart[OMAP_MAX_NR_PORTS] = { | |||
550 | }, | 565 | }, |
551 | }, | 566 | }, |
552 | }, | 567 | }, |
568 | #ifdef CONFIG_ARCH_OMAP4 | ||
569 | { | ||
570 | .pdev = { | ||
571 | .name = "serial8250", | ||
572 | .id = 3 | ||
573 | .dev = { | ||
574 | .platform_data = serial_platform_data3, | ||
575 | }, | ||
576 | }, | ||
577 | }, | ||
578 | #endif | ||
553 | }; | 579 | }; |
554 | 580 | ||
555 | void __init omap_serial_init(void) | 581 | void __init omap_serial_init(void) |