diff options
author | Tony Lindgren <tony@atomide.com> | 2010-02-15 11:48:53 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-15 11:48:53 -0500 |
commit | 4f2c49fedf833e522001bc51824b894732900a3d (patch) | |
tree | 3fa99c328a2acac5752edf7c91d97c10a2b6bafa /arch/arm/mach-omap2/serial.c | |
parent | 4e6d488af37980d224cbf298224db6173673f362 (diff) |
omap: Clean the serial port defines
This way we don't have conflicts with the defines
with compiling in multiple omaps. Set the addresses
for uarts in struct omap_globals for the early serial
init code.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/serial.c')
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 8c964bec8159..eb56e193998d 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -74,7 +74,6 @@ static LIST_HEAD(uart_list); | |||
74 | 74 | ||
75 | static struct plat_serial8250_port serial_platform_data0[] = { | 75 | static struct plat_serial8250_port serial_platform_data0[] = { |
76 | { | 76 | { |
77 | .mapbase = OMAP_UART1_BASE, | ||
78 | .irq = 72, | 77 | .irq = 72, |
79 | .flags = UPF_BOOT_AUTOCONF, | 78 | .flags = UPF_BOOT_AUTOCONF, |
80 | .iotype = UPIO_MEM, | 79 | .iotype = UPIO_MEM, |
@@ -87,7 +86,6 @@ static struct plat_serial8250_port serial_platform_data0[] = { | |||
87 | 86 | ||
88 | static struct plat_serial8250_port serial_platform_data1[] = { | 87 | static struct plat_serial8250_port serial_platform_data1[] = { |
89 | { | 88 | { |
90 | .mapbase = OMAP_UART2_BASE, | ||
91 | .irq = 73, | 89 | .irq = 73, |
92 | .flags = UPF_BOOT_AUTOCONF, | 90 | .flags = UPF_BOOT_AUTOCONF, |
93 | .iotype = UPIO_MEM, | 91 | .iotype = UPIO_MEM, |
@@ -100,7 +98,6 @@ static struct plat_serial8250_port serial_platform_data1[] = { | |||
100 | 98 | ||
101 | static struct plat_serial8250_port serial_platform_data2[] = { | 99 | static struct plat_serial8250_port serial_platform_data2[] = { |
102 | { | 100 | { |
103 | .mapbase = OMAP_UART3_BASE, | ||
104 | .irq = 74, | 101 | .irq = 74, |
105 | .flags = UPF_BOOT_AUTOCONF, | 102 | .flags = UPF_BOOT_AUTOCONF, |
106 | .iotype = UPIO_MEM, | 103 | .iotype = UPIO_MEM, |
@@ -114,7 +111,6 @@ static struct plat_serial8250_port serial_platform_data2[] = { | |||
114 | #ifdef CONFIG_ARCH_OMAP4 | 111 | #ifdef CONFIG_ARCH_OMAP4 |
115 | static struct plat_serial8250_port serial_platform_data3[] = { | 112 | static struct plat_serial8250_port serial_platform_data3[] = { |
116 | { | 113 | { |
117 | .mapbase = OMAP_UART4_BASE, | ||
118 | .irq = 70, | 114 | .irq = 70, |
119 | .flags = UPF_BOOT_AUTOCONF, | 115 | .flags = UPF_BOOT_AUTOCONF, |
120 | .iotype = UPIO_MEM, | 116 | .iotype = UPIO_MEM, |
@@ -125,6 +121,17 @@ static struct plat_serial8250_port serial_platform_data3[] = { | |||
125 | } | 121 | } |
126 | }; | 122 | }; |
127 | #endif | 123 | #endif |
124 | |||
125 | void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) | ||
126 | { | ||
127 | serial_platform_data0[0].mapbase = omap2_globals->uart1_phys; | ||
128 | serial_platform_data1[0].mapbase = omap2_globals->uart2_phys; | ||
129 | serial_platform_data2[0].mapbase = omap2_globals->uart3_phys; | ||
130 | #ifdef CONFIG_ARCH_OMAP4 | ||
131 | serial_platform_data3[0].mapbase = omap2_globals->uart4_phys; | ||
132 | #endif | ||
133 | } | ||
134 | |||
128 | static inline unsigned int __serial_read_reg(struct uart_port *up, | 135 | static inline unsigned int __serial_read_reg(struct uart_port *up, |
129 | int offset) | 136 | int offset) |
130 | { | 137 | { |