[PATCH 05/13] ARM: drop CONFIG_HAS_ASM_DEBUG_LL
Sascha Hauer
s.hauer at pengutronix.de
Thu Mar 2 03:15:58 PST 2023
When CONFIG_HAS_ASM_DEBUG_LL is set then include/debug_ll.h includes
asm/debug_ll.h, otherwise it includes mach/debug_ll.h. Drop this option
and instead always include asm/debug_ll.h and include mach/debug_ll.h
from there if necessary. This also adds the missing asm/debug_ll.h for
architectures which previously did not have that file.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/Kconfig | 2 +-
arch/arm/include/asm/debug_ll.h | 2 ++
arch/mips/include/asm/debug_ll.h | 6 ++++++
arch/riscv/Kconfig.socs | 12 ++++++------
arch/sandbox/Kconfig | 2 +-
arch/x86/include/asm/debug_ll.h | 6 ++++++
common/Kconfig | 4 ----
include/debug_ll.h | 8 ++------
8 files changed, 24 insertions(+), 18 deletions(-)
create mode 100644 arch/mips/include/asm/debug_ll.h
create mode 100644 arch/x86/include/asm/debug_ll.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 6aa0ec4074..fccdef9d71 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -273,7 +273,7 @@ config ARCH_ARM64_VIRT
select ARM_AMBA
select BOARD_ARM_VIRT
select HW_HAS_PCI
- select HAS_ASM_DEBUG_LL
+ select HAS_DEBUG_LL
endchoice
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index d7b25a7fca..89ca106117 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -6,6 +6,8 @@
#ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
#define DEBUG_LL_UART_ADDR 0x9000000
#include <debug_ll/pl011.h>
+#else
+#include <mach/debug_ll.h>
#endif
#endif
diff --git a/arch/mips/include/asm/debug_ll.h b/arch/mips/include/asm/debug_ll.h
new file mode 100644
index 0000000000..96e2082dc8
--- /dev/null
+++ b/arch/mips/include/asm/debug_ll.h
@@ -0,0 +1,6 @@
+#ifndef __ASM_MIPS_DEBUG_LL_H
+#define __ASM_MIPS_DEBUG_LL_H
+
+#include <mach/debug_ll.h>
+
+#endif /* __ASM_MIPS_DEBUG_LL_H */
diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index 0f03637a66..2cb0716cd5 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -5,7 +5,7 @@ menu "SoC selection"
config SOC_ERIZO
bool "Erizo SoC"
depends on ARCH_RV32I
- select HAS_ASM_DEBUG_LL
+ select HAS_DEBUG_LL
select HAS_NMON
select USE_COMPRESSED_DTB
select RISCV_M_MODE
@@ -20,7 +20,7 @@ config SOC_VIRT
select RISCV_S_MODE
select BOARD_RISCV_GENERIC_DT
select HAS_CACHE
- select HAS_ASM_DEBUG_LL
+ select HAS_DEBUG_LL
help
Generates an image tht can be be booted by QEMU. The image is called
barebox-dt-2nd.img
@@ -55,7 +55,7 @@ config SOC_SIFIVE
select CLK_SIFIVE_PRCI
select RISCV_TIMER
select HAS_MACB
- select HAS_ASM_DEBUG_LL
+ select HAS_DEBUG_LL
help
This enables support for SiFive SoC platform hardware.
@@ -72,7 +72,7 @@ config SOC_STARFIVE
bool "StarFive SoCs"
select ARCH_HAS_RESET_CONTROLLER
select RISCV_S_MODE
- select HAS_ASM_DEBUG_LL
+ select HAS_DEBUG_LL
select HAS_NMON
help
This enables support for SiFive SoC platform hardware.
@@ -113,7 +113,7 @@ endif
config SOC_ALLWINNER_SUN20I
bool "Allwinner Sun20i SoCs"
depends on ARCH_RV64I
- select HAS_ASM_DEBUG_LL
+ select HAS_DEBUG_LL
select HAS_CACHE
if SOC_ALLWINNER_SUN20I
@@ -135,7 +135,7 @@ config SIFIVE_L2
config SOC_LITEX
bool "LiteX SoCs"
depends on ARCH_RV32I
- select HAS_ASM_DEBUG_LL
+ select HAS_DEBUG_LL
select HAS_NMON
select USE_COMPRESSED_DTB
select RISCV_TIMER
diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig
index 366a1d0b52..31c4484cf1 100644
--- a/arch/sandbox/Kconfig
+++ b/arch/sandbox/Kconfig
@@ -16,7 +16,7 @@ config SANDBOX
select ARCH_HAS_STACK_DUMP if ASAN
select GENERIC_FIND_NEXT_BIT
select ARCH_HAS_SJLJ
- select HAS_ASM_DEBUG_LL
+ select HAS_DEBUG_LL
default y
config ARCH_TEXT_BASE
diff --git a/arch/x86/include/asm/debug_ll.h b/arch/x86/include/asm/debug_ll.h
new file mode 100644
index 0000000000..e75090b4ba
--- /dev/null
+++ b/arch/x86/include/asm/debug_ll.h
@@ -0,0 +1,6 @@
+#ifndef __ASM_X86_DEBUG_LL_H
+#define __ASM_X86_DEBUG_LL_H
+
+#include <mach/debug_ll.h>
+
+#endif /* __ASM_X86_DEBUG_LL_H */
diff --git a/common/Kconfig b/common/Kconfig
index d957970993..96ab687af2 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1639,10 +1639,6 @@ source "common/efi/Kconfig"
config HAS_DEBUG_LL
bool
-config HAS_ASM_DEBUG_LL
- bool
- select HAS_DEBUG_LL
-
config DDR_SPD
bool
select CRC_ITU_T
diff --git a/include/debug_ll.h b/include/debug_ll.h
index 856a157bf5..0128ab524a 100644
--- a/include/debug_ll.h
+++ b/include/debug_ll.h
@@ -12,18 +12,14 @@
#define __INCLUDE_DEBUG_LL_H__
#ifdef CONFIG_HAS_DEBUG_LL
-#ifdef CONFIG_HAS_ASM_DEBUG_LL
-#include <asm/debug_ll.h>
-#else
/*
- * mach/debug_ll.h should implement PUTC_LL. This can be a macro or a static
+ * asm/debug_ll.h should implement PUTC_LL. This can be a macro or a static
* inline function. Note that several SoCs expect the UART to be initialized
* by a debugger or a first stage bootloader. You won't see anything without
* this initialization. Depending on the PUTC_LL implementation the board might
* also hang in PUTC_LL without proper initialization.
*/
-#include <mach/debug_ll.h>
-#endif
+#include <asm/debug_ll.h>
#endif
#if defined (CONFIG_DEBUG_LL)
--
2.30.2
More information about the barebox
mailing list