aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap1/include/mach/debug-macro.S16
-rw-r--r--arch/arm/mach-omap1/serial.c6
-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
-rw-r--r--arch/arm/plat-omap/common.c29
-rw-r--r--arch/arm/plat-omap/include/plat/common.h6
-rw-r--r--arch/arm/plat-omap/include/plat/omap16xx.h74
-rw-r--r--arch/arm/plat-omap/include/plat/serial.h45
-rw-r--r--arch/arm/plat-omap/include/plat/uncompress.h7
11 files changed, 130 insertions, 87 deletions
diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S
index 8c74cab2fa8b..9ea12f29e0b6 100644
--- a/arch/arm/mach-omap1/include/mach/debug-macro.S
+++ b/arch/arm/mach-omap1/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?
@@ -30,13 +34,13 @@
30 .endm 34 .endm
31 35
32 .macro busyuart,rd,rx 36 .macro busyuart,rd,rx
331001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends 371001: ldrb \rd, [\rx, #(UART_LSR << OMAP_PORT_SHIFT)]
34 and \rd, \rd, #0x60 38 and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
35 teq \rd, #0x60 39 teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
36 beq 1002f 40 beq 1002f
37 ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only 41 ldrb \rd, [\rx, #(UART_LSR << OMAP7XX_PORT_SHIFT)]
38 and \rd, \rd, #0x60 42 and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
39 teq \rd, #0x60 43 teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
40 bne 1001b 44 bne 1001b
411002: 451002:
42 .endm 46 .endm
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 6e5207c81cf4..349de90194e3 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -64,7 +64,7 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p)
64 64
65static struct plat_serial8250_port serial_platform_data[] = { 65static struct plat_serial8250_port serial_platform_data[] = {
66 { 66 {
67 .mapbase = OMAP_UART1_BASE, 67 .mapbase = OMAP1_UART1_BASE,
68 .irq = INT_UART1, 68 .irq = INT_UART1,
69 .flags = UPF_BOOT_AUTOCONF, 69 .flags = UPF_BOOT_AUTOCONF,
70 .iotype = UPIO_MEM, 70 .iotype = UPIO_MEM,
@@ -72,7 +72,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
72 .uartclk = OMAP16XX_BASE_BAUD * 16, 72 .uartclk = OMAP16XX_BASE_BAUD * 16,
73 }, 73 },
74 { 74 {
75 .mapbase = OMAP_UART2_BASE, 75 .mapbase = OMAP1_UART2_BASE,
76 .irq = INT_UART2, 76 .irq = INT_UART2,
77 .flags = UPF_BOOT_AUTOCONF, 77 .flags = UPF_BOOT_AUTOCONF,
78 .iotype = UPIO_MEM, 78 .iotype = UPIO_MEM,
@@ -80,7 +80,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
80 .uartclk = OMAP16XX_BASE_BAUD * 16, 80 .uartclk = OMAP16XX_BASE_BAUD * 16,
81 }, 81 },
82 { 82 {
83 .mapbase = OMAP_UART3_BASE, 83 .mapbase = OMAP1_UART3_BASE,
84 .irq = INT_UART3, 84 .irq = INT_UART3,
85 .flags = UPF_BOOT_AUTOCONF, 85 .flags = UPF_BOOT_AUTOCONF,
86 .iotype = UPIO_MEM, 86 .iotype = UPIO_MEM,
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{
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index bf1eaf3a27d4..dddce037ab12 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -34,6 +34,7 @@
34#include <plat/control.h> 34#include <plat/control.h>
35#include <plat/mux.h> 35#include <plat/mux.h>
36#include <plat/fpga.h> 36#include <plat/fpga.h>
37#include <plat/serial.h>
37 38
38#include <plat/clock.h> 39#include <plat/clock.h>
39 40
@@ -219,6 +220,7 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals)
219 omap2_set_globals_sdrc(omap2_globals); 220 omap2_set_globals_sdrc(omap2_globals);
220 omap2_set_globals_control(omap2_globals); 221 omap2_set_globals_control(omap2_globals);
221 omap2_set_globals_prcm(omap2_globals); 222 omap2_set_globals_prcm(omap2_globals);
223 omap2_set_globals_uart(omap2_globals);
222} 224}
223 225
224#endif 226#endif
@@ -233,6 +235,9 @@ static struct omap_globals omap242x_globals = {
233 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP2420_CTRL_BASE), 235 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP2420_CTRL_BASE),
234 .prm = OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE), 236 .prm = OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE),
235 .cm = OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE), 237 .cm = OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE),
238 .uart1_phys = OMAP2_UART1_BASE,
239 .uart2_phys = OMAP2_UART2_BASE,
240 .uart3_phys = OMAP2_UART3_BASE,
236}; 241};
237 242
238void __init omap2_set_globals_242x(void) 243void __init omap2_set_globals_242x(void)
@@ -251,6 +256,9 @@ static struct omap_globals omap243x_globals = {
251 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE), 256 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE),
252 .prm = OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE), 257 .prm = OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE),
253 .cm = OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE), 258 .cm = OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE),
259 .uart1_phys = OMAP2_UART1_BASE,
260 .uart2_phys = OMAP2_UART2_BASE,
261 .uart3_phys = OMAP2_UART3_BASE,
254}; 262};
255 263
256void __init omap2_set_globals_243x(void) 264void __init omap2_set_globals_243x(void)
@@ -259,9 +267,9 @@ void __init omap2_set_globals_243x(void)
259} 267}
260#endif 268#endif
261 269
262#if defined(CONFIG_ARCH_OMAP3430) 270#if defined(CONFIG_ARCH_OMAP3)
263 271
264static struct omap_globals omap343x_globals = { 272static struct omap_globals omap3_globals = {
265 .class = OMAP343X_CLASS, 273 .class = OMAP343X_CLASS,
266 .tap = OMAP2_L4_IO_ADDRESS(0x4830A000), 274 .tap = OMAP2_L4_IO_ADDRESS(0x4830A000),
267 .sdrc = OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE), 275 .sdrc = OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE),
@@ -269,11 +277,21 @@ static struct omap_globals omap343x_globals = {
269 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE), 277 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE),
270 .prm = OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE), 278 .prm = OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE),
271 .cm = OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE), 279 .cm = OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE),
280 .uart1_phys = OMAP3_UART1_BASE,
281 .uart2_phys = OMAP3_UART2_BASE,
282 .uart3_phys = OMAP3_UART3_BASE,
272}; 283};
273 284
274void __init omap2_set_globals_343x(void) 285void __init omap2_set_globals_343x(void)
275{ 286{
276 __omap2_set_globals(&omap343x_globals); 287 __omap2_set_globals(&omap3_globals);
288}
289
290void __init omap2_set_globals_36xx(void)
291{
292 omap3_globals.uart4_phys = OMAP3_UART4_BASE;
293
294 __omap2_set_globals(&omap3_globals);
277} 295}
278#endif 296#endif
279 297
@@ -285,6 +303,10 @@ static struct omap_globals omap4_globals = {
285 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE), 303 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE),
286 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE), 304 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE),
287 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE), 305 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE),
306 .uart1_phys = OMAP4_UART1_BASE,
307 .uart2_phys = OMAP4_UART2_BASE,
308 .uart3_phys = OMAP4_UART3_BASE,
309 .uart4_phys = OMAP4_UART4_BASE,
288}; 310};
289 311
290void __init omap2_set_globals_443x(void) 312void __init omap2_set_globals_443x(void)
@@ -292,6 +314,7 @@ void __init omap2_set_globals_443x(void)
292 omap2_set_globals_tap(&omap4_globals); 314 omap2_set_globals_tap(&omap4_globals);
293 omap2_set_globals_control(&omap4_globals); 315 omap2_set_globals_control(&omap4_globals);
294 omap2_set_globals_prcm(&omap4_globals); 316 omap2_set_globals_prcm(&omap4_globals);
317 omap2_set_globals_uart(&omap4_globals);
295} 318}
296#endif 319#endif
297 320
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index 32c22272425d..e04a58ec53a2 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -47,11 +47,16 @@ struct omap_globals {
47 void __iomem *prm; /* Power and Reset Management */ 47 void __iomem *prm; /* Power and Reset Management */
48 void __iomem *cm; /* Clock Management */ 48 void __iomem *cm; /* Clock Management */
49 void __iomem *cm2; 49 void __iomem *cm2;
50 unsigned long uart1_phys;
51 unsigned long uart2_phys;
52 unsigned long uart3_phys;
53 unsigned long uart4_phys;
50}; 54};
51 55
52void omap2_set_globals_242x(void); 56void omap2_set_globals_242x(void);
53void omap2_set_globals_243x(void); 57void omap2_set_globals_243x(void);
54void omap2_set_globals_343x(void); 58void omap2_set_globals_343x(void);
59void omap2_set_globals_36xx(void);
55void omap2_set_globals_443x(void); 60void omap2_set_globals_443x(void);
56 61
57/* These get called from omap2_set_globals_xxxx(), do not call these */ 62/* These get called from omap2_set_globals_xxxx(), do not call these */
@@ -59,6 +64,7 @@ void omap2_set_globals_tap(struct omap_globals *);
59void omap2_set_globals_sdrc(struct omap_globals *); 64void omap2_set_globals_sdrc(struct omap_globals *);
60void omap2_set_globals_control(struct omap_globals *); 65void omap2_set_globals_control(struct omap_globals *);
61void omap2_set_globals_prcm(struct omap_globals *); 66void omap2_set_globals_prcm(struct omap_globals *);
67void omap2_set_globals_uart(struct omap_globals *);
62 68
63/** 69/**
64 * omap_test_timeout - busy-loop, testing a condition 70 * omap_test_timeout - busy-loop, testing a condition
diff --git a/arch/arm/plat-omap/include/plat/omap16xx.h b/arch/arm/plat-omap/include/plat/omap16xx.h
index 7560b4d583a3..e69e1d857b45 100644
--- a/arch/arm/plat-omap/include/plat/omap16xx.h
+++ b/arch/arm/plat-omap/include/plat/omap16xx.h
@@ -125,43 +125,43 @@
125#define OMAP16XX_MMCSD2_SSW_MPU_CONF (TIPB_SWITCH_BASE + 0x160) 125#define OMAP16XX_MMCSD2_SSW_MPU_CONF (TIPB_SWITCH_BASE + 0x160)
126 126
127/* UART3 Registers Mapping through MPU bus */ 127/* UART3 Registers Mapping through MPU bus */
128#define UART3_RHR (OMAP_UART3_BASE + 0) 128#define UART3_RHR (OMAP1_UART3_BASE + 0)
129#define UART3_THR (OMAP_UART3_BASE + 0) 129#define UART3_THR (OMAP1_UART3_BASE + 0)
130#define UART3_DLL (OMAP_UART3_BASE + 0) 130#define UART3_DLL (OMAP1_UART3_BASE + 0)
131#define UART3_IER (OMAP_UART3_BASE + 4) 131#define UART3_IER (OMAP1_UART3_BASE + 4)
132#define UART3_DLH (OMAP_UART3_BASE + 4) 132#define UART3_DLH (OMAP1_UART3_BASE + 4)
133#define UART3_IIR (OMAP_UART3_BASE + 8) 133#define UART3_IIR (OMAP1_UART3_BASE + 8)
134#define UART3_FCR (OMAP_UART3_BASE + 8) 134#define UART3_FCR (OMAP1_UART3_BASE + 8)
135#define UART3_EFR (OMAP_UART3_BASE + 8) 135#define UART3_EFR (OMAP1_UART3_BASE + 8)
136#define UART3_LCR (OMAP_UART3_BASE + 0x0C) 136#define UART3_LCR (OMAP1_UART3_BASE + 0x0C)
137#define UART3_MCR (OMAP_UART3_BASE + 0x10) 137#define UART3_MCR (OMAP1_UART3_BASE + 0x10)
138#define UART3_XON1_ADDR1 (OMAP_UART3_BASE + 0x10) 138#define UART3_XON1_ADDR1 (OMAP1_UART3_BASE + 0x10)
139#define UART3_XON2_ADDR2 (OMAP_UART3_BASE + 0x14) 139#define UART3_XON2_ADDR2 (OMAP1_UART3_BASE + 0x14)
140#define UART3_LSR (OMAP_UART3_BASE + 0x14) 140#define UART3_LSR (OMAP1_UART3_BASE + 0x14)
141#define UART3_TCR (OMAP_UART3_BASE + 0x18) 141#define UART3_TCR (OMAP1_UART3_BASE + 0x18)
142#define UART3_MSR (OMAP_UART3_BASE + 0x18) 142#define UART3_MSR (OMAP1_UART3_BASE + 0x18)
143#define UART3_XOFF1 (OMAP_UART3_BASE + 0x18) 143#define UART3_XOFF1 (OMAP1_UART3_BASE + 0x18)
144#define UART3_XOFF2 (OMAP_UART3_BASE + 0x1C) 144#define UART3_XOFF2 (OMAP1_UART3_BASE + 0x1C)
145#define UART3_SPR (OMAP_UART3_BASE + 0x1C) 145#define UART3_SPR (OMAP1_UART3_BASE + 0x1C)
146#define UART3_TLR (OMAP_UART3_BASE + 0x1C) 146#define UART3_TLR (OMAP1_UART3_BASE + 0x1C)
147#define UART3_MDR1 (OMAP_UART3_BASE + 0x20) 147#define UART3_MDR1 (OMAP1_UART3_BASE + 0x20)
148#define UART3_MDR2 (OMAP_UART3_BASE + 0x24) 148#define UART3_MDR2 (OMAP1_UART3_BASE + 0x24)
149#define UART3_SFLSR (OMAP_UART3_BASE + 0x28) 149#define UART3_SFLSR (OMAP1_UART3_BASE + 0x28)
150#define UART3_TXFLL (OMAP_UART3_BASE + 0x28) 150#define UART3_TXFLL (OMAP1_UART3_BASE + 0x28)
151#define UART3_RESUME (OMAP_UART3_BASE + 0x2C) 151#define UART3_RESUME (OMAP1_UART3_BASE + 0x2C)
152#define UART3_TXFLH (OMAP_UART3_BASE + 0x2C) 152#define UART3_TXFLH (OMAP1_UART3_BASE + 0x2C)
153#define UART3_SFREGL (OMAP_UART3_BASE + 0x30) 153#define UART3_SFREGL (OMAP1_UART3_BASE + 0x30)
154#define UART3_RXFLL (OMAP_UART3_BASE + 0x30) 154#define UART3_RXFLL (OMAP1_UART3_BASE + 0x30)
155#define UART3_SFREGH (OMAP_UART3_BASE + 0x34) 155#define UART3_SFREGH (OMAP1_UART3_BASE + 0x34)
156#define UART3_RXFLH (OMAP_UART3_BASE + 0x34) 156#define UART3_RXFLH (OMAP1_UART3_BASE + 0x34)
157#define UART3_BLR (OMAP_UART3_BASE + 0x38) 157#define UART3_BLR (OMAP1_UART3_BASE + 0x38)
158#define UART3_ACREG (OMAP_UART3_BASE + 0x3C) 158#define UART3_ACREG (OMAP1_UART3_BASE + 0x3C)
159#define UART3_DIV16 (OMAP_UART3_BASE + 0x3C) 159#define UART3_DIV16 (OMAP1_UART3_BASE + 0x3C)
160#define UART3_SCR (OMAP_UART3_BASE + 0x40) 160#define UART3_SCR (OMAP1_UART3_BASE + 0x40)
161#define UART3_SSR (OMAP_UART3_BASE + 0x44) 161#define UART3_SSR (OMAP1_UART3_BASE + 0x44)
162#define UART3_EBLR (OMAP_UART3_BASE + 0x48) 162#define UART3_EBLR (OMAP1_UART3_BASE + 0x48)
163#define UART3_OSC_12M_SEL (OMAP_UART3_BASE + 0x4C) 163#define UART3_OSC_12M_SEL (OMAP1_UART3_BASE + 0x4C)
164#define UART3_MVR (OMAP_UART3_BASE + 0x50) 164#define UART3_MVR (OMAP1_UART3_BASE + 0x50)
165 165
166/* 166/*
167 * --------------------------------------------------------------------------- 167 * ---------------------------------------------------------------------------
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
index f5a4a92393ef..7f5a7a88a6eb 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/plat-omap/include/plat/serial.h
@@ -15,37 +15,40 @@
15 15
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#if defined(CONFIG_ARCH_OMAP1)
19/* OMAP1 serial ports */ 18/* OMAP1 serial ports */
20#define OMAP_UART1_BASE 0xfffb0000 19#define OMAP1_UART1_BASE 0xfffb0000
21#define OMAP_UART2_BASE 0xfffb0800 20#define OMAP1_UART2_BASE 0xfffb0800
22#define OMAP_UART3_BASE 0xfffb9800 21#define OMAP1_UART3_BASE 0xfffb9800
23#elif defined(CONFIG_ARCH_OMAP2) 22
24/* OMAP2 serial ports */ 23/* OMAP2 serial ports */
25#define OMAP_UART1_BASE 0x4806a000 24#define OMAP2_UART1_BASE 0x4806a000
26#define OMAP_UART2_BASE 0x4806c000 25#define OMAP2_UART2_BASE 0x4806c000
27#define OMAP_UART3_BASE 0x4806e000 26#define OMAP2_UART3_BASE 0x4806e000
28#elif defined(CONFIG_ARCH_OMAP3) 27
29/* OMAP3 serial ports */ 28/* OMAP3 serial ports */
30#define OMAP_UART1_BASE 0x4806a000 29#define OMAP3_UART1_BASE 0x4806a000
31#define OMAP_UART2_BASE 0x4806c000 30#define OMAP3_UART2_BASE 0x4806c000
32#define OMAP_UART3_BASE 0x49020000 31#define OMAP3_UART3_BASE 0x49020000
33#elif defined(CONFIG_ARCH_OMAP4) 32#define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */
33
34/* OMAP4 serial ports */ 34/* OMAP4 serial ports */
35#define OMAP_UART1_BASE 0x4806a000 35#define OMAP4_UART1_BASE 0x4806a000
36#define OMAP_UART2_BASE 0x4806c000 36#define OMAP4_UART2_BASE 0x4806c000
37#define OMAP_UART3_BASE 0x48020000 37#define OMAP4_UART3_BASE 0x48020000
38#define OMAP_UART4_BASE 0x4806e000 38#define OMAP4_UART4_BASE 0x4806e000
39#endif 39
40#define OMAP_PORT_SHIFT 2
41#define OMAP7XX_PORT_SHIFT 0
40 42
41#define OMAP1510_BASE_BAUD (12000000/16) 43#define OMAP1510_BASE_BAUD (12000000/16)
42#define OMAP16XX_BASE_BAUD (48000000/16) 44#define OMAP16XX_BASE_BAUD (48000000/16)
43#define OMAP24XX_BASE_BAUD (48000000/16) 45#define OMAP24XX_BASE_BAUD (48000000/16)
44 46
47/* This is only used by 8250.c for omap1510 */
45#define is_omap_port(pt) ({int __ret = 0; \ 48#define is_omap_port(pt) ({int __ret = 0; \
46 if ((pt)->port.mapbase == OMAP_UART1_BASE || \ 49 if ((pt)->port.mapbase == OMAP1_UART1_BASE || \
47 (pt)->port.mapbase == OMAP_UART2_BASE || \ 50 (pt)->port.mapbase == OMAP1_UART2_BASE || \
48 (pt)->port.mapbase == OMAP_UART3_BASE) \ 51 (pt)->port.mapbase == OMAP1_UART3_BASE) \
49 __ret = 1; \ 52 __ret = 1; \
50 __ret; \ 53 __ret; \
51 }) 54 })
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 13c305d62127..e5723c3e3418 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -40,12 +40,13 @@ static void putc(int c)
40#endif 40#endif
41 41
42#ifdef CONFIG_ARCH_OMAP 42#ifdef CONFIG_ARCH_OMAP
43 /* Will get removed in the next patch, set to OMAP3 to compile */
43#ifdef CONFIG_OMAP_LL_DEBUG_UART3 44#ifdef CONFIG_OMAP_LL_DEBUG_UART3
44 uart = (volatile u8 *)(OMAP_UART3_BASE); 45 uart = (volatile u8 *)(OMAP3_UART3_BASE);
45#elif defined(CONFIG_OMAP_LL_DEBUG_UART2) 46#elif defined(CONFIG_OMAP_LL_DEBUG_UART2)
46 uart = (volatile u8 *)(OMAP_UART2_BASE); 47 uart = (volatile u8 *)(OMAP3_UART2_BASE);
47#elif defined(CONFIG_OMAP_LL_DEBUG_UART1) 48#elif defined(CONFIG_OMAP_LL_DEBUG_UART1)
48 uart = (volatile u8 *)(OMAP_UART1_BASE); 49 uart = (volatile u8 *)(OMAP3_UART1_BASE);
49#elif defined(CONFIG_OMAP_LL_DEBUG_NONE) 50#elif defined(CONFIG_OMAP_LL_DEBUG_NONE)
50 return; 51 return;
51#else 52#else