[PATCH 47/50] ARM: bcm283x: Only provide PUTC_LL() when activated

Sascha Hauer s.hauer at pengutronix.de
Fri Mar 3 01:21:28 PST 2023


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/boards/raspberry-pi/lowlevel.c | 1 +
 arch/arm/include/asm/debug_ll.h         | 6 ++++--
 common/Kconfig                          | 7 +++++++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c b/arch/arm/boards/raspberry-pi/lowlevel.c
index 449dfa4575..742f177dec 100644
--- a/arch/arm/boards/raspberry-pi/lowlevel.c
+++ b/arch/arm/boards/raspberry-pi/lowlevel.c
@@ -7,6 +7,7 @@
 #include <asm/unaligned.h>
 #include <mach/bcm283x/platform.h>
 #include <debug_ll.h>
+#include <mach/bcm283x/debug_ll.h>
 #include <mach/bcm283x/mbox.h>
 #include <of.h>
 
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 81602d93d3..a1d5161ccf 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -27,6 +27,10 @@
 #include <mach/vexpress/debug_ll.h>
 #endif
 
+#ifdef CONFIG_DEBUG_BCM283X_UART
+#include <mach/bcm283x/debug_ll.h>
+#endif
+
 #ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
 #define DEBUG_LL_UART_ADDR		0x9000000
 #include <debug_ll/pl011.h>
@@ -34,8 +38,6 @@
 #include <mach/mvebu/debug_ll.h>
 #elif defined CONFIG_ARCH_DAVINCI
 #include <mach/davinci/debug_ll.h>
-#elif defined CONFIG_ARCH_BCM283X
-#include <mach/bcm283x/debug_ll.h>
 #elif defined CONFIG_ARCH_ZYNQ
 #include <mach/zynq/debug_ll.h>
 #elif defined CONFIG_ARCH_VERSATILE
diff --git a/common/Kconfig b/common/Kconfig
index 9234f1239e..57fe5f7886 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1258,6 +1258,9 @@ config DEBUG_ROCKCHIP_UART
 config DEBUG_OMAP_UART
 	bool
 
+config DEBUG_BCM283X_UART
+	bool
+
 choice
 	prompt "Kernel low-level debugging port"
 	depends on DEBUG_LL
@@ -1452,6 +1455,7 @@ config DEBUG_STM32MP_UART
 config DEBUG_RPI1_UART
 	bool "RaspberryPi 1 PL011 UART"
 	depends on ARCH_BCM283X
+	select DEBUG_BCM283X_UART
 	help
 	  Say Y here if you want low-level debugging support on
 	  RaspberryPi 1 boards.
@@ -1466,6 +1470,7 @@ config DEBUG_AT91_UART
 config DEBUG_RPI2_3_UART
 	bool "RaspberryPi 2/3 PL011 UART"
 	depends on ARCH_BCM283X
+	select DEBUG_BCM283X_UART
 	help
 	  Say Y here if you want low-level debugging support on
 	  RaspberryPi 2 and 3 boards.
@@ -1473,6 +1478,7 @@ config DEBUG_RPI2_3_UART
 config DEBUG_RPI3_MINI_UART
 	bool "RaspberryPi 3 mini UART"
 	depends on ARCH_BCM283X
+	select DEBUG_BCM283X_UART
 	help
 	  Say Y here if you want low-level debugging support on
 	  RaspberryPi 3 board mini UART.
@@ -1480,6 +1486,7 @@ config DEBUG_RPI3_MINI_UART
 config DEBUG_RPI4_MINI_UART
 	bool "RaspberryPi 4 mini UART"
 	depends on ARCH_BCM283X
+	select DEBUG_BCM283X_UART
 	help
 	  Say Y here if you want low-level debugging support on
 	  RaspberryPi 4 board mini UART.
-- 
2.30.2




More information about the barebox mailing list