arm: omap5+: Add support for early debug
authorLokesh Vutla <lokeshvutla@ti.com>
Fri, 5 May 2017 08:15:27 +0000 (13:45 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 12 May 2017 12:37:15 +0000 (08:37 -0400)
For early debug, the following configs needs to be enabled:

CONFIG_DEBUG_UART=y
CONFIG_DEBUG_UART_OMAP=y
CONFIG_DEBUG_UART_CLOCK=48000000
CONFIG_DEBUG_UART_SHIFT=2
CONFIG_DEBUG_UART_ANNOUNCE=y

For DRA7xx:
CONFIG_DEBUG_UART_BASE=0x4806a000

For AM57xx:
CONFIG_DEBUG_UART_BASE=0x48020000

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/mach-omap2/hwinit-common.c

index cac32748ec10c2ad05fcb51f801efd96f397c99b..c090442598e5b873c5980417247150101915aac6 100644 (file)
@@ -12,6 +12,7 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
+#include <debug_uart.h>
 #include <spl.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/sizes.h>
@@ -159,6 +160,9 @@ void early_system_init(void)
        setup_early_clocks();
        do_board_detect();
        vcores_init();
+#ifdef CONFIG_DEBUG_UART_OMAP
+       debug_uart_init();
+#endif
        prcm_init();
 }