From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH] ARM: virt: add DEBUG_LL support
Date: Mon, 5 Jan 2026 09:37:44 +0100 [thread overview]
Message-ID: <20260105083745.3258038-1-a.fatoum@barebox.org> (raw)
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 <a.fatoum@barebox.org>
---
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
next reply other threads:[~2026-01-05 8:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 8:37 Ahmad Fatoum [this message]
2026-01-06 7:38 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260105083745.3258038-1-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox