Both Virt and Vexpress have a PL011 serial console as default console, but they place it at different addresses. Add a new DEBUG_QEMU_ARM32_VIRT config option to be able to use DEBUG_LL on 32-bit Virt as well.
Signed-off-by: Ahmad Fatoum <[email protected]> --- arch/arm/include/asm/debug_ll.h | 3 ++- common/Kconfig.debug_ll | 4 ++++ include/mach/vexpress/debug_ll.h | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h index bac0b2106936..fd7715c7434b 100644 --- a/arch/arm/include/asm/debug_ll.h +++ b/arch/arm/include/asm/debug_ll.h @@ -23,7 +23,8 @@ #include <mach/stm32mp/debug_ll.h> #endif -#ifdef CONFIG_DEBUG_VEXPRESS_UART +#if defined(CONFIG_DEBUG_VEXPRESS_UART) || \ + defined(CONFIG_DEBUG_QEMU_ARM32_VIRT) #include <mach/vexpress/debug_ll.h> #endif diff --git a/common/Kconfig.debug_ll b/common/Kconfig.debug_ll index e8be2842525f..a08d29859d27 100644 --- a/common/Kconfig.debug_ll +++ b/common/Kconfig.debug_ll @@ -352,6 +352,10 @@ config DEBUG_AM62X_UART bool "Texas Instruments AM62X debug UART" depends on ARCH_K3 +config DEBUG_QEMU_ARM32_VIRT + bool "QEMU ARM32 Virt PL011 console" + depends on MACH_VIRT + config DEBUG_QEMU_ARM64_VIRT bool "QEMU ARM64 Virt PL011 console" depends on ARCH_ARM64_VIRT diff --git a/include/mach/vexpress/debug_ll.h b/include/mach/vexpress/debug_ll.h index 3d67e7645d33..936abf1063ce 100644 --- a/include/mach/vexpress/debug_ll.h +++ b/include/mach/vexpress/debug_ll.h @@ -7,7 +7,11 @@ #ifndef __MACH_VEXPRESS_DEBUG_LL_H__ #define __MACH_VEXPRESS_DEBUG_LL_H__ +#ifdef CONFIG_DEBUG_QEMU_ARM32_VIRT +#define DEBUG_LL_UART_ADDR 0x9000000 +#else #define DEBUG_LL_UART_ADDR 0x1c090000 +#endif #include <debug_ll/pl011.h> -- 2.47.3
