aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-15 11:48:53 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 11:48:53 -0500
commit4f2c49fedf833e522001bc51824b894732900a3d (patch)
tree3fa99c328a2acac5752edf7c91d97c10a2b6bafa /arch/arm/mach-omap2
parent4e6d488af37980d224cbf298224db6173673f362 (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')
-rwxr-xr-xarch/arm/mach-omap2/board-3630sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom3.c2
-rw-r--r--arch/arm/mach-omap2/include/mach/debug-macro.S15
-rw-r--r--arch/arm/mach-omap2/serial.c15
4 files changed, 20 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index 739059632811..c178e68472f8 100755
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -68,7 +68,7 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
68 68
69static void __init omap_sdp_map_io(void) 69static void __init omap_sdp_map_io(void)
70{ 70{
71 omap2_set_globals_343x(); 71 omap2_set_globals_36xx();
72 omap2_map_common_io(); 72 omap2_map_common_io();
73} 73}
74 74
diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c
index a9fe9181b010..456b69072679 100644
--- a/arch/arm/mach-omap2/board-zoom3.c
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -26,7 +26,7 @@
26 26
27static void __init omap_zoom_map_io(void) 27static void __init omap_zoom_map_io(void)
28{ 28{
29 omap2_set_globals_343x(); 29 omap2_set_globals_36xx();
30 omap2_map_common_io(); 30 omap2_map_common_io();
31} 31}
32 32
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S
index 86979d7bd871..8d6da9a39d63 100644
--- a/arch/arm/mach-omap2/include/mach/debug-macro.S
+++ b/arch/arm/mach-omap2/include/mach/debug-macro.S
@@ -11,6 +11,10 @@
11 * 11 *
12*/ 12*/
13 13
14#include <linux/serial_reg.h>
15
16#include <plat/serial.h>
17
14 .macro addruart, rx, tmp 18 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 19 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 20 tst \rx, #1 @ MMU enabled?
@@ -44,15 +48,10 @@
44 .endm 48 .endm
45 49
46 .macro busyuart,rd,rx 50 .macro busyuart,rd,rx
471001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends 511001: ldrb \rd, [\rx, #(UART_LSR << OMAP_PORT_SHIFT)]
48 and \rd, \rd, #0x60 52 and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
49 teq \rd, #0x60 53 teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
50 beq 1002f
51 ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only
52 and \rd, \rd, #0x60
53 teq \rd, #0x60
54 bne 1001b 54 bne 1001b
551002:
56 .endm 55 .endm
57 56
58 .macro waituart,rd,rx 57 .macro waituart,rd,rx
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
75static struct plat_serial8250_port serial_platform_data0[] = { 75static 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
88static struct plat_serial8250_port serial_platform_data1[] = { 87static 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
101static struct plat_serial8250_port serial_platform_data2[] = { 99static 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
115static struct plat_serial8250_port serial_platform_data3[] = { 112static 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
125void __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
128static inline unsigned int __serial_read_reg(struct uart_port *up, 135static inline unsigned int __serial_read_reg(struct uart_port *up,
129 int offset) 136 int offset)
130{ 137{