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 omap specific debug_ll.h only provides PUTC_LL() when specified. The omap specific debug_ll.h also provides other functions needed by board code regardless if the omap debug_ll port is enabled or not, so include it explicitly where needed. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- arch/arm/boards/afi-gf/lowlevel.c | 1 + arch/arm/boards/beagle/lowlevel.c | 1 + arch/arm/boards/beaglebone/lowlevel.c | 1 + arch/arm/boards/myirtech-x335x/lowlevel.c | 1 + arch/arm/boards/phytec-som-am335x/lowlevel.c | 1 + arch/arm/boards/vscom-baltos/lowlevel.c | 1 + arch/arm/boards/wago-pfc-am35xx/lowlevel.c | 1 + arch/arm/include/asm/debug_ll.h | 6 ++++-- common/Kconfig | 6 ++++++ include/mach/omap/debug_ll.h | 2 +- 10 files changed, 18 insertions(+), 3 deletions(-) diff --git a/arch/arm/boards/afi-gf/lowlevel.c b/arch/arm/boards/afi-gf/lowlevel.c index d1c8e98434..5c38198a36 100644 --- a/arch/arm/boards/afi-gf/lowlevel.c +++ b/arch/arm/boards/afi-gf/lowlevel.c @@ -17,6 +17,7 @@ #include <mach/omap/syslib.h> #include <mach/omap/am33xx-mux.h> #include <debug_ll.h> +#include <mach/omap/debug_ll.h> /* AM335X EMIF Register values */ #define VTP_CTRL_READY (0x1 << 5) diff --git a/arch/arm/boards/beagle/lowlevel.c b/arch/arm/boards/beagle/lowlevel.c index bd944c4f67..e53086cef0 100644 --- a/arch/arm/boards/beagle/lowlevel.c +++ b/arch/arm/boards/beagle/lowlevel.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only #include <init.h> +#include <mach/omap/debug_ll.h> #include <debug_ll.h> #include <io.h> #include <linux/sizes.h> diff --git a/arch/arm/boards/beaglebone/lowlevel.c b/arch/arm/boards/beaglebone/lowlevel.c index b1ba66434b..5dc49dfaaf 100644 --- a/arch/arm/boards/beaglebone/lowlevel.c +++ b/arch/arm/boards/beaglebone/lowlevel.c @@ -5,6 +5,7 @@ #include <io.h> #include <linux/string.h> #include <debug_ll.h> +#include <mach/omap/debug_ll.h> #include <asm/barebox-arm-head.h> #include <asm/barebox-arm.h> #include <mach/omap/am33xx-silicon.h> diff --git a/arch/arm/boards/myirtech-x335x/lowlevel.c b/arch/arm/boards/myirtech-x335x/lowlevel.c index eb42182098..0ac2370e57 100644 --- a/arch/arm/boards/myirtech-x335x/lowlevel.c +++ b/arch/arm/boards/myirtech-x335x/lowlevel.c @@ -6,6 +6,7 @@ #include <asm/barebox-arm-head.h> #include <asm/barebox-arm.h> #include <debug_ll.h> +#include <mach/omap/debug_ll.h> #include <init.h> #include <linux/sizes.h> #include <mach/omap/am33xx-clock.h> diff --git a/arch/arm/boards/phytec-som-am335x/lowlevel.c b/arch/arm/boards/phytec-som-am335x/lowlevel.c index 2e2bdc9169..267f30b638 100644 --- a/arch/arm/boards/phytec-som-am335x/lowlevel.c +++ b/arch/arm/boards/phytec-som-am335x/lowlevel.c @@ -16,6 +16,7 @@ #include <mach/omap/am33xx-mux.h> #include <mach/omap/am33xx-generic.h> #include <debug_ll.h> +#include <mach/omap/debug_ll.h> #include "ram-timings.h" diff --git a/arch/arm/boards/vscom-baltos/lowlevel.c b/arch/arm/boards/vscom-baltos/lowlevel.c index 80046a3b05..aee0cde651 100644 --- a/arch/arm/boards/vscom-baltos/lowlevel.c +++ b/arch/arm/boards/vscom-baltos/lowlevel.c @@ -6,6 +6,7 @@ #include <io.h> #include <linux/string.h> #include <debug_ll.h> +#include <mach/omap/debug_ll.h> #include <asm/barebox-arm-head.h> #include <asm/barebox-arm.h> #include <mach/omap/am33xx-silicon.h> diff --git a/arch/arm/boards/wago-pfc-am35xx/lowlevel.c b/arch/arm/boards/wago-pfc-am35xx/lowlevel.c index cff6bfbfeb..5429065c2d 100644 --- a/arch/arm/boards/wago-pfc-am35xx/lowlevel.c +++ b/arch/arm/boards/wago-pfc-am35xx/lowlevel.c @@ -10,6 +10,7 @@ #include <io.h> #include <linux/string.h> #include <debug_ll.h> +#include <mach/omap/debug_ll.h> #include <asm/barebox-arm-head.h> #include <asm/barebox-arm.h> #include <mach/omap/generic.h> diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h index 52e0b9223f..7c1152c6d9 100644 --- a/arch/arm/include/asm/debug_ll.h +++ b/arch/arm/include/asm/debug_ll.h @@ -11,6 +11,10 @@ #include <mach/rockchip/debug_ll.h> #endif +#ifdef CONFIG_DEBUG_OMAP_UART +#include <mach/omap/debug_ll.h> +#endif + #ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT #define DEBUG_LL_UART_ADDR 0x9000000 #include <debug_ll/pl011.h> @@ -40,8 +44,6 @@ #include <mach/socfpga/debug_ll.h> #elif defined CONFIG_ARCH_PXA #include <mach/pxa/debug_ll.h> -#elif defined CONFIG_ARCH_OMAP -#include <mach/omap/debug_ll.h> #elif defined CONFIG_ARCH_NOMADIK #include <mach/nomadik/debug_ll.h> #elif defined CONFIG_ARCH_MXS diff --git a/common/Kconfig b/common/Kconfig index 25f78cca46..eeb33f3042 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1255,6 +1255,9 @@ config DEBUG_IMX_UART config DEBUG_ROCKCHIP_UART bool +config DEBUG_OMAP_UART + bool + choice prompt "Kernel low-level debugging port" depends on DEBUG_LL @@ -1365,6 +1368,7 @@ config DEBUG_VF610_UART config DEBUG_OMAP3_UART bool "OMAP3 Debug UART" depends on ARCH_OMAP3 + select DEBUG_OMAP_UART help Say Y here if you want kernel low-level debugging support on OMAP3. @@ -1372,6 +1376,7 @@ config DEBUG_OMAP3_UART config DEBUG_OMAP4_UART bool "OMAP4 Debug UART" depends on ARCH_OMAP4 + select DEBUG_OMAP_UART help Say Y here if you want kernel low-level debugging support on OMAP4. @@ -1379,6 +1384,7 @@ config DEBUG_OMAP4_UART config DEBUG_AM33XX_UART bool "AM33XX Debug UART" depends on ARCH_AM33XX + select DEBUG_OMAP_UART help Say Y here if you want kernel low-level debugging support on AM33XX. diff --git a/include/mach/omap/debug_ll.h b/include/mach/omap/debug_ll.h index b696c3cb37..a6cd9a77c4 100644 --- a/include/mach/omap/debug_ll.h +++ b/include/mach/omap/debug_ll.h @@ -22,7 +22,7 @@ #include <mach/omap/omap4-silicon.h> #include <mach/omap/am33xx-silicon.h> -#ifdef CONFIG_DEBUG_LL +#ifdef CONFIG_DEBUG_OMAP_UART #ifdef CONFIG_DEBUG_OMAP3_UART #define OMAP_DEBUG_SOC OMAP3 -- 2.30.2