Commit 4d887a25 authored by Hemant Pedanekar's avatar Hemant Pedanekar Committed by Tony Lindgren

TI816X: Add low level debug support

This patch adds support for low level debugging on TI816X boards. Currently the
support for UART3 console on TI816X EVM is added.
Signed-off-by: default avatarHemant Pedanekar <hemantp@ti.com>
Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 2c87fb2e
...@@ -69,6 +69,12 @@ omap_uart_lsr: .word 0 ...@@ -69,6 +69,12 @@ omap_uart_lsr: .word 0
beq 34f @ configure OMAP3UART4 beq 34f @ configure OMAP3UART4
cmp \rp, #OMAP4UART4 @ only on 44xx cmp \rp, #OMAP4UART4 @ only on 44xx
beq 44f @ configure OMAP4UART4 beq 44f @ configure OMAP4UART4
cmp \rp, #TI816XUART1 @ ti816x UART offsets different
beq 81f @ configure UART1
cmp \rp, #TI816XUART2 @ ti816x UART offsets different
beq 82f @ configure UART2
cmp \rp, #TI816XUART3 @ ti816x UART offsets different
beq 83f @ configure UART3
cmp \rp, #ZOOM_UART @ only on zoom2/3 cmp \rp, #ZOOM_UART @ only on zoom2/3
beq 95f @ configure ZOOM_UART beq 95f @ configure ZOOM_UART
...@@ -91,6 +97,12 @@ omap_uart_lsr: .word 0 ...@@ -91,6 +97,12 @@ omap_uart_lsr: .word 0
b 98f b 98f
44: mov \rp, #UART_OFFSET(OMAP4_UART4_BASE) 44: mov \rp, #UART_OFFSET(OMAP4_UART4_BASE)
b 98f b 98f
81: mov \rp, #UART_OFFSET(TI816X_UART1_BASE)
b 98f
82: mov \rp, #UART_OFFSET(TI816X_UART2_BASE)
b 98f
83: mov \rp, #UART_OFFSET(TI816X_UART3_BASE)
b 98f
95: ldr \rp, =ZOOM_UART_BASE 95: ldr \rp, =ZOOM_UART_BASE
mrc p15, 0, \rv, c1, c0 mrc p15, 0, \rv, c1, c0
tst \rv, #1 @ MMU enabled? tst \rv, #1 @ MMU enabled?
......
...@@ -51,6 +51,11 @@ ...@@ -51,6 +51,11 @@
#define OMAP4_UART3_BASE 0x48020000 #define OMAP4_UART3_BASE 0x48020000
#define OMAP4_UART4_BASE 0x4806e000 #define OMAP4_UART4_BASE 0x4806e000
/* TI816X serial ports */
#define TI816X_UART1_BASE 0x48020000
#define TI816X_UART2_BASE 0x48022000
#define TI816X_UART3_BASE 0x48024000
/* External port on Zoom2/3 */ /* External port on Zoom2/3 */
#define ZOOM_UART_BASE 0x10000000 #define ZOOM_UART_BASE 0x10000000
#define ZOOM_UART_VIRT 0xfa400000 #define ZOOM_UART_VIRT 0xfa400000
...@@ -81,6 +86,9 @@ ...@@ -81,6 +86,9 @@
#define OMAP4UART2 OMAP2UART2 #define OMAP4UART2 OMAP2UART2
#define OMAP4UART3 43 #define OMAP4UART3 43
#define OMAP4UART4 44 #define OMAP4UART4 44
#define TI816XUART1 81
#define TI816XUART2 82
#define TI816XUART3 83
#define ZOOM_UART 95 /* Only on zoom2/3 */ #define ZOOM_UART 95 /* Only on zoom2/3 */
/* This is only used by 8250.c for omap1510 */ /* This is only used by 8250.c for omap1510 */
......
...@@ -93,6 +93,10 @@ static inline void flush(void) ...@@ -93,6 +93,10 @@ static inline void flush(void)
#define DEBUG_LL_ZOOM(mach) \ #define DEBUG_LL_ZOOM(mach) \
_DEBUG_LL_ENTRY(mach, ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART) _DEBUG_LL_ENTRY(mach, ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART)
#define DEBUG_LL_TI816X(p, mach) \
_DEBUG_LL_ENTRY(mach, TI816X_UART##p##_BASE, OMAP_PORT_SHIFT, \
TI816XUART##p)
static inline void __arch_decomp_setup(unsigned long arch_id) static inline void __arch_decomp_setup(unsigned long arch_id)
{ {
int port = 0; int port = 0;
...@@ -166,6 +170,9 @@ static inline void __arch_decomp_setup(unsigned long arch_id) ...@@ -166,6 +170,9 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
DEBUG_LL_ZOOM(omap_zoom2); DEBUG_LL_ZOOM(omap_zoom2);
DEBUG_LL_ZOOM(omap_zoom3); DEBUG_LL_ZOOM(omap_zoom3);
/* TI8168 base boards using UART3 */
DEBUG_LL_TI816X(3, ti8168evm);
} while (0); } while (0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment