diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-09-01 11:06:34 +0900 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-10-26 22:23:12 +0100 |
commit | 51b17d494656c6c0db230e0a5ba9c733a96309bf (patch) | |
tree | d785856aff88ab3f00ba39a6e0e30a09d707309e | |
parent | 93456512005081d667811a223b8022c013d4d2d7 (diff) | |
download | u-boot-imx-51b17d494656c6c0db230e0a5ba9c733a96309bf.zip u-boot-imx-51b17d494656c6c0db230e0a5ba9c733a96309bf.tar.gz u-boot-imx-51b17d494656c6c0db230e0a5ba9c733a96309bf.tar.bz2 |
arm: debug: add Kconfig entries for lowlevel debug
We have not had a good method to debug the early boot stage such as
lowlevel_init function. I guess developers generally use dedicated
debuggers for that, but it is difficult in some cases.
(For example, my debugger cannot connect to the ARM processor when
it is in the secure state. It sometimes happens when I need to
debug the early boot stage on ARM SoCs with secure extension.)
The low level debug feature in Linux would be also helpful for U-boot
when we are stucking in nasty problems where the console is not
available yet.
You have to enable CONFIG_DEBUG_LL to use this feature.
For now, only 8250-compatible UART devices are supported.
You can add a header file under arch/arm/include/debug/ directory
to support your UART device if necessary.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
-rw-r--r-- | arch/arm/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/Kconfig.debug | 64 | ||||
-rw-r--r-- | arch/arm/lib/Makefile | 2 |
3 files changed, 68 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 109d49f..8d05bb9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -707,4 +707,6 @@ source "board/woodburn/Kconfig" source "board/xaeniax/Kconfig" source "board/zipitz2/Kconfig" +source "arch/arm/Kconfig.debug" + endmenu diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug new file mode 100644 index 0000000..624bcf4 --- /dev/null +++ b/arch/arm/Kconfig.debug @@ -0,0 +1,64 @@ +menu "ARM debug" + +config DEBUG_LL + bool "Low-level debugging functions" + depends on !ARM64 + help + Say Y here to include definitions of printascii, printch, printhex + in U-Boot. This is helpful if you are debugging code that + executes before the console is initialized. + +choice + prompt "Low-level debugging port" + depends on DEBUG_LL + + config DEBUG_LL_UART_8250 + bool "Low-level debugging via 8250 UART" + help + Say Y here if you wish the debug print routes to direct + their output to an 8250 UART. You can use this option + to provide the parameters for the 8250 UART rather than + selecting one of the platform specific options above if + you know the parameters for the port. + + This option is preferred over the platform specific + options; the platform specific options are deprecated + and will be soon removed. + +endchoice + +config DEBUG_LL_INCLUDE + string + depends on DEBUG_LL + default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 + default "mach/debug-macro.S" + +# Compatibility options for 8250 +config DEBUG_UART_8250 + bool + +config DEBUG_UART_PHYS + hex "Physical base address of debug UART" + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 + +# This is not used in U-Boot +config DEBUG_UART_VIRT + hex + default DEBUG_UART_PHYS + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 + +config DEBUG_UART_8250_SHIFT + int "Register offset shift for the 8250 debug UART" + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 + default 2 + +config DEBUG_UART_8250_WORD + bool "Use 32-bit accesses for 8250 UART" + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 + depends on DEBUG_UART_8250_SHIFT >= 2 + +config DEBUG_UART_8250_FLOW_CONTROL + bool "Enable flow control for 8250 UART" + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 + +endmenu diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 1ef2400..d74e4b8 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -48,6 +48,8 @@ ifndef CONFIG_ARM64 obj-y += cache-cp15.o endif +obj-$(CONFIG_DEBUG_LL) += debug.o + # For EABI conformant tool chains, provide eabi_compat() ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) extra-y += eabi_compat.o |