aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-15 12:26:07 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 12:26:07 -0500
commitbe26a3df0b80307bf8f73cea535c112210151bb9 (patch)
tree8e3d90563b6d689ad37500929c05c211153295be /arch
parent918cae14872c56446415299fc17cf98704c9a537 (diff)
parent61b603b4ee0c70708539e2fa5c3d47f17b7c7849 (diff)
Merge branch 'debug-ll' into omap-for-linus
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/compressed/head.S20
-rw-r--r--arch/arm/kernel/debug.S12
-rw-r--r--arch/arm/mach-aaec2000/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-at91/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-clps711x/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-davinci/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-dove/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-ebsa110/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-ep93xx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-footbridge/include/mach/debug-macro.S4
-rw-r--r--arch/arm/mach-gemini/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-h720x/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-integrator/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-iop13xx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-iop32x/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-iop33x/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-ixp2000/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-kirkwood/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-ks8695/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-l7200/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-loki/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-mmp/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-msm/include/mach/debug-macro.S4
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-netx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-nomadik/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-omap1/include/mach/debug-macro.S90
-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.S132
-rw-r--r--arch/arm/mach-omap2/serial.c15
-rw-r--r--arch/arm/mach-orion5x/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-pnx4008/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-pxa/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-realview/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-rpc/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s3c2410/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s3c24a0/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s3c6400/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5pc100/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-sa1100/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-shark/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-u300/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-ux500/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-versatile/include/mach/debug-macro.S2
-rw-r--r--arch/arm/plat-mxc/include/mach/debug-macro.S2
-rw-r--r--arch/arm/plat-omap/Kconfig19
-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.h70
-rw-r--r--arch/arm/plat-omap/include/plat/uncompress.h181
-rw-r--r--arch/arm/plat-stmp3xxx/include/mach/debug-macro.S2
58 files changed, 507 insertions, 243 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 4fddc509e78e..99b75aa1c2ec 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -22,13 +22,13 @@
22#if defined(CONFIG_DEBUG_ICEDCC) 22#if defined(CONFIG_DEBUG_ICEDCC)
23 23
24#ifdef CONFIG_CPU_V6 24#ifdef CONFIG_CPU_V6
25 .macro loadsp, rb 25 .macro loadsp, rb, tmp
26 .endm 26 .endm
27 .macro writeb, ch, rb 27 .macro writeb, ch, rb
28 mcr p14, 0, \ch, c0, c5, 0 28 mcr p14, 0, \ch, c0, c5, 0
29 .endm 29 .endm
30#elif defined(CONFIG_CPU_V7) 30#elif defined(CONFIG_CPU_V7)
31 .macro loadsp, rb 31 .macro loadsp, rb, tmp
32 .endm 32 .endm
33 .macro writeb, ch, rb 33 .macro writeb, ch, rb
34wait: mrc p14, 0, pc, c0, c1, 0 34wait: mrc p14, 0, pc, c0, c1, 0
@@ -36,13 +36,13 @@ wait: mrc p14, 0, pc, c0, c1, 0
36 mcr p14, 0, \ch, c0, c5, 0 36 mcr p14, 0, \ch, c0, c5, 0
37 .endm 37 .endm
38#elif defined(CONFIG_CPU_XSCALE) 38#elif defined(CONFIG_CPU_XSCALE)
39 .macro loadsp, rb 39 .macro loadsp, rb, tmp
40 .endm 40 .endm
41 .macro writeb, ch, rb 41 .macro writeb, ch, rb
42 mcr p14, 0, \ch, c8, c0, 0 42 mcr p14, 0, \ch, c8, c0, 0
43 .endm 43 .endm
44#else 44#else
45 .macro loadsp, rb 45 .macro loadsp, rb, tmp
46 .endm 46 .endm
47 .macro writeb, ch, rb 47 .macro writeb, ch, rb
48 mcr p14, 0, \ch, c1, c0, 0 48 mcr p14, 0, \ch, c1, c0, 0
@@ -58,7 +58,7 @@ wait: mrc p14, 0, pc, c0, c1, 0
58 .endm 58 .endm
59 59
60#if defined(CONFIG_ARCH_SA1100) 60#if defined(CONFIG_ARCH_SA1100)
61 .macro loadsp, rb 61 .macro loadsp, rb, tmp
62 mov \rb, #0x80000000 @ physical base address 62 mov \rb, #0x80000000 @ physical base address
63#ifdef CONFIG_DEBUG_LL_SER3 63#ifdef CONFIG_DEBUG_LL_SER3
64 add \rb, \rb, #0x00050000 @ Ser3 64 add \rb, \rb, #0x00050000 @ Ser3
@@ -67,13 +67,13 @@ wait: mrc p14, 0, pc, c0, c1, 0
67#endif 67#endif
68 .endm 68 .endm
69#elif defined(CONFIG_ARCH_S3C2410) 69#elif defined(CONFIG_ARCH_S3C2410)
70 .macro loadsp, rb 70 .macro loadsp, rb, tmp
71 mov \rb, #0x50000000 71 mov \rb, #0x50000000
72 add \rb, \rb, #0x4000 * CONFIG_S3C_LOWLEVEL_UART_PORT 72 add \rb, \rb, #0x4000 * CONFIG_S3C_LOWLEVEL_UART_PORT
73 .endm 73 .endm
74#else 74#else
75 .macro loadsp, rb 75 .macro loadsp, rb, tmp
76 addruart \rb 76 addruart \rb, \tmp
77 .endm 77 .endm
78#endif 78#endif
79#endif 79#endif
@@ -1025,7 +1025,7 @@ phex: adr r3, phexbuf
1025 strb r2, [r3, r1] 1025 strb r2, [r3, r1]
1026 b 1b 1026 b 1b
1027 1027
1028puts: loadsp r3 1028puts: loadsp r3, r1
10291: ldrb r2, [r0], #1 10291: ldrb r2, [r0], #1
1030 teq r2, #0 1030 teq r2, #0
1031 moveq pc, lr 1031 moveq pc, lr
@@ -1042,7 +1042,7 @@ puts: loadsp r3
1042putc: 1042putc:
1043 mov r2, r0 1043 mov r2, r0
1044 mov r0, #0 1044 mov r0, #0
1045 loadsp r3 1045 loadsp r3, r1
1046 b 2b 1046 b 2b
1047 1047
1048memdump: mov r12, r0 1048memdump: mov r12, r0
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index 5c91addcaebc..a38b4879441d 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -24,7 +24,7 @@
24 24
25#if defined(CONFIG_CPU_V6) 25#if defined(CONFIG_CPU_V6)
26 26
27 .macro addruart, rx 27 .macro addruart, rx, tmp
28 .endm 28 .endm
29 29
30 .macro senduart, rd, rx 30 .macro senduart, rd, rx
@@ -51,7 +51,7 @@
51 51
52#elif defined(CONFIG_CPU_V7) 52#elif defined(CONFIG_CPU_V7)
53 53
54 .macro addruart, rx 54 .macro addruart, rx, tmp
55 .endm 55 .endm
56 56
57 .macro senduart, rd, rx 57 .macro senduart, rd, rx
@@ -71,7 +71,7 @@ wait: mrc p14, 0, pc, c0, c1, 0
71 71
72#elif defined(CONFIG_CPU_XSCALE) 72#elif defined(CONFIG_CPU_XSCALE)
73 73
74 .macro addruart, rx 74 .macro addruart, rx, tmp
75 .endm 75 .endm
76 76
77 .macro senduart, rd, rx 77 .macro senduart, rd, rx
@@ -98,7 +98,7 @@ wait: mrc p14, 0, pc, c0, c1, 0
98 98
99#else 99#else
100 100
101 .macro addruart, rx 101 .macro addruart, rx, tmp
102 .endm 102 .endm
103 103
104 .macro senduart, rd, rx 104 .macro senduart, rd, rx
@@ -164,7 +164,7 @@ ENDPROC(printhex2)
164 .ltorg 164 .ltorg
165 165
166ENTRY(printascii) 166ENTRY(printascii)
167 addruart r3 167 addruart r3, r1
168 b 2f 168 b 2f
1691: waituart r2, r3 1691: waituart r2, r3
170 senduart r1, r3 170 senduart r1, r3
@@ -180,7 +180,7 @@ ENTRY(printascii)
180ENDPROC(printascii) 180ENDPROC(printascii)
181 181
182ENTRY(printch) 182ENTRY(printch)
183 addruart r3 183 addruart r3, r1
184 mov r1, r0 184 mov r1, r0
185 mov r0, #0 185 mov r0, #0
186 b 1b 186 b 1b
diff --git a/arch/arm/mach-aaec2000/include/mach/debug-macro.S b/arch/arm/mach-aaec2000/include/mach/debug-macro.S
index 0b6351d7c389..a9cac368bfe6 100644
--- a/arch/arm/mach-aaec2000/include/mach/debug-macro.S
+++ b/arch/arm/mach-aaec2000/include/mach/debug-macro.S
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "hardware.h" 12#include "hardware.h"
13 .macro addruart,rx 13 .macro addruart, rx, tmp
14 mrc p15, 0, \rx, c1, c0 14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled? 15 tst \rx, #1 @ MMU enabled?
16 moveq \rx, #0x80000000 @ physical 16 moveq \rx, #0x80000000 @ physical
diff --git a/arch/arm/mach-at91/include/mach/debug-macro.S b/arch/arm/mach-at91/include/mach/debug-macro.S
index 29052ba66ada..9e750a1c1b5a 100644
--- a/arch/arm/mach-at91/include/mach/debug-macro.S
+++ b/arch/arm/mach-at91/include/mach/debug-macro.S
@@ -14,7 +14,7 @@
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/at91_dbgu.h> 15#include <mach/at91_dbgu.h>
16 16
17 .macro addruart,rx 17 .macro addruart, rx, tmp
18 mrc p15, 0, \rx, c1, c0 18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled? 19 tst \rx, #1 @ MMU enabled?
20 ldreq \rx, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address) 20 ldreq \rx, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address)
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
index 64baf9f87408..fedd8076a689 100644
--- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
@@ -13,7 +13,7 @@
13 13
14#include <asm/hardware/clps7111.h> 14#include <asm/hardware/clps7111.h>
15 15
16 .macro addruart,rx 16 .macro addruart, rx, tmp
17 mrc p15, 0, \rx, c1, c0 17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled? 18 tst \rx, #1 @ MMU enabled?
19 moveq \rx, #CLPS7111_PHYS_BASE 19 moveq \rx, #CLPS7111_PHYS_BASE
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S
index 17ab5236da66..3cd93a801d9b 100644
--- a/arch/arm/mach-davinci/include/mach/debug-macro.S
+++ b/arch/arm/mach-davinci/include/mach/debug-macro.S
@@ -19,7 +19,7 @@
19#include <linux/serial_reg.h> 19#include <linux/serial_reg.h>
20#define UART_SHIFT 2 20#define UART_SHIFT 2
21 21
22 .macro addruart, rx 22 .macro addruart, rx, tmp
23 mrc p15, 0, \rx, c1, c0 23 mrc p15, 0, \rx, c1, c0
24 tst \rx, #1 @ MMU enabled? 24 tst \rx, #1 @ MMU enabled?
25 moveq \rx, #0x01000000 @ physical base address 25 moveq \rx, #0x01000000 @ physical base address
diff --git a/arch/arm/mach-dove/include/mach/debug-macro.S b/arch/arm/mach-dove/include/mach/debug-macro.S
index 9b89ec7d3040..1521d13f1d14 100644
--- a/arch/arm/mach-dove/include/mach/debug-macro.S
+++ b/arch/arm/mach-dove/include/mach/debug-macro.S
@@ -8,7 +8,7 @@
8 8
9#include <mach/bridge-regs.h> 9#include <mach/bridge-regs.h>
10 10
11 .macro addruart,rx 11 .macro addruart, rx, tmp
12 mrc p15, 0, \rx, c1, c0 12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled? 13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =DOVE_SB_REGS_PHYS_BASE 14 ldreq \rx, =DOVE_SB_REGS_PHYS_BASE
diff --git a/arch/arm/mach-ebsa110/include/mach/debug-macro.S b/arch/arm/mach-ebsa110/include/mach/debug-macro.S
index 1dde8227f3a2..ebbd89f0e6c0 100644
--- a/arch/arm/mach-ebsa110/include/mach/debug-macro.S
+++ b/arch/arm/mach-ebsa110/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 * 11 *
12**/ 12**/
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mov \rx, #0xf0000000 15 mov \rx, #0xf0000000
16 orr \rx, \rx, #0x00000be0 16 orr \rx, \rx, #0x00000be0
17 .endm 17 .endm
diff --git a/arch/arm/mach-ep93xx/include/mach/debug-macro.S b/arch/arm/mach-ep93xx/include/mach/debug-macro.S
index 802858bc8095..5cd22444e223 100644
--- a/arch/arm/mach-ep93xx/include/mach/debug-macro.S
+++ b/arch/arm/mach-ep93xx/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 */ 11 */
12#include <mach/ep93xx-regs.h> 12#include <mach/ep93xx-regs.h>
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
17 ldreq \rx, =EP93XX_APB_PHYS_BASE @ Physical base 17 ldreq \rx, =EP93XX_APB_PHYS_BASE @ Physical base
diff --git a/arch/arm/mach-footbridge/include/mach/debug-macro.S b/arch/arm/mach-footbridge/include/mach/debug-macro.S
index 4329b8123570..60dda1318f22 100644
--- a/arch/arm/mach-footbridge/include/mach/debug-macro.S
+++ b/arch/arm/mach-footbridge/include/mach/debug-macro.S
@@ -15,7 +15,7 @@
15 15
16#ifndef CONFIG_DEBUG_DC21285_PORT 16#ifndef CONFIG_DEBUG_DC21285_PORT
17 /* For NetWinder debugging */ 17 /* For NetWinder debugging */
18 .macro addruart,rx 18 .macro addruart, rx, tmp
19 mrc p15, 0, \rx, c1, c0 19 mrc p15, 0, \rx, c1, c0
20 tst \rx, #1 @ MMU enabled? 20 tst \rx, #1 @ MMU enabled?
21 moveq \rx, #0x7c000000 @ physical 21 moveq \rx, #0x7c000000 @ physical
@@ -32,7 +32,7 @@
32 .equ dc21285_high, ARMCSR_BASE & 0xff000000 32 .equ dc21285_high, ARMCSR_BASE & 0xff000000
33 .equ dc21285_low, ARMCSR_BASE & 0x00ffffff 33 .equ dc21285_low, ARMCSR_BASE & 0x00ffffff
34 34
35 .macro addruart,rx 35 .macro addruart, rx, tmp
36 mrc p15, 0, \rx, c1, c0 36 mrc p15, 0, \rx, c1, c0
37 tst \rx, #1 @ MMU enabled? 37 tst \rx, #1 @ MMU enabled?
38 moveq \rx, #0x42000000 38 moveq \rx, #0x42000000
diff --git a/arch/arm/mach-gemini/include/mach/debug-macro.S b/arch/arm/mach-gemini/include/mach/debug-macro.S
index d04a6eaeae14..ad477047069d 100644
--- a/arch/arm/mach-gemini/include/mach/debug-macro.S
+++ b/arch/arm/mach-gemini/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 */ 11 */
12#include <mach/hardware.h> 12#include <mach/hardware.h>
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
17 ldreq \rx, =GEMINI_UART_BASE @ physical 17 ldreq \rx, =GEMINI_UART_BASE @ physical
diff --git a/arch/arm/mach-h720x/include/mach/debug-macro.S b/arch/arm/mach-h720x/include/mach/debug-macro.S
index 6294a1344dda..a9ee8f0d48b7 100644
--- a/arch/arm/mach-h720x/include/mach/debug-macro.S
+++ b/arch/arm/mach-h720x/include/mach/debug-macro.S
@@ -14,7 +14,7 @@
14 .equ io_virt, IO_BASE 14 .equ io_virt, IO_BASE
15 .equ io_phys, IO_START 15 .equ io_phys, IO_START
16 16
17 .macro addruart,rx 17 .macro addruart, rx, tmp
18 mrc p15, 0, \rx, c1, c0 18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled? 19 tst \rx, #1 @ MMU enabled?
20 moveq \rx, #io_phys @ physical base address 20 moveq \rx, #io_phys @ physical base address
diff --git a/arch/arm/mach-integrator/include/mach/debug-macro.S b/arch/arm/mach-integrator/include/mach/debug-macro.S
index d347d659ea30..87a6888ae011 100644
--- a/arch/arm/mach-integrator/include/mach/debug-macro.S
+++ b/arch/arm/mach-integrator/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 * 11 *
12*/ 12*/
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x16000000 @ physical base address 17 moveq \rx, #0x16000000 @ physical base address
diff --git a/arch/arm/mach-iop13xx/include/mach/debug-macro.S b/arch/arm/mach-iop13xx/include/mach/debug-macro.S
index 9037d2e8557c..c9d6ba46963d 100644
--- a/arch/arm/mach-iop13xx/include/mach/debug-macro.S
+++ b/arch/arm/mach-iop13xx/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14 .macro addruart, rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ mmu enabled? 16 tst \rx, #1 @ mmu enabled?
17 moveq \rx, #0xff000000 @ physical 17 moveq \rx, #0xff000000 @ physical
diff --git a/arch/arm/mach-iop32x/include/mach/debug-macro.S b/arch/arm/mach-iop32x/include/mach/debug-macro.S
index 58b01664ffba..736afe1edd1f 100644
--- a/arch/arm/mach-iop32x/include/mach/debug-macro.S
+++ b/arch/arm/mach-iop32x/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14 .macro addruart, rx 14 .macro addruart, rx, tmp
15 mov \rx, #0xfe000000 @ physical as well as virtual 15 mov \rx, #0xfe000000 @ physical as well as virtual
16 orr \rx, \rx, #0x00800000 @ location of the UART 16 orr \rx, \rx, #0x00800000 @ location of the UART
17 .endm 17 .endm
diff --git a/arch/arm/mach-iop33x/include/mach/debug-macro.S b/arch/arm/mach-iop33x/include/mach/debug-macro.S
index a60c9ef05cc3..addb2da78422 100644
--- a/arch/arm/mach-iop33x/include/mach/debug-macro.S
+++ b/arch/arm/mach-iop33x/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14 .macro addruart, rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ mmu enabled? 16 tst \rx, #1 @ mmu enabled?
17 moveq \rx, #0xff000000 @ physical 17 moveq \rx, #0xff000000 @ physical
diff --git a/arch/arm/mach-ixp2000/include/mach/debug-macro.S b/arch/arm/mach-ixp2000/include/mach/debug-macro.S
index 904ff56d2246..6a827681680f 100644
--- a/arch/arm/mach-ixp2000/include/mach/debug-macro.S
+++ b/arch/arm/mach-ixp2000/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 * 11 *
12*/ 12*/
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0xc0000000 @ Physical base 17 moveq \rx, #0xc0000000 @ Physical base
diff --git a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S b/arch/arm/mach-ixp23xx/include/mach/debug-macro.S
index 905db3188724..a82e375465e2 100644
--- a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S
+++ b/arch/arm/mach-ixp23xx/include/mach/debug-macro.S
@@ -12,7 +12,7 @@
12 */ 12 */
13#include <mach/ixp23xx.h> 13#include <mach/ixp23xx.h>
14 14
15 .macro addruart,rx 15 .macro addruart, rx, tmp
16 mrc p15, 0, \rx, c1, c0 16 mrc p15, 0, \rx, c1, c0
17 tst \rx, #1 @ mmu enabled? 17 tst \rx, #1 @ mmu enabled?
18 ldreq \rx, =IXP23XX_PERIPHERAL_PHYS @ physical 18 ldreq \rx, =IXP23XX_PERIPHERAL_PHYS @ physical
diff --git a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S
index 7c6a6912acde..893873eb2a0d 100644
--- a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S
+++ b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S
@@ -10,7 +10,7 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11*/ 11*/
12 12
13 .macro addruart,rx 13 .macro addruart, rx, tmp
14 mrc p15, 0, \rx, c1, c0 14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled? 15 tst \rx, #1 @ MMU enabled?
16 moveq \rx, #0xc8000000 16 moveq \rx, #0xc8000000
diff --git a/arch/arm/mach-kirkwood/include/mach/debug-macro.S b/arch/arm/mach-kirkwood/include/mach/debug-macro.S
index a4a55c199d77..d0606774dea7 100644
--- a/arch/arm/mach-kirkwood/include/mach/debug-macro.S
+++ b/arch/arm/mach-kirkwood/include/mach/debug-macro.S
@@ -8,7 +8,7 @@
8 8
9#include <mach/bridge-regs.h> 9#include <mach/bridge-regs.h>
10 10
11 .macro addruart,rx 11 .macro addruart, rx, tmp
12 mrc p15, 0, \rx, c1, c0 12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled? 13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =KIRKWOOD_REGS_PHYS_BASE 14 ldreq \rx, =KIRKWOOD_REGS_PHYS_BASE
diff --git a/arch/arm/mach-ks8695/include/mach/debug-macro.S b/arch/arm/mach-ks8695/include/mach/debug-macro.S
index 3782c3559497..cf2095da2372 100644
--- a/arch/arm/mach-ks8695/include/mach/debug-macro.S
+++ b/arch/arm/mach-ks8695/include/mach/debug-macro.S
@@ -14,7 +14,7 @@
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/regs-uart.h> 15#include <mach/regs-uart.h>
16 16
17 .macro addruart, rx 17 .macro addruart, rx, tmp
18 mrc p15, 0, \rx, c1, c0 18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled? 19 tst \rx, #1 @ MMU enabled?
20 ldreq \rx, =KS8695_UART_PA @ physical base address 20 ldreq \rx, =KS8695_UART_PA @ physical base address
diff --git a/arch/arm/mach-l7200/include/mach/debug-macro.S b/arch/arm/mach-l7200/include/mach/debug-macro.S
index 34eed2a63e69..b69ed344c7c9 100644
--- a/arch/arm/mach-l7200/include/mach/debug-macro.S
+++ b/arch/arm/mach-l7200/include/mach/debug-macro.S
@@ -14,7 +14,7 @@
14 .equ io_virt, IO_BASE 14 .equ io_virt, IO_BASE
15 .equ io_phys, IO_START 15 .equ io_phys, IO_START
16 16
17 .macro addruart,rx 17 .macro addruart, rx, tmp
18 mrc p15, 0, \rx, c1, c0 18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled? 19 tst \rx, #1 @ MMU enabled?
20 moveq \rx, #io_phys @ physical base address 20 moveq \rx, #io_phys @ physical base address
diff --git a/arch/arm/mach-lh7a40x/include/mach/debug-macro.S b/arch/arm/mach-lh7a40x/include/mach/debug-macro.S
index 85141ed5383d..c0dcbbba22ba 100644
--- a/arch/arm/mach-lh7a40x/include/mach/debug-macro.S
+++ b/arch/arm/mach-lh7a40x/include/mach/debug-macro.S
@@ -14,7 +14,7 @@
14 @ It is not known if this will be appropriate for every 40x 14 @ It is not known if this will be appropriate for every 40x
15 @ board. 15 @ board.
16 16
17 .macro addruart,rx 17 .macro addruart, rx, tmp
18 mrc p15, 0, \rx, c1, c0 18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled? 19 tst \rx, #1 @ MMU enabled?
20 mov \rx, #0x00000700 @ offset from base 20 mov \rx, #0x00000700 @ offset from base
diff --git a/arch/arm/mach-loki/include/mach/debug-macro.S b/arch/arm/mach-loki/include/mach/debug-macro.S
index a8c20bd2f951..3136c913a92c 100644
--- a/arch/arm/mach-loki/include/mach/debug-macro.S
+++ b/arch/arm/mach-loki/include/mach/debug-macro.S
@@ -8,7 +8,7 @@
8 8
9#include <mach/loki.h> 9#include <mach/loki.h>
10 10
11 .macro addruart,rx 11 .macro addruart, rx, tmp
12 mrc p15, 0, \rx, c1, c0 12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled? 13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =LOKI_REGS_PHYS_BASE 14 ldreq \rx, =LOKI_REGS_PHYS_BASE
diff --git a/arch/arm/mach-mmp/include/mach/debug-macro.S b/arch/arm/mach-mmp/include/mach/debug-macro.S
index a850f87de51d..76deff238e1c 100644
--- a/arch/arm/mach-mmp/include/mach/debug-macro.S
+++ b/arch/arm/mach-mmp/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 11
12#include <mach/addr-map.h> 12#include <mach/addr-map.h>
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
17 ldreq \rx, =APB_PHYS_BASE @ physical 17 ldreq \rx, =APB_PHYS_BASE @ physical
diff --git a/arch/arm/mach-msm/include/mach/debug-macro.S b/arch/arm/mach-msm/include/mach/debug-macro.S
index d48747ebcd3d..528750f307e9 100644
--- a/arch/arm/mach-msm/include/mach/debug-macro.S
+++ b/arch/arm/mach-msm/include/mach/debug-macro.S
@@ -20,7 +20,7 @@
20#include <mach/msm_iomap.h> 20#include <mach/msm_iomap.h>
21 21
22#ifdef CONFIG_MSM_DEBUG_UART 22#ifdef CONFIG_MSM_DEBUG_UART
23 .macro addruart,rx 23 .macro addruart, rx, tmp
24 @ see if the MMU is enabled and select appropriate base address 24 @ see if the MMU is enabled and select appropriate base address
25 mrc p15, 0, \rx, c1, c0 25 mrc p15, 0, \rx, c1, c0
26 tst \rx, #1 26 tst \rx, #1
@@ -40,7 +40,7 @@
40 beq 1001b 40 beq 1001b
41 .endm 41 .endm
42#else 42#else
43 .macro addruart,rx 43 .macro addruart, rx, tmp
44 .endm 44 .endm
45 45
46 .macro senduart,rd,rx 46 .macro senduart,rd,rx
diff --git a/arch/arm/mach-mv78xx0/include/mach/debug-macro.S b/arch/arm/mach-mv78xx0/include/mach/debug-macro.S
index a06442fbd341..cd81689c4621 100644
--- a/arch/arm/mach-mv78xx0/include/mach/debug-macro.S
+++ b/arch/arm/mach-mv78xx0/include/mach/debug-macro.S
@@ -8,7 +8,7 @@
8 8
9#include <mach/mv78xx0.h> 9#include <mach/mv78xx0.h>
10 10
11 .macro addruart,rx 11 .macro addruart, rx, tmp
12 mrc p15, 0, \rx, c1, c0 12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled? 13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =MV78XX0_REGS_PHYS_BASE 14 ldreq \rx, =MV78XX0_REGS_PHYS_BASE
diff --git a/arch/arm/mach-netx/include/mach/debug-macro.S b/arch/arm/mach-netx/include/mach/debug-macro.S
index 11b9d5b46390..e96339e71d88 100644
--- a/arch/arm/mach-netx/include/mach/debug-macro.S
+++ b/arch/arm/mach-netx/include/mach/debug-macro.S
@@ -13,7 +13,7 @@
13 13
14#include "hardware.h" 14#include "hardware.h"
15 15
16 .macro addruart,rx 16 .macro addruart, rx, tmp
17 mrc p15, 0, \rx, c1, c0 17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled? 18 tst \rx, #1 @ MMU enabled?
19 moveq \rx, #0x00100000 @ physical 19 moveq \rx, #0x00100000 @ physical
diff --git a/arch/arm/mach-nomadik/include/mach/debug-macro.S b/arch/arm/mach-nomadik/include/mach/debug-macro.S
index e876990e1569..4f92acfba954 100644
--- a/arch/arm/mach-nomadik/include/mach/debug-macro.S
+++ b/arch/arm/mach-nomadik/include/mach/debug-macro.S
@@ -10,7 +10,7 @@
10 * 10 *
11*/ 11*/
12 12
13 .macro addruart,rx 13 .macro addruart, rx, tmp
14 mrc p15, 0, \rx, c1, c0 14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled? 15 tst \rx, #1 @ MMU enabled?
16 moveq \rx, #0x10000000 @ physical base address 16 moveq \rx, #0x10000000 @ physical base address
diff --git a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S
index c9530fba00aa..0859336a8e6d 100644
--- a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S
+++ b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 11
12#include <mach/regs-board-a9m9750dev.h> 12#include <mach/regs-board-a9m9750dev.h>
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 16 tst \rx, #1
17 ldreq \rx, =NS9XXX_CSxSTAT_PHYS(0) 17 ldreq \rx, =NS9XXX_CSxSTAT_PHYS(0)
diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S
index aedb746fc33c..b6d9584544b4 100644
--- a/arch/arm/mach-omap1/include/mach/debug-macro.S
+++ b/arch/arm/mach-omap1/include/mach/debug-macro.S
@@ -11,18 +11,80 @@
11 * 11 *
12*/ 12*/
13 13
14 .macro addruart,rx 14#include <linux/serial_reg.h>
15
16#include <plat/serial.h>
17
18 .pushsection .data
19omap_uart_phys: .word 0x0
20omap_uart_virt: .word 0x0
21 .popsection
22
23 /*
24 * Note that this code won't work if the bootloader passes
25 * a wrong machine ID number in r1. To debug, just hardcode
26 * the desired UART phys and virt addresses temporarily into
27 * the omap_uart_phys and omap_uart_virt above.
28 */
29 .macro addruart, rx, tmp
30
31 /* Use omap_uart_phys/virt if already configured */
329: mrc p15, 0, \rx, c1, c0
33 tst \rx, #1 @ MMU enabled?
34 ldreq \rx, =omap_uart_phys @ physical base address
35 ldrne \rx, =omap_uart_virt @ virtual base
36 ldr \rx, [\rx, #0]
37 cmp \rx, #0 @ is port configured?
38 bne 99f @ already configured
39
40 /* Check 7XX UART1 scratchpad register for uart to use */
41 mrc p15, 0, \rx, c1, c0
42 tst \rx, #1 @ MMU enabled?
43 moveq \rx, #0xff000000 @ physical base address
44 movne \rx, #0xfe000000 @ virtual base
45 orr \rx, \rx, #0x00fb0000 @ OMAP1UART1
46 ldrb \rx, [\rx, #(UART_SCR << OMAP7XX_PORT_SHIFT)]
47 cmp \rx, #0 @ anything in 7XX scratchpad?
48 bne 10f @ found 7XX uart
49
50 /* Check 15xx/16xx UART1 scratchpad register for uart to use */
15 mrc p15, 0, \rx, c1, c0 51 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 52 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0xff000000 @ physical base address 53 moveq \rx, #0xff000000 @ physical base address
18 movne \rx, #0xfe000000 @ virtual base 54 movne \rx, #0xfe000000 @ virtual base
19 orr \rx, \rx, #0x00fb0000 55 orr \rx, \rx, #0x00fb0000 @ OMAP1UART1
20#ifdef CONFIG_OMAP_LL_DEBUG_UART3 56 ldrb \rx, [\rx, #(UART_SCR << OMAP_PORT_SHIFT)]
21 orr \rx, \rx, #0x00009000 @ UART 3 57
22#endif 58 /* Select the UART to use based on the UART1 scratchpad value */
23#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3) 5910: cmp \rx, #0 @ no port configured?
24 orr \rx, \rx, #0x00000800 @ UART 2 & 3 60 beq 11f @ if none, try to use UART1
25#endif 61 cmp \rx, #OMAP1UART1
62 beq 11f @ configure OMAP1UART1
63 cmp \rx, #OMAP1UART2
64 beq 12f @ configure OMAP1UART2
65 cmp \rx, #OMAP1UART3
66 beq 13f @ configure OMAP2UART3
67
68 /* Configure the UART offset from the phys/virt base */
6911: mov \rx, #0x00fb0000 @ OMAP1UART1
70 b 98f
7112: mov \rx, #0x00fb0000 @ OMAP1UART1
72 orr \rx, \rx, #0x00000800 @ OMAP1UART2
73 b 98f
7413: mov \rx, #0x00fb0000 @ OMAP1UART1
75 orr \rx, \rx, #0x00000800 @ OMAP1UART2
76 orr \rx, \rx, #0x00009000 @ OMAP1UART3
77
78 /* Store both phys and virt address for the uart */
7998: add \rx, \rx, #0xff000000 @ phys base
80 ldr \tmp, =omap_uart_phys
81 str \rx, [\tmp, #0]
82 sub \rx, \rx, #0xff000000 @ phys base
83 add \rx, \rx, #0xfe000000 @ virt base
84 ldr \tmp, =omap_uart_virt
85 str \rx, [\tmp, #0]
86 b 9b
8799:
26 .endm 88 .endm
27 89
28 .macro senduart,rd,rx 90 .macro senduart,rd,rx
@@ -30,13 +92,13 @@
30 .endm 92 .endm
31 93
32 .macro busyuart,rd,rx 94 .macro busyuart,rd,rx
331001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends 951001: ldrb \rd, [\rx, #(UART_LSR << OMAP_PORT_SHIFT)]
34 and \rd, \rd, #0x60 96 and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
35 teq \rd, #0x60 97 teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
36 beq 1002f 98 beq 1002f
37 ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only 99 ldrb \rd, [\rx, #(UART_LSR << OMAP7XX_PORT_SHIFT)]
38 and \rd, \rd, #0x60 100 and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
39 teq \rd, #0x60 101 teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
40 bne 1001b 102 bne 1001b
411002: 1031002:
42 .endm 104 .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 e9f255df9163..4a63a2ea484d 100644
--- a/arch/arm/mach-omap2/include/mach/debug-macro.S
+++ b/arch/arm/mach-omap2/include/mach/debug-macro.S
@@ -11,32 +11,107 @@
11 * 11 *
12*/ 12*/
13 13
14 .macro addruart,rx 14#include <linux/serial_reg.h>
15
16#include <plat/serial.h>
17
18#define UART_OFFSET(addr) ((addr) & 0x00ffffff)
19
20 .pushsection .data
21omap_uart_phys: .word 0
22omap_uart_virt: .word 0
23omap_uart_lsr: .word 0
24 .popsection
25
26 /*
27 * Note that this code won't work if the bootloader passes
28 * a wrong machine ID number in r1. To debug, just hardcode
29 * the desired UART phys and virt addresses temporarily into
30 * the omap_uart_phys and omap_uart_virt above.
31 */
32 .macro addruart, rx, tmp
33
34 /* Use omap_uart_phys/virt if already configured */
3510: mrc p15, 0, \rx, c1, c0
36 tst \rx, #1 @ MMU enabled?
37 ldreq \rx, =omap_uart_phys @ physical base address
38 ldrne \rx, =omap_uart_virt @ virtual base address
39 ldr \rx, [\rx, #0]
40 cmp \rx, #0 @ is port configured?
41 bne 99f @ already configured
42
43 /* Check UART1 scratchpad register for uart to use */
15 mrc p15, 0, \rx, c1, c0 44 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 45 tst \rx, #1 @ MMU enabled?
17#ifdef CONFIG_ARCH_OMAP2
18 moveq \rx, #0x48000000 @ physical base address 46 moveq \rx, #0x48000000 @ physical base address
19 movne \rx, #0xfa000000 @ virtual base 47 movne \rx, #0xfa000000 @ virtual base
20 orr \rx, \rx, #0x0006a000 48 orr \rx, \rx, #0x0006a000 @ uart1 on omap2/3/4
21#ifdef CONFIG_OMAP_LL_DEBUG_UART2 49 ldrb \rx, [\rx, #(UART_SCR << OMAP_PORT_SHIFT)] @ scratchpad
22 add \rx, \rx, #0x00002000 @ UART 2 50
23#endif 51 /* Select the UART to use based on the UART1 scratchpad value */
24#ifdef CONFIG_OMAP_LL_DEBUG_UART3 52 cmp \rx, #0 @ no port configured?
25 add \rx, \rx, #0x00004000 @ UART 3 53 beq 21f @ if none, try to use UART1
26#endif 54 cmp \rx, #OMAP2UART1 @ OMAP2/3/4UART1
27 55 beq 21f @ configure OMAP2/3/4UART1
28#elif defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) 56 cmp \rx, #OMAP2UART2 @ OMAP2/3/4UART2
29 moveq \rx, #0x48000000 @ physical base address 57 beq 22f @ configure OMAP2/3/4UART2
30 movne \rx, #0xfa000000 @ virtual base 58 cmp \rx, #OMAP2UART3 @ only on 24xx
31 orr \rx, \rx, #0x0006a000 59 beq 23f @ configure OMAP2UART3
32#ifdef CONFIG_OMAP_LL_DEBUG_UART2 60 cmp \rx, #OMAP3UART3 @ only on 34xx
33 add \rx, \rx, #0x00002000 @ UART 2 61 beq 33f @ configure OMAP3UART3
34#endif 62 cmp \rx, #OMAP4UART3 @ only on 44xx
35#ifdef CONFIG_OMAP_LL_DEBUG_UART3 63 beq 43f @ configure OMAP4UART3
36 add \rx, \rx, #0x00fb0000 @ UART 3 64 cmp \rx, #OMAP3UART4 @ only on 36xx
37 add \rx, \rx, #0x00006000 65 beq 34f @ configure OMAP3UART4
38#endif 66 cmp \rx, #OMAP4UART4 @ only on 44xx
39#endif 67 beq 44f @ configure OMAP4UART4
68 cmp \rx, #ZOOM_UART @ only on zoom2/3
69 beq 95f @ configure ZOOM_UART
70
71 /* Configure the UART offset from the phys/virt base */
7221: mov \rx, #UART_OFFSET(OMAP2_UART1_BASE) @ omap2/3/4
73 b 98f
7422: mov \rx, #UART_OFFSET(OMAP2_UART2_BASE) @ omap2/3/4
75 b 98f
7623: mov \rx, #UART_OFFSET(OMAP2_UART3_BASE)
77 b 98f
7833: mov \rx, #UART_OFFSET(OMAP3_UART1_BASE)
79 add \rx, \rx, #0x00fb0000
80 add \rx, \rx, #0x00006000 @ OMAP3_UART3_BASE
81 b 98f
8234: mov \rx, #UART_OFFSET(OMAP3_UART1_BASE)
83 add \rx, \rx, #0x00fb0000
84 add \rx, \rx, #0x00028000 @ OMAP3_UART4_BASE
85 b 98f
8643: mov \rx, #UART_OFFSET(OMAP4_UART3_BASE)
87 b 98f
8844: mov \rx, #UART_OFFSET(OMAP4_UART4_BASE)
89 b 98f
9095: mov \rx, #ZOOM_UART_BASE
91 ldr \tmp, =omap_uart_phys
92 str \rx, [\tmp, #0]
93 mov \rx, #ZOOM_UART_VIRT
94 ldr \tmp, =omap_uart_virt
95 str \rx, [\tmp, #0]
96 mov \rx, #(UART_LSR << ZOOM_PORT_SHIFT)
97 ldr \tmp, =omap_uart_lsr
98 str \rx, [\tmp, #0]
99 b 10b
100
101 /* Store both phys and virt address for the uart */
10298: add \rx, \rx, #0x48000000 @ phys base
103 ldr \tmp, =omap_uart_phys
104 str \rx, [\tmp, #0]
105 sub \rx, \rx, #0x48000000 @ phys base
106 add \rx, \rx, #0xfa000000 @ virt base
107 ldr \tmp, =omap_uart_virt
108 str \rx, [\tmp, #0]
109 mov \rx, #(UART_LSR << OMAP_PORT_SHIFT)
110 ldr \tmp, =omap_uart_lsr
111 str \rx, [\tmp, #0]
112
113 b 10b
11499:
40 .endm 115 .endm
41 116
42 .macro senduart,rd,rx 117 .macro senduart,rd,rx
@@ -44,15 +119,12 @@
44 .endm 119 .endm
45 120
46 .macro busyuart,rd,rx 121 .macro busyuart,rd,rx
471001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends 1221001: ldr \rd, =omap_uart_lsr
48 and \rd, \rd, #0x60 123 ldr \rd, [\rd, #0]
49 teq \rd, #0x60 124 ldrb \rd, [\rx, \rd]
50 beq 1002f 125 and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
51 ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only 126 teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
52 and \rd, \rd, #0x60
53 teq \rd, #0x60
54 bne 1001b 127 bne 1001b
551002:
56 .endm 128 .endm
57 129
58 .macro waituart,rd,rx 130 .macro waituart,rd,rx
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index e10a02df6e1d..e657674d5490 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -80,7 +80,6 @@ static LIST_HEAD(uart_list);
80 80
81static struct plat_serial8250_port serial_platform_data0[] = { 81static struct plat_serial8250_port serial_platform_data0[] = {
82 { 82 {
83 .mapbase = OMAP_UART1_BASE,
84 .irq = 72, 83 .irq = 72,
85 .flags = UPF_BOOT_AUTOCONF, 84 .flags = UPF_BOOT_AUTOCONF,
86 .iotype = UPIO_MEM, 85 .iotype = UPIO_MEM,
@@ -93,7 +92,6 @@ static struct plat_serial8250_port serial_platform_data0[] = {
93 92
94static struct plat_serial8250_port serial_platform_data1[] = { 93static struct plat_serial8250_port serial_platform_data1[] = {
95 { 94 {
96 .mapbase = OMAP_UART2_BASE,
97 .irq = 73, 95 .irq = 73,
98 .flags = UPF_BOOT_AUTOCONF, 96 .flags = UPF_BOOT_AUTOCONF,
99 .iotype = UPIO_MEM, 97 .iotype = UPIO_MEM,
@@ -106,7 +104,6 @@ static struct plat_serial8250_port serial_platform_data1[] = {
106 104
107static struct plat_serial8250_port serial_platform_data2[] = { 105static struct plat_serial8250_port serial_platform_data2[] = {
108 { 106 {
109 .mapbase = OMAP_UART3_BASE,
110 .irq = 74, 107 .irq = 74,
111 .flags = UPF_BOOT_AUTOCONF, 108 .flags = UPF_BOOT_AUTOCONF,
112 .iotype = UPIO_MEM, 109 .iotype = UPIO_MEM,
@@ -120,7 +117,6 @@ static struct plat_serial8250_port serial_platform_data2[] = {
120#ifdef CONFIG_ARCH_OMAP4 117#ifdef CONFIG_ARCH_OMAP4
121static struct plat_serial8250_port serial_platform_data3[] = { 118static struct plat_serial8250_port serial_platform_data3[] = {
122 { 119 {
123 .mapbase = OMAP_UART4_BASE,
124 .irq = 70, 120 .irq = 70,
125 .flags = UPF_BOOT_AUTOCONF, 121 .flags = UPF_BOOT_AUTOCONF,
126 .iotype = UPIO_MEM, 122 .iotype = UPIO_MEM,
@@ -131,6 +127,17 @@ static struct plat_serial8250_port serial_platform_data3[] = {
131 } 127 }
132}; 128};
133#endif 129#endif
130
131void __init omap2_set_globals_uart(struct omap_globals *omap2_globals)
132{
133 serial_platform_data0[0].mapbase = omap2_globals->uart1_phys;
134 serial_platform_data1[0].mapbase = omap2_globals->uart2_phys;
135 serial_platform_data2[0].mapbase = omap2_globals->uart3_phys;
136#ifdef CONFIG_ARCH_OMAP4
137 serial_platform_data3[0].mapbase = omap2_globals->uart4_phys;
138#endif
139}
140
134static inline unsigned int __serial_read_reg(struct uart_port *up, 141static inline unsigned int __serial_read_reg(struct uart_port *up,
135 int offset) 142 int offset)
136{ 143{
diff --git a/arch/arm/mach-orion5x/include/mach/debug-macro.S b/arch/arm/mach-orion5x/include/mach/debug-macro.S
index c7f808bfe272..91e0e39bb23f 100644
--- a/arch/arm/mach-orion5x/include/mach/debug-macro.S
+++ b/arch/arm/mach-orion5x/include/mach/debug-macro.S
@@ -10,7 +10,7 @@
10 10
11#include <mach/orion5x.h> 11#include <mach/orion5x.h>
12 12
13 .macro addruart,rx 13 .macro addruart, rx, tmp
14 mrc p15, 0, \rx, c1, c0 14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled? 15 tst \rx, #1 @ MMU enabled?
16 ldreq \rx, =ORION5X_REGS_PHYS_BASE 16 ldreq \rx, =ORION5X_REGS_PHYS_BASE
diff --git a/arch/arm/mach-pnx4008/include/mach/debug-macro.S b/arch/arm/mach-pnx4008/include/mach/debug-macro.S
index 6d1407f319f8..6ca8bd30bf46 100644
--- a/arch/arm/mach-pnx4008/include/mach/debug-macro.S
+++ b/arch/arm/mach-pnx4008/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 * 11 *
12*/ 12*/
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
17 mov \rx, #0x00090000 17 mov \rx, #0x00090000
diff --git a/arch/arm/mach-pxa/include/mach/debug-macro.S b/arch/arm/mach-pxa/include/mach/debug-macro.S
index 55d6a175ab19..01cf81393fe2 100644
--- a/arch/arm/mach-pxa/include/mach/debug-macro.S
+++ b/arch/arm/mach-pxa/include/mach/debug-macro.S
@@ -13,7 +13,7 @@
13 13
14#include "hardware.h" 14#include "hardware.h"
15 15
16 .macro addruart,rx 16 .macro addruart, rx, tmp
17 mrc p15, 0, \rx, c1, c0 17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled? 18 tst \rx, #1 @ MMU enabled?
19 moveq \rx, #0x40000000 @ physical 19 moveq \rx, #0x40000000 @ physical
diff --git a/arch/arm/mach-realview/include/mach/debug-macro.S b/arch/arm/mach-realview/include/mach/debug-macro.S
index 932d8af18062..86622289b74e 100644
--- a/arch/arm/mach-realview/include/mach/debug-macro.S
+++ b/arch/arm/mach-realview/include/mach/debug-macro.S
@@ -33,7 +33,7 @@
33#error "Unknown RealView platform" 33#error "Unknown RealView platform"
34#endif 34#endif
35 35
36 .macro addruart,rx 36 .macro addruart, rx, tmp
37 mrc p15, 0, \rx, c1, c0 37 mrc p15, 0, \rx, c1, c0
38 tst \rx, #1 @ MMU enabled? 38 tst \rx, #1 @ MMU enabled?
39 moveq \rx, #0x10000000 39 moveq \rx, #0x10000000
diff --git a/arch/arm/mach-rpc/include/mach/debug-macro.S b/arch/arm/mach-rpc/include/mach/debug-macro.S
index b2a939ffdcde..6fc8d66395dc 100644
--- a/arch/arm/mach-rpc/include/mach/debug-macro.S
+++ b/arch/arm/mach-rpc/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 * 11 *
12*/ 12*/
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x03000000 17 moveq \rx, #0x03000000
diff --git a/arch/arm/mach-s3c2410/include/mach/debug-macro.S b/arch/arm/mach-s3c2410/include/mach/debug-macro.S
index 4c29a89ad077..0eef78b4a6ed 100644
--- a/arch/arm/mach-s3c2410/include/mach/debug-macro.S
+++ b/arch/arm/mach-s3c2410/include/mach/debug-macro.S
@@ -19,7 +19,7 @@
19#define S3C2410_UART1_OFF (0x4000) 19#define S3C2410_UART1_OFF (0x4000)
20#define SHIFT_2440TXF (14-9) 20#define SHIFT_2440TXF (14-9)
21 21
22 .macro addruart, rx 22 .macro addruart, rx, tmp
23 mrc p15, 0, \rx, c1, c0 23 mrc p15, 0, \rx, c1, c0
24 tst \rx, #1 24 tst \rx, #1
25 ldreq \rx, = S3C24XX_PA_UART 25 ldreq \rx, = S3C24XX_PA_UART
diff --git a/arch/arm/mach-s3c24a0/include/mach/debug-macro.S b/arch/arm/mach-s3c24a0/include/mach/debug-macro.S
index f0ef0ab475f6..239476b81f3b 100644
--- a/arch/arm/mach-s3c24a0/include/mach/debug-macro.S
+++ b/arch/arm/mach-s3c24a0/include/mach/debug-macro.S
@@ -10,7 +10,7 @@
10#include <mach/map.h> 10#include <mach/map.h>
11#include <plat/regs-serial.h> 11#include <plat/regs-serial.h>
12 12
13 .macro addruart, rx 13 .macro addruart, rx, tmp
14 mrc p15, 0, \rx, c1, c0 14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 15 tst \rx, #1
16 ldreq \rx, = S3C24XX_PA_UART 16 ldreq \rx, = S3C24XX_PA_UART
diff --git a/arch/arm/mach-s3c6400/include/mach/debug-macro.S b/arch/arm/mach-s3c6400/include/mach/debug-macro.S
index b18ac5266dfc..5c88875d6a3f 100644
--- a/arch/arm/mach-s3c6400/include/mach/debug-macro.S
+++ b/arch/arm/mach-s3c6400/include/mach/debug-macro.S
@@ -21,7 +21,7 @@
21 * aligned and add in the offset when we load the value here. 21 * aligned and add in the offset when we load the value here.
22 */ 22 */
23 23
24 .macro addruart, rx 24 .macro addruart, rx, tmp
25 mrc p15, 0, \rx, c1, c0 25 mrc p15, 0, \rx, c1, c0
26 tst \rx, #1 26 tst \rx, #1
27 ldreq \rx, = S3C_PA_UART 27 ldreq \rx, = S3C_PA_UART
diff --git a/arch/arm/mach-s5pc100/include/mach/debug-macro.S b/arch/arm/mach-s5pc100/include/mach/debug-macro.S
index 9d142ccf654b..e181f5789482 100644
--- a/arch/arm/mach-s5pc100/include/mach/debug-macro.S
+++ b/arch/arm/mach-s5pc100/include/mach/debug-macro.S
@@ -22,7 +22,7 @@
22 * aligned and add in the offset when we load the value here. 22 * aligned and add in the offset when we load the value here.
23 */ 23 */
24 24
25 .macro addruart, rx 25 .macro addruart, rx, tmp
26 mrc p15, 0, \rx, c1, c0 26 mrc p15, 0, \rx, c1, c0
27 tst \rx, #1 27 tst \rx, #1
28 ldreq \rx, = S3C_PA_UART 28 ldreq \rx, = S3C_PA_UART
diff --git a/arch/arm/mach-sa1100/include/mach/debug-macro.S b/arch/arm/mach-sa1100/include/mach/debug-macro.S
index 1f0634d92702..336adccea542 100644
--- a/arch/arm/mach-sa1100/include/mach/debug-macro.S
+++ b/arch/arm/mach-sa1100/include/mach/debug-macro.S
@@ -12,7 +12,7 @@
12*/ 12*/
13#include <mach/hardware.h> 13#include <mach/hardware.h>
14 14
15 .macro addruart,rx 15 .macro addruart, rx, tmp
16 mrc p15, 0, \rx, c1, c0 16 mrc p15, 0, \rx, c1, c0
17 tst \rx, #1 @ MMU enabled? 17 tst \rx, #1 @ MMU enabled?
18 moveq \rx, #0x80000000 @ physical base address 18 moveq \rx, #0x80000000 @ physical base address
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S
index f97a7626bd58..50f071c5bf4d 100644
--- a/arch/arm/mach-shark/include/mach/debug-macro.S
+++ b/arch/arm/mach-shark/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 * 11 *
12*/ 12*/
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mov \rx, #0xe0000000 15 mov \rx, #0xe0000000
16 orr \rx, \rx, #0x000003f8 16 orr \rx, \rx, #0x000003f8
17 .endm 17 .endm
diff --git a/arch/arm/mach-u300/include/mach/debug-macro.S b/arch/arm/mach-u300/include/mach/debug-macro.S
index f3a1cbbeeab3..ca4a028c2661 100644
--- a/arch/arm/mach-u300/include/mach/debug-macro.S
+++ b/arch/arm/mach-u300/include/mach/debug-macro.S
@@ -10,7 +10,7 @@
10 */ 10 */
11#include <mach/hardware.h> 11#include <mach/hardware.h>
12 12
13 .macro addruart,rx 13 .macro addruart, rx, tmp
14 /* If we move the adress using MMU, use this. */ 14 /* If we move the adress using MMU, use this. */
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S
index 8f21b6a95dce..494408b96785 100644
--- a/arch/arm/mach-ux500/include/mach/debug-macro.S
+++ b/arch/arm/mach-ux500/include/mach/debug-macro.S
@@ -8,7 +8,7 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 */ 10 */
11 .macro addruart,rx 11 .macro addruart, rx, tmp
12 mrc p15, 0, \rx, c1, c0 12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @MMU enabled? 13 tst \rx, #1 @MMU enabled?
14 moveq \rx, #0x80000000 @MMU off, Physical address 14 moveq \rx, #0x80000000 @MMU off, Physical address
diff --git a/arch/arm/mach-versatile/include/mach/debug-macro.S b/arch/arm/mach-versatile/include/mach/debug-macro.S
index b4ac00eacf68..6fea7199c626 100644
--- a/arch/arm/mach-versatile/include/mach/debug-macro.S
+++ b/arch/arm/mach-versatile/include/mach/debug-macro.S
@@ -11,7 +11,7 @@
11 * 11 *
12*/ 12*/
13 13
14 .macro addruart,rx 14 .macro addruart, rx, tmp
15 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x10000000 17 moveq \rx, #0x10000000
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S
index 15b2b148a105..5a6ae1b9e1e8 100644
--- a/arch/arm/plat-mxc/include/mach/debug-macro.S
+++ b/arch/arm/plat-mxc/include/mach/debug-macro.S
@@ -52,7 +52,7 @@
52#define UART_PADDR MXC91231_UART2_BASE_ADDR 52#define UART_PADDR MXC91231_UART2_BASE_ADDR
53#define UART_VADDR MXC91231_AIPS1_IO_ADDRESS(MXC91231_UART2_BASE_ADDR) 53#define UART_VADDR MXC91231_AIPS1_IO_ADDRESS(MXC91231_UART2_BASE_ADDR)
54#endif 54#endif
55 .macro addruart,rx 55 .macro addruart, rx, tmp
56 mrc p15, 0, \rx, c1, c0 56 mrc p15, 0, \rx, c1, c0
57 tst \rx, #1 @ MMU enabled? 57 tst \rx, #1 @ MMU enabled?
58 ldreq \rx, =UART_PADDR @ physical 58 ldreq \rx, =UART_PADDR @ physical
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index e2ea04a4c8a1..484d6a91524f 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -141,25 +141,6 @@ config OMAP_DM_TIMER
141 help 141 help
142 Select this option if you want to use OMAP Dual-Mode timers. 142 Select this option if you want to use OMAP Dual-Mode timers.
143 143
144choice
145 prompt "Low-level debug console UART"
146 depends on ARCH_OMAP
147 default OMAP_LL_DEBUG_NONE
148
149config OMAP_LL_DEBUG_UART1
150 bool "UART1"
151
152config OMAP_LL_DEBUG_UART2
153 bool "UART2"
154
155config OMAP_LL_DEBUG_UART3
156 bool "UART3"
157
158config OMAP_LL_DEBUG_NONE
159 bool "None"
160
161endchoice
162
163config OMAP_SERIAL_WAKE 144config OMAP_SERIAL_WAKE
164 bool "Enable wake-up events for serial ports" 145 bool "Enable wake-up events for serial ports"
165 depends on ARCH_OMAP1 && OMAP_MUX 146 depends on ARCH_OMAP1 && OMAP_MUX
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index dddc0273bc8b..7cbc0a214aab 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
@@ -245,6 +246,7 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals)
245 omap2_set_globals_sdrc(omap2_globals); 246 omap2_set_globals_sdrc(omap2_globals);
246 omap2_set_globals_control(omap2_globals); 247 omap2_set_globals_control(omap2_globals);
247 omap2_set_globals_prcm(omap2_globals); 248 omap2_set_globals_prcm(omap2_globals);
249 omap2_set_globals_uart(omap2_globals);
248} 250}
249 251
250#endif 252#endif
@@ -259,6 +261,9 @@ static struct omap_globals omap242x_globals = {
259 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP2420_CTRL_BASE), 261 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP2420_CTRL_BASE),
260 .prm = OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE), 262 .prm = OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE),
261 .cm = OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE), 263 .cm = OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE),
264 .uart1_phys = OMAP2_UART1_BASE,
265 .uart2_phys = OMAP2_UART2_BASE,
266 .uart3_phys = OMAP2_UART3_BASE,
262}; 267};
263 268
264void __init omap2_set_globals_242x(void) 269void __init omap2_set_globals_242x(void)
@@ -277,6 +282,9 @@ static struct omap_globals omap243x_globals = {
277 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE), 282 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE),
278 .prm = OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE), 283 .prm = OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE),
279 .cm = OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE), 284 .cm = OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE),
285 .uart1_phys = OMAP2_UART1_BASE,
286 .uart2_phys = OMAP2_UART2_BASE,
287 .uart3_phys = OMAP2_UART3_BASE,
280}; 288};
281 289
282void __init omap2_set_globals_243x(void) 290void __init omap2_set_globals_243x(void)
@@ -285,9 +293,9 @@ void __init omap2_set_globals_243x(void)
285} 293}
286#endif 294#endif
287 295
288#if defined(CONFIG_ARCH_OMAP3430) 296#if defined(CONFIG_ARCH_OMAP3)
289 297
290static struct omap_globals omap343x_globals = { 298static struct omap_globals omap3_globals = {
291 .class = OMAP343X_CLASS, 299 .class = OMAP343X_CLASS,
292 .tap = OMAP2_L4_IO_ADDRESS(0x4830A000), 300 .tap = OMAP2_L4_IO_ADDRESS(0x4830A000),
293 .sdrc = OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE), 301 .sdrc = OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE),
@@ -295,11 +303,21 @@ static struct omap_globals omap343x_globals = {
295 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE), 303 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE),
296 .prm = OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE), 304 .prm = OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE),
297 .cm = OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE), 305 .cm = OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE),
306 .uart1_phys = OMAP3_UART1_BASE,
307 .uart2_phys = OMAP3_UART2_BASE,
308 .uart3_phys = OMAP3_UART3_BASE,
298}; 309};
299 310
300void __init omap2_set_globals_343x(void) 311void __init omap2_set_globals_343x(void)
301{ 312{
302 __omap2_set_globals(&omap343x_globals); 313 __omap2_set_globals(&omap3_globals);
314}
315
316void __init omap2_set_globals_36xx(void)
317{
318 omap3_globals.uart4_phys = OMAP3_UART4_BASE;
319
320 __omap2_set_globals(&omap3_globals);
303} 321}
304#endif 322#endif
305 323
@@ -311,6 +329,10 @@ static struct omap_globals omap4_globals = {
311 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE), 329 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE),
312 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE), 330 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE),
313 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE), 331 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE),
332 .uart1_phys = OMAP4_UART1_BASE,
333 .uart2_phys = OMAP4_UART2_BASE,
334 .uart3_phys = OMAP4_UART3_BASE,
335 .uart4_phys = OMAP4_UART4_BASE,
314}; 336};
315 337
316void __init omap2_set_globals_443x(void) 338void __init omap2_set_globals_443x(void)
@@ -318,6 +340,7 @@ void __init omap2_set_globals_443x(void)
318 omap2_set_globals_tap(&omap4_globals); 340 omap2_set_globals_tap(&omap4_globals);
319 omap2_set_globals_control(&omap4_globals); 341 omap2_set_globals_control(&omap4_globals);
320 omap2_set_globals_prcm(&omap4_globals); 342 omap2_set_globals_prcm(&omap4_globals);
343 omap2_set_globals_uart(&omap4_globals);
321} 344}
322#endif 345#endif
323 346
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..83dce4c4f7e6 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/plat-omap/include/plat/serial.h
@@ -15,37 +15,65 @@
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 OMAP2_UART1_BASE
31#define OMAP_UART2_BASE 0x4806c000 30#define OMAP3_UART2_BASE OMAP2_UART2_BASE
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 OMAP2_UART1_BASE
36#define OMAP_UART2_BASE 0x4806c000 36#define OMAP4_UART2_BASE OMAP2_UART2_BASE
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/* External port on Zoom2/3 */
41#define ZOOM_UART_BASE 0x10000000
42#define ZOOM_UART_VIRT 0xfb000000
43
44#define OMAP_PORT_SHIFT 2
45#define OMAP7XX_PORT_SHIFT 0
46#define ZOOM_PORT_SHIFT 1
40 47
41#define OMAP1510_BASE_BAUD (12000000/16) 48#define OMAP1510_BASE_BAUD (12000000/16)
42#define OMAP16XX_BASE_BAUD (48000000/16) 49#define OMAP16XX_BASE_BAUD (48000000/16)
43#define OMAP24XX_BASE_BAUD (48000000/16) 50#define OMAP24XX_BASE_BAUD (48000000/16)
44 51
52/*
53 * DEBUG_LL port encoding stored into the UART1 scratchpad register by
54 * decomp_setup in uncompress.h
55 */
56#define OMAP1UART1 11
57#define OMAP1UART2 12
58#define OMAP1UART3 13
59#define OMAP2UART1 21
60#define OMAP2UART2 22
61#define OMAP2UART3 23
62#define OMAP3UART1 OMAP2UART1
63#define OMAP3UART2 OMAP2UART2
64#define OMAP3UART3 33
65#define OMAP3UART4 34 /* Only on 36xx */
66#define OMAP4UART1 OMAP2UART1
67#define OMAP4UART2 OMAP2UART2
68#define OMAP4UART3 43
69#define OMAP4UART4 44
70#define ZOOM_UART 95 /* Only on zoom2/3 */
71
72/* This is only used by 8250.c for omap1510 */
45#define is_omap_port(pt) ({int __ret = 0; \ 73#define is_omap_port(pt) ({int __ret = 0; \
46 if ((pt)->port.mapbase == OMAP_UART1_BASE || \ 74 if ((pt)->port.mapbase == OMAP1_UART1_BASE || \
47 (pt)->port.mapbase == OMAP_UART2_BASE || \ 75 (pt)->port.mapbase == OMAP1_UART2_BASE || \
48 (pt)->port.mapbase == OMAP_UART3_BASE) \ 76 (pt)->port.mapbase == OMAP1_UART3_BASE) \
49 __ret = 1; \ 77 __ret = 1; \
50 __ret; \ 78 __ret; \
51 }) 79 })
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 13c305d62127..81d9ec540fcf 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -19,62 +19,38 @@
19 19
20#include <linux/types.h> 20#include <linux/types.h>
21#include <linux/serial_reg.h> 21#include <linux/serial_reg.h>
22
23#include <asm/mach-types.h>
24
22#include <plat/serial.h> 25#include <plat/serial.h>
23 26
24unsigned int system_rev; 27static volatile u8 *uart1_base;
28static int uart1_shift;
25 29
26#define UART_OMAP_MDR1 0x08 /* mode definition register */ 30static volatile u8 *uart_base;
27#define OMAP_ID_730 0x355F 31static int uart_shift;
28#define OMAP_ID_850 0x362C
29#define ID_MASK 0x7fff
30#define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0)
31#define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK
32 32
33static void putc(int c) 33/*
34 * Store the DEBUG_LL uart number into UART1 scratchpad register.
35 * See also debug-macro.S, and serial.c for related code.
36 *
37 * Please note that we currently assume that:
38 * - UART1 clocks are enabled for register access
39 * - UART1 scratchpad register can be used
40 */
41static void set_uart1_scratchpad(unsigned char port)
34{ 42{
35 volatile u8 * uart = 0; 43 uart1_base[UART_SCR << uart1_shift] = port;
36 int shift = 2; 44}
37
38#ifdef CONFIG_MACH_OMAP_PALMTE
39 return;
40#endif
41
42#ifdef CONFIG_ARCH_OMAP
43#ifdef CONFIG_OMAP_LL_DEBUG_UART3
44 uart = (volatile u8 *)(OMAP_UART3_BASE);
45#elif defined(CONFIG_OMAP_LL_DEBUG_UART2)
46 uart = (volatile u8 *)(OMAP_UART2_BASE);
47#elif defined(CONFIG_OMAP_LL_DEBUG_UART1)
48 uart = (volatile u8 *)(OMAP_UART1_BASE);
49#elif defined(CONFIG_OMAP_LL_DEBUG_NONE)
50 return;
51#else
52 return;
53#endif
54
55#ifdef CONFIG_ARCH_OMAP1
56 /* Determine which serial port to use */
57 do {
58 /* MMU is not on, so cpu_is_omapXXXX() won't work here */
59 unsigned int omap_id = omap_get_id();
60
61 if (omap_id == OMAP_ID_730 || omap_id == OMAP_ID_850)
62 shift = 0;
63 45
64 if (check_port(uart, shift)) 46static void putc(int c)
65 break; 47{
66 /* Silent boot if no serial ports are enabled. */ 48 if (!uart_base)
67 return; 49 return;
68 } while (0);
69#endif /* CONFIG_ARCH_OMAP1 */
70#endif
71 50
72 /* 51 while (!(uart_base[UART_LSR << uart_shift] & UART_LSR_THRE))
73 * Now, xmit each character
74 */
75 while (!(uart[UART_LSR << shift] & UART_LSR_THRE))
76 barrier(); 52 barrier();
77 uart[UART_TX << shift] = c; 53 uart_base[UART_TX << uart_shift] = c;
78} 54}
79 55
80static inline void flush(void) 56static inline void flush(void)
@@ -82,7 +58,116 @@ static inline void flush(void)
82} 58}
83 59
84/* 60/*
61 * Macros to configure UART1 and debug UART
62 */
63#define _DEBUG_LL_ENTRY(mach, uart1_phys, uart1_shft, \
64 dbg_uart, dbg_shft, dbg_id) \
65 if (machine_is_##mach()) { \
66 uart1_base = (volatile u8 *)(uart1_phys); \
67 uart1_shift = (uart1_shft); \
68 uart_base = (volatile u8 *)(dbg_uart); \
69 uart_shift = (dbg_shft); \
70 port = (dbg_id); \
71 set_uart1_scratchpad(port); \
72 break; \
73 }
74
75#define DEBUG_LL_OMAP7XX(p, mach) \
76 _DEBUG_LL_ENTRY(mach, OMAP1_UART1_BASE, OMAP7XX_PORT_SHIFT, \
77 OMAP1_UART##p##_BASE, OMAP7XX_PORT_SHIFT, OMAP1UART##p)
78
79#define DEBUG_LL_OMAP1(p, mach) \
80 _DEBUG_LL_ENTRY(mach, OMAP1_UART1_BASE, OMAP_PORT_SHIFT, \
81 OMAP1_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP1UART##p)
82
83#define DEBUG_LL_OMAP2(p, mach) \
84 _DEBUG_LL_ENTRY(mach, OMAP2_UART1_BASE, OMAP_PORT_SHIFT, \
85 OMAP2_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP2UART##p)
86
87#define DEBUG_LL_OMAP3(p, mach) \
88 _DEBUG_LL_ENTRY(mach, OMAP3_UART1_BASE, OMAP_PORT_SHIFT, \
89 OMAP3_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP3UART##p)
90
91#define DEBUG_LL_OMAP4(p, mach) \
92 _DEBUG_LL_ENTRY(mach, OMAP4_UART1_BASE, OMAP_PORT_SHIFT, \
93 OMAP4_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP4UART##p)
94
95/* Zoom2/3 shift is different for UART1 and external port */
96#define DEBUG_LL_ZOOM(mach) \
97 _DEBUG_LL_ENTRY(mach, OMAP2_UART1_BASE, OMAP_PORT_SHIFT, \
98 ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART)
99
100static inline void __arch_decomp_setup(unsigned long arch_id)
101{
102 int port = 0;
103
104 /*
105 * Initialize the port based on the machine ID from the bootloader.
106 * Note that we're using macros here instead of switch statement
107 * as machine_is functions are optimized out for the boards that
108 * are not selected.
109 */
110 do {
111 /* omap7xx/8xx based boards using UART1 with shift 0 */
112 DEBUG_LL_OMAP7XX(1, herald);
113 DEBUG_LL_OMAP7XX(1, omap_perseus2);
114
115 /* omap15xx/16xx based boards using UART1 */
116 DEBUG_LL_OMAP1(1, ams_delta);
117 DEBUG_LL_OMAP1(1, nokia770);
118 DEBUG_LL_OMAP1(1, omap_h2);
119 DEBUG_LL_OMAP1(1, omap_h3);
120 DEBUG_LL_OMAP1(1, omap_innovator);
121 DEBUG_LL_OMAP1(1, omap_osk);
122 DEBUG_LL_OMAP1(1, omap_palmte);
123 DEBUG_LL_OMAP1(1, omap_palmz71);
124
125 /* omap15xx/16xx based boards using UART2 */
126 DEBUG_LL_OMAP1(2, omap_palmtt);
127
128 /* omap15xx/16xx based boards using UART3 */
129 DEBUG_LL_OMAP1(3, sx1);
130
131 /* omap2 based boards using UART1 */
132 DEBUG_LL_OMAP2(1, omap2evm);
133 DEBUG_LL_OMAP2(1, omap_2430sdp);
134 DEBUG_LL_OMAP2(1, omap_apollon);
135 DEBUG_LL_OMAP2(1, omap_h4);
136
137 /* omap2 based boards using UART3 */
138 DEBUG_LL_OMAP2(3, nokia_n800);
139 DEBUG_LL_OMAP2(3, nokia_n810);
140 DEBUG_LL_OMAP2(3, nokia_n810_wimax);
141
142 /* omap3 based boards using UART1 */
143 DEBUG_LL_OMAP2(1, omap3evm);
144 DEBUG_LL_OMAP3(1, omap_3430sdp);
145 DEBUG_LL_OMAP3(1, omap_3630sdp);
146
147 /* omap3 based boards using UART3 */
148 DEBUG_LL_OMAP3(3, cm_t35);
149 DEBUG_LL_OMAP3(3, igep0020);
150 DEBUG_LL_OMAP3(3, nokia_rx51);
151 DEBUG_LL_OMAP3(3, omap3517evm);
152 DEBUG_LL_OMAP3(3, omap3_beagle);
153 DEBUG_LL_OMAP3(3, omap3_pandora);
154 DEBUG_LL_OMAP3(3, omap_ldp);
155 DEBUG_LL_OMAP3(3, overo);
156 DEBUG_LL_OMAP3(3, touchbook);
157
158 /* omap4 based boards using UART3 */
159 DEBUG_LL_OMAP4(3, omap_4430sdp);
160
161 /* zoom2/3 external uart */
162 DEBUG_LL_ZOOM(omap_zoom2);
163 DEBUG_LL_ZOOM(omap_zoom3);
164
165 } while (0);
166}
167
168#define arch_decomp_setup() __arch_decomp_setup(arch_id)
169
170/*
85 * nothing to do 171 * nothing to do
86 */ 172 */
87#define arch_decomp_setup()
88#define arch_decomp_wdog() 173#define arch_decomp_wdog()
diff --git a/arch/arm/plat-stmp3xxx/include/mach/debug-macro.S b/arch/arm/plat-stmp3xxx/include/mach/debug-macro.S
index fb3b969bf0a2..1b9348bf0e49 100644
--- a/arch/arm/plat-stmp3xxx/include/mach/debug-macro.S
+++ b/arch/arm/plat-stmp3xxx/include/mach/debug-macro.S
@@ -16,7 +16,7 @@
16 * http://www.gnu.org/copyleft/gpl.html 16 * http://www.gnu.org/copyleft/gpl.html
17 */ 17 */
18 18
19 .macro addruart,rx 19 .macro addruart, rx, tmp
20 mrc p15, 0, \rx, c1, c0 20 mrc p15, 0, \rx, c1, c0
21 tst \rx, #1 @ MMU enabled? 21 tst \rx, #1 @ MMU enabled?
22 moveq \rx, #0x80000000 @ physical base address 22 moveq \rx, #0x80000000 @ physical base address