[U-Boot] [PATCH 1/2] arm: omap5+: Add support for early debug

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 --- - Depends on DEBUG_UART_OMAP support patch[1] - Explicitly did not enable all the above configs by default as early debug is not need on every boot.
arch/arm/mach-omap2/hwinit-common.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-omap2/hwinit-common.c b/arch/arm/mach-omap2/hwinit-common.c index f317293988..eb310be392 100644 --- a/arch/arm/mach-omap2/hwinit-common.c +++ b/arch/arm/mach-omap2/hwinit-common.c @@ -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(); }

For early debug, the following configs needs to be enabled:
CONFIG_DEBUG_UART=y CONFIG_DEBUG_UART_OMAP=y CONFIG_DEBUG_UART_BASE=0x44e09000 CONFIG_DEBUG_UART_CLOCK=48000000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_DEBUG_UART_ANNOUNCE=y
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- - Depends on DEBUG_UART_OMAP support patch[1] - Explicitly did not enable all the above configs by default as early debug is not need on every boot.
arch/arm/mach-omap2/am33xx/board.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index 78dec2b63c..2769f10311 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/arch/arm/mach-omap2/am33xx/board.c @@ -10,6 +10,7 @@
#include <common.h> #include <dm.h> +#include <debug_uart.h> #include <errno.h> #include <ns16550.h> #include <spl.h> @@ -310,6 +311,9 @@ void early_system_init(void) set_uart_mux_conf(); setup_early_clocks(); uart_soft_reset(); +#ifdef CONFIG_DEBUG_UART_OMAP + debug_uart_init(); +#endif #ifdef CONFIG_TI_I2C_BOARD_DETECT do_board_detect(); #endif

On Fri, May 05, 2017 at 01:45:28PM +0530, Lokesh Vutla wrote:
For early debug, the following configs needs to be enabled:
CONFIG_DEBUG_UART=y CONFIG_DEBUG_UART_OMAP=y CONFIG_DEBUG_UART_BASE=0x44e09000 CONFIG_DEBUG_UART_CLOCK=48000000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_DEBUG_UART_ANNOUNCE=y
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Fri, May 05, 2017 at 01:45:28PM +0530, Lokesh Vutla wrote:
For early debug, the following configs needs to be enabled:
CONFIG_DEBUG_UART=y CONFIG_DEBUG_UART_OMAP=y CONFIG_DEBUG_UART_BASE=0x44e09000 CONFIG_DEBUG_UART_CLOCK=48000000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_DEBUG_UART_ANNOUNCE=y
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

On Fri, May 05, 2017 at 01:45:27PM +0530, Lokesh Vutla wrote:
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

On Fri, May 05, 2017 at 01:45:27PM +0530, Lokesh Vutla wrote:
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
Applied to u-boot/master, thanks!
participants (2)
-
Lokesh Vutla
-
Tom Rini