[PATCH 41/50] ARM: stm32mp: Only provide PUTC_LL() when activated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With multi-arch support we must make sure we provide exactly one
PUTC_LL() function as indicated by the "Kernel low-level debugging port"
Kconfig choice. Make sure that the stm32mp specific debug_ll.h only
provides PUTC_LL() when specified.
The stm32mp specific debug_ll.h also provides other functions needed
by board code regardless if the stm32mp debug_ll port is enabled or
not, so include it explicitly where needed.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/include/asm/debug_ll.h | 6 ++++--
 common/Kconfig                  | 7 +++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 8005980f28..ba67c7e22d 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -19,6 +19,10 @@
 #include <mach/zynqmp/debug_ll.h>
 #endif
 
+#ifdef CONFIG_DEBUG_STM32MP_UART
+#include <mach/stm32mp/debug_ll.h>
+#endif
+
 #ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
 #define DEBUG_LL_UART_ADDR		0x9000000
 #include <debug_ll/pl011.h>
@@ -28,8 +32,6 @@
 #include <mach/davinci/debug_ll.h>
 #elif defined CONFIG_ARCH_BCM283X
 #include <mach/bcm283x/debug_ll.h>
-#elif defined CONFIG_ARCH_STM32MP
-#include <mach/stm32mp/debug_ll.h>
 #elif defined CONFIG_ARCH_ZYNQ
 #include <mach/zynq/debug_ll.h>
 #elif defined CONFIG_ARCH_VEXPRESS
diff --git a/common/Kconfig b/common/Kconfig
index c396c3a238..a21559bf2c 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1435,6 +1435,13 @@ config DEBUG_SOCFPGA_UART1
 	  Say Y here if you want kernel low-level debugging support
 	  on SOCFPGA(Arria 10) based platforms.
 
+config DEBUG_STM32MP_UART
+	bool "Use STM32MP UART4 for low-level debug"
+	depends on ARCH_STM32
+	help
+	  Say Y here if you want kernel low-level debugging support
+	  on STM32MP.
+
 config DEBUG_RPI1_UART
 	bool "RaspberryPi 1 PL011 UART"
 	depends on ARCH_BCM283X
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux