summaryrefslogtreecommitdiffstats
path: root/meta/packages/linux/linux-omap3-pm-git/zoom2/0008-omap2-add-support-for-DEBUG_LL-on-external-UART.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/linux/linux-omap3-pm-git/zoom2/0008-omap2-add-support-for-DEBUG_LL-on-external-UART.patch')
-rw-r--r--meta/packages/linux/linux-omap3-pm-git/zoom2/0008-omap2-add-support-for-DEBUG_LL-on-external-UART.patch103
1 files changed, 103 insertions, 0 deletions
diff --git a/meta/packages/linux/linux-omap3-pm-git/zoom2/0008-omap2-add-support-for-DEBUG_LL-on-external-UART.patch b/meta/packages/linux/linux-omap3-pm-git/zoom2/0008-omap2-add-support-for-DEBUG_LL-on-external-UART.patch
new file mode 100644
index 0000000000..7ca2dcb9fe
--- /dev/null
+++ b/meta/packages/linux/linux-omap3-pm-git/zoom2/0008-omap2-add-support-for-DEBUG_LL-on-external-UART.patch
@@ -0,0 +1,103 @@
1From bef0894d8a200e43593117a3832cab825ea8aa8c Mon Sep 17 00:00:00 2001
2From: Erik Gilling <konkers@android.com>
3Date: Tue, 21 Apr 2009 13:37:25 -0700
4Subject: [PATCH 8/8] omap2: add support for DEBUG_LL on external UART
5
6Signed-off-by: Erik Gilling <konkers@android.com>
7---
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(-)
13
14diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
15index 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
20 bool "UART3"
21
22+config OMAP_LL_DEBUG_UART_EXT
23+ bool "UART_EXT"
24+
25 endchoice
26
27 config OMAP_SERIAL_WAKE
28diff --git a/arch/arm/plat-omap/include/mach/debug-macro.S b/arch/arm/plat-omap/include/mach/debug-macro.S
29index 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
32@@ -37,6 +37,10 @@
33 #endif
34
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
39+#else
40 moveq \rx, #0x48000000 @ physical base address
41 movne \rx, #0xd8000000 @ virtual base
42 orr \rx, \rx, #0x0006a000
43@@ -48,20 +52,28 @@
44 add \rx, \rx, #0x00006000
45 #endif
46 #endif
47+#endif
48 .endm
49
50 .macro senduart,rd,rx
51 strb \rd, [\rx]
52 .endm
53
54+#ifdef CONFIG_OMAP_LL_DEBUG_UART_EXT
55+#define REGSHIFT 1
56+#else
57+#define REGSHIFT 2
58+#endif
59 .macro busyuart,rd,rx
60-1001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends
61+1001: ldrb \rd, [\rx, #(0x5 << REGSHIFT)] @ OMAP-1510 and friends
62 and \rd, \rd, #0x60
63 teq \rd, #0x60
64+#ifndef CONFIG_OMAP_LL_DEBUG_UART_EXT
65 beq 1002f
66 ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only
67 and \rd, \rd, #0x60
68 teq \rd, #0x60
69+#endif
70 bne 1001b
71 1002:
72 .endm
73diff --git a/arch/arm/plat-omap/include/mach/serial.h b/arch/arm/plat-omap/include/mach/serial.h
74index e249186..7ae4567 100644
75--- a/arch/arm/plat-omap/include/mach/serial.h
76+++ b/arch/arm/plat-omap/include/mach/serial.h
77@@ -32,6 +32,7 @@
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 */
85diff --git a/arch/arm/plat-omap/include/mach/uncompress.h b/arch/arm/plat-omap/include/mach/uncompress.h
86index 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)
90 #endif
91
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);
96+ shift = 1;
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);
101--
1021.6.3.2
103