[PATCH] ARM: add DEBUG_LL support for ARM64 QEMU Virt
Sascha Hauer
sha at pengutronix.de
Tue Jan 31 00:22:56 PST 2023
On Mon, Jan 30, 2023 at 07:45:10AM +0100, Ahmad Fatoum wrote:
> From: Ahmad Fatoum <a.fatoum at pengutronix.de>
>
> 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 at pengutronix.de>
> ---
> arch/arm/Kconfig | 1 +
> arch/arm/cpu/board-dt-2nd.c | 2 ++
> arch/arm/include/asm/debug_ll.h | 11 +++++++++++
> common/Kconfig | 4 ++++
> 4 files changed, 18 insertions(+)
> create mode 100644 arch/arm/include/asm/debug_ll.h
Applied, thanks
Sascha
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 759b29ee77e1..8183f6d54686 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 6f4a6f26a8c7..6f69a6dd27a2 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 000000000000..d7b25a7fcab9
> --- /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 9e175d36c43e..d95797099341 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
> --
> 2.38.1
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list