ARM: rpi: refactor debug UART Kconfig settings.
Subsystems (4)
v2 cover ARM: rpi: refactor debug UART Kconfig settings.
Changes from the first patch:
- Don't disable board builds that conflict with debug UART setting.
- Mention in the help text that enabling DEBUG_LL limits the build to the selected UART.
Best regards
Tomaz
Tomaz Solc (2):
ARM: rpi: move debug UART Kconfig settings.
common: Kconfig: improve help text for DEBUG_LL
arch/arm/mach-bcm283x/Kconfig | 20 --------------- arch/arm/mach-bcm283x/include/mach/debug_ll.h | 6 ++--- common/Kconfig | 37 ++++++++++++++++++++++++--- 3 files changed, 36 insertions(+), 27 deletions(-)
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 1/2 ARM: rpi: move debug UART Kconfig settings.
In contrast to other architectures, R.Pi debug UART config was placed under the "System Type" menu, not under the "Debugging -> low-level debugging port". This made this setting easy to miss when enabling low level debug mesages.
--- arch/arm/mach-bcm283x/Kconfig | 20 -------------------- arch/arm/mach-bcm283x/include/mach/debug_ll.h | 6 +++--- common/Kconfig | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 23 deletions(-)
arch/arm/mach-bcm283x/Kconfig +0 -20
@@ -33,24 +33,4 @@ config MACH_RPI_CM3 endmenu -config MACH_RPI_DEBUG_UART_BASE - hex - default 0x20201000 if MACH_RPI_DEBUG_UART_RPI - default 0x3f201000 if MACH_RPI_DEBUG_UART_RPI2 - -if DEBUG_LL - -choice - prompt "Lowlevel debug UART" - -config MACH_RPI_DEBUG_UART_RPI - bool "use RaspberryPi 1 compatible base" - -config MACH_RPI_DEBUG_UART_RPI2 - bool "use RaspberryPi 2 and 3 compatible base" - -endchoice - -endif - endif
arch/arm/mach-bcm283x/include/mach/debug_ll.h +3 -3
@@ -20,11 +20,11 @@#include <mach/platform.h> -#ifndef CONFIG_MACH_RPI_DEBUG_UART_BASE -#define CONFIG_MACH_RPI_DEBUG_UART_BASE 0 +#ifndef CONFIG_DEBUG_RPI_UART_BASE +#define CONFIG_DEBUG_RPI_UART_BASE 0#endif -#define DEBUG_LL_UART_ADDR CONFIG_MACH_RPI_DEBUG_UART_BASE +#define DEBUG_LL_UART_ADDR CONFIG_DEBUG_RPI_UART_BASE#include <asm/debug_ll_pl011.h>
common/Kconfig +19 -0
@@ -1159,6 +1159,19 @@ config DEBUG_SOCFPGA_UART1 Say Y here if you want kernel low-level debugging support on SOCFPGA(Arria 10) based platforms. +config DEBUG_RPI1_UART + bool "RaspberryPi 1 debug UART" + depends on ARCH_BCM283X + help + Say Y here if you want low-level debugging support on + RaspberryPi 1 boards. + +config DEBUG_RPI2_UART + bool "RaspberryPi 2/3 debug UART" + depends on ARCH_BCM283X + help + Say Y here if you want low-level debugging support on + RaspberryPi 2 and 3 boards. endchoice
@@ -1209,6 +1222,12 @@ config DEBUG_SOCFPGA_UART_PHYS_ADDR default 0xffc02100 if DEBUG_SOCFPGA_UART1 depends on ARCH_SOCFPGA +config DEBUG_RPI_UART_BASE + hex + default 0x20201000 if DEBUG_RPI1_UART + default 0x3f201000 if DEBUG_RPI2_UART + depends on ARCH_BCM283X + config DEBUG_SOCFPGA_UART_CLOCK int "SoCFPGA UART debug clock" if DEBUG_LL default 100000000 if ARCH_SOCFPGA_CYCLONE5
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 2/2 common: Kconfig: improve help text for DEBUG_LL
In reply to Tomaz SolcThis adopts the help text used in Linux for the same setting. It clarifies that a build with DEBUG_LL enabled will only work on the system you chose the debug UART for.
--- common/Kconfig | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
common/Kconfig +14 -4
@@ -1016,11 +1016,21 @@ config DEBUG_INFO config DEBUG_LL bool depends on HAS_DEBUG_LL - prompt "low level debug messages" + prompt "Low level debug messages (read help)" help - Enable this to get low level debug messages during barebox initialization. - This requires SoC specific support. Most SoCs require the debug UART to be - initialized by a debugger or first stage bootloader. + Enable this to get low level debug messages during barebox + initialization. This is helpful if you are debugging code that + executes before the console is initialized. + + This requires SoC specific support. Most SoCs require the + debug UART to be initialized by a debugger or first stage + bootloader. + + Note that selecting this option will limit barebox to a single + UART definition, as specified below under "low-level debugging + port". Attempting to boot the resulting image on a different + platform *will not work*, so this option should not be enabled + for builds that are intended to be portable. choice prompt "Kernel low-level debugging port"
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH v2 2/2] common: Kconfig: improve help text for DEBUG_LL
Quoted 6 lines · Tomaz Solc
This adopts the help text used in Linux for the same setting. It clarifies that a build with
DEBUG_LLenabled will only work on the system you chose the debug UART for.--- common/Kconfig | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
Applied this one, the other patches are superseeded by the patches I have sent.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox