summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-01-30 07:45:10 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-01-31 09:22:44 +0100
commit73e4093651f2ff7c7ccf01f37644f7279e0cb939 (patch)
tree782972dee1c63ea1570c3daaf2af5ed000aeb016
parent1db52e5a10394561dcb8bb4047bad4f23de8367e (diff)
downloadbarebox-73e4093651f2ff7c7ccf01f37644f7279e0cb939.tar.gz
barebox-73e4093651f2ff7c7ccf01f37644f7279e0cb939.tar.xz
ARM: add DEBUG_LL support for ARM64 QEMU Virt
We have DEBUG_LL for the PL011 on the ARM64 QEMU Virt, but it is unused. Wire it in. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230130064510.2398689-1-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/cpu/board-dt-2nd.c2
-rw-r--r--arch/arm/include/asm/debug_ll.h11
-rw-r--r--common/Kconfig4
4 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 759b29ee77..8183f6d546 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -292,6 +292,7 @@ config ARCH_ARM64_VIRT
select ARM_AMBA
select BOARD_ARM_VIRT
select HW_HAS_PCI
+ select HAS_ASM_DEBUG_LL
endchoice
diff --git a/arch/arm/cpu/board-dt-2nd.c b/arch/arm/cpu/board-dt-2nd.c
index 6f4a6f26a8..6f69a6dd27 100644
--- a/arch/arm/cpu/board-dt-2nd.c
+++ b/arch/arm/cpu/board-dt-2nd.c
@@ -19,6 +19,8 @@ void dt_2nd_aarch64(void *fdt)
{
unsigned long membase, memsize;
+ putc_ll('>');
+
/* entry point already set up stack */
arm_cpu_lowlevel_init();
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
new file mode 100644
index 0000000000..d7b25a7fca
--- /dev/null
+++ b/arch/arm/include/asm/debug_ll.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef __ASM_DEBUG_LL_H__
+#define __ASM_DEBUG_LL_H__
+
+#ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
+#define DEBUG_LL_UART_ADDR 0x9000000
+#include <debug_ll/pl011.h>
+#endif
+
+#endif
diff --git a/common/Kconfig b/common/Kconfig
index 9e175d36c4..d957970993 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1479,6 +1479,10 @@ config DEBUG_SUN20I
depends on SOC_ALLWINNER_SUN20I
select DEBUG_LL_NS16550
+config DEBUG_QEMU_ARM64_VIRT
+ bool "QEMU ARM64 Virt PL011 console"
+ depends on ARCH_ARM64_VIRT
+
endchoice
config DEBUG_LL_NS16550