mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 05/13] ARM: drop CONFIG_HAS_ASM_DEBUG_LL
Date: Thu,  2 Mar 2023 12:15:58 +0100	[thread overview]
Message-ID: <20230302111606.1054037-6-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20230302111606.1054037-1-s.hauer@pengutronix.de>

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@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




  parent reply	other threads:[~2023-03-02 11:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 11:15 [PATCH 00/13] ARM: misc cleanups Sascha Hauer
2023-03-02 11:15 ` [PATCH 01/13] ARM: add ENTRY_FUNCTION_HEAD macro Sascha Hauer
2023-03-02 11:15 ` [PATCH 02/13] ARM: mvebu: Use ENTRY_FUNCTION_HEAD Sascha Hauer
2023-03-02 11:15 ` [PATCH 03/13] ARM: at91: " Sascha Hauer
2023-03-02 16:40   ` Ahmad Fatoum
2023-03-03  8:32     ` Sascha Hauer
2023-03-02 11:15 ` [PATCH 04/13] ARM: Drop HAVE_MACH_ARM_HEAD Sascha Hauer
2023-03-02 11:15 ` Sascha Hauer [this message]
2023-03-02 11:15 ` [PATCH 06/13] regulator: pfuze: remove unused include Sascha Hauer
2023-03-02 11:16 ` [PATCH 07/13] ARM: drop unused zynq code in Makefile Sascha Hauer
2023-03-02 11:16 ` [PATCH 08/13] ARM: drop unused mvebu " Sascha Hauer
2023-03-02 11:16 ` [PATCH 09/13] ARM: drop unused am35xx " Sascha Hauer
2023-03-02 11:16 ` [PATCH 10/13] ARM: Makefile: Drop board-y Sascha Hauer
2023-03-02 11:16 ` [PATCH 11/13] ARM: i.MX: Add missing include Sascha Hauer
2023-03-02 11:16 ` [PATCH 12/13] ARM: stm32mp_defconfig: Enable remaining boards Sascha Hauer
2023-03-02 11:16 ` [PATCH 13/13] mci: imx-esdhc-pbl: add missing include 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=20230302111606.1054037-6-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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