1 From bef0894d8a200e43593117a3832cab825ea8aa8c Mon Sep 17 00:00:00 2001
2 From: Erik Gilling <konkers@android.com>
3 Date: Tue, 21 Apr 2009 13:37:25 -0700
4 Subject: [PATCH 8/8] omap2: add support for DEBUG_LL on external UART
6 Signed-off-by: Erik Gilling <konkers@android.com>
8 arch/arm/plat-omap/Kconfig | 3 +++
9 arch/arm/plat-omap/include/mach/debug-macro.S | 14 +++++++++++++-
10 arch/arm/plat-omap/include/mach/serial.h | 1 +
11 arch/arm/plat-omap/include/mach/uncompress.h | 5 ++++-
12 4 files changed, 21 insertions(+), 2 deletions(-)
14 diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
15 index c782418..e891f07 100644
16 --- a/arch/arm/plat-omap/Kconfig
17 +++ b/arch/arm/plat-omap/Kconfig
18 @@ -210,6 +210,9 @@ config OMAP_LL_DEBUG_UART2
19 config OMAP_LL_DEBUG_UART3
22 +config OMAP_LL_DEBUG_UART_EXT
27 config OMAP_SERIAL_WAKE
28 diff --git a/arch/arm/plat-omap/include/mach/debug-macro.S b/arch/arm/plat-omap/include/mach/debug-macro.S
29 index ac24050..5864019 100644
30 --- a/arch/arm/plat-omap/include/mach/debug-macro.S
31 +++ b/arch/arm/plat-omap/include/mach/debug-macro.S
35 #elif defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
36 +#ifdef CONFIG_OMAP_LL_DEBUG_UART_EXT
37 + moveq \rx, #0x10000000 @ physical base address
38 + movne \rx, #0xfb000000 @ virtual base address
40 moveq \rx, #0x48000000 @ physical base address
41 movne \rx, #0xd8000000 @ virtual base
42 orr \rx, \rx, #0x0006a000
44 add \rx, \rx, #0x00006000
54 +#ifdef CONFIG_OMAP_LL_DEBUG_UART_EXT
60 -1001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends
61 +1001: ldrb \rd, [\rx, #(0x5 << REGSHIFT)] @ OMAP-1510 and friends
64 +#ifndef CONFIG_OMAP_LL_DEBUG_UART_EXT
66 ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only
73 diff --git a/arch/arm/plat-omap/include/mach/serial.h b/arch/arm/plat-omap/include/mach/serial.h
74 index e249186..7ae4567 100644
75 --- a/arch/arm/plat-omap/include/mach/serial.h
76 +++ b/arch/arm/plat-omap/include/mach/serial.h
78 #define OMAP_UART1_BASE 0x4806a000
79 #define OMAP_UART2_BASE 0x4806c000
80 #define OMAP_UART3_BASE 0x49020000
81 +#define OMAP_UART_EXT_BASE 0x10000000
82 #define OMAP_MAX_NR_PORTS 3
83 #elif defined(CONFIG_ARCH_OMAP4)
84 /* OMAP4 serial ports */
85 diff --git a/arch/arm/plat-omap/include/mach/uncompress.h b/arch/arm/plat-omap/include/mach/uncompress.h
86 index 0814c5f..082c0cd 100644
87 --- a/arch/arm/plat-omap/include/mach/uncompress.h
88 +++ b/arch/arm/plat-omap/include/mach/uncompress.h
89 @@ -39,7 +39,10 @@ static void putc(int c)
92 #ifdef CONFIG_ARCH_OMAP
93 -#ifdef CONFIG_OMAP_LL_DEBUG_UART3
94 +#ifdef CONFIG_OMAP_LL_DEBUG_UART_EXT
95 + uart = (volatile u8 *)(OMAP_UART_EXT_BASE);
97 +#elif defined(CONFIG_OMAP_LL_DEBUG_UART3)
98 uart = (volatile u8 *)(OMAP_UART3_BASE);
99 #elif defined(CONFIG_OMAP_LL_DEBUG_UART2)
100 uart = (volatile u8 *)(OMAP_UART2_BASE);