aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-15 12:27:25 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 12:27:25 -0500
commita3a9b36e6b1c420088460af8e83ba7b83330669f (patch)
tree31f7ef7755234bac2a3d8ffee1222bf756ae4949
parent3f1686a9bfe74979c6ad538c78039730f665f77e (diff)
omap2/3/4: Fix mach-omap2/serial.c for multiboot
Initialize UART4 only for 3630 and 44xx. Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/serial.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index e657674d5490..2b784002bf77 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -114,7 +114,7 @@ static struct plat_serial8250_port serial_platform_data2[] = {
114 } 114 }
115}; 115};
116 116
117#ifdef CONFIG_ARCH_OMAP4 117#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
118static struct plat_serial8250_port serial_platform_data3[] = { 118static struct plat_serial8250_port serial_platform_data3[] = {
119 { 119 {
120 .irq = 70, 120 .irq = 70,
@@ -126,6 +126,15 @@ static struct plat_serial8250_port serial_platform_data3[] = {
126 .flags = 0 126 .flags = 0
127 } 127 }
128}; 128};
129
130static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals)
131{
132 serial_platform_data3[0].mapbase = omap2_globals->uart4_phys;
133}
134#else
135static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals)
136{
137}
129#endif 138#endif
130 139
131void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) 140void __init omap2_set_globals_uart(struct omap_globals *omap2_globals)
@@ -133,9 +142,8 @@ void __init omap2_set_globals_uart(struct omap_globals *omap2_globals)
133 serial_platform_data0[0].mapbase = omap2_globals->uart1_phys; 142 serial_platform_data0[0].mapbase = omap2_globals->uart1_phys;
134 serial_platform_data1[0].mapbase = omap2_globals->uart2_phys; 143 serial_platform_data1[0].mapbase = omap2_globals->uart2_phys;
135 serial_platform_data2[0].mapbase = omap2_globals->uart3_phys; 144 serial_platform_data2[0].mapbase = omap2_globals->uart3_phys;
136#ifdef CONFIG_ARCH_OMAP4 145 if (cpu_is_omap3630() || cpu_is_omap44xx())
137 serial_platform_data3[0].mapbase = omap2_globals->uart4_phys; 146 omap2_set_globals_uart4(omap2_globals);
138#endif
139} 147}
140 148
141static inline unsigned int __serial_read_reg(struct uart_port *up, 149static inline unsigned int __serial_read_reg(struct uart_port *up,
@@ -581,7 +589,7 @@ static struct omap_uart_state omap_uart[] = {
581 }, 589 },
582 }, 590 },
583 }, 591 },
584#ifdef CONFIG_ARCH_OMAP4 592#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
585 { 593 {
586 .pdev = { 594 .pdev = {
587 .name = "serial8250", 595 .name = "serial8250",
@@ -728,8 +736,13 @@ void __init omap_serial_init_port(int port)
728 */ 736 */
729void __init omap_serial_init(void) 737void __init omap_serial_init(void)
730{ 738{
731 int i; 739 int i, nr_ports;
740
741 if (!(cpu_is_omap3630() || cpu_is_omap4430()))
742 nr_ports = 3;
743 else
744 nr_ports = ARRAY_SIZE(omap_uart);
732 745
733 for (i = 0; i < ARRAY_SIZE(omap_uart); i++) 746 for (i = 0; i < nr_ports; i++)
734 omap_serial_init_port(i); 747 omap_serial_init_port(i);
735} 748}