From 86b9602f8203b7b3b5a189fba759b58c9d6f378e Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 21 Apr 2022 12:17:07 +0200 Subject: serial: pic32: make SERIAL_PIC32_CONSOLE depend on SERIAL_PIC32=y pic32_uart contains this: #ifdef CONFIG_SERIAL_PIC32_CONSOLE ... console_initcall(pic32_console_init); ... core_initcall(pic32_late_console_init); ... #endif ... arch_initcall(pic32_uart_init); When the driver is built as module, all three above become module_init(). So if SERIAL_PIC32_CONSOLE is set while SERIAL_PIC32=m, it results in the following build error: In file included from include/linux/device/driver.h:21, from include/linux/device.h:32, from include/linux/platform_device.h:13, from drivers/tty/serial/pic32_uart.c:12: include/linux/module.h:131:49: error: redefinition of '__inittest' So make sure SERIAL_PIC32_CONSOLE can be set only when SERIAL_PIC32=y -- similar as for other drivers. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220421101708.5640-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/tty/serial/Kconfig') diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 6949e883ffab..74a0594c073e 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -818,7 +818,7 @@ config SERIAL_PIC32 config SERIAL_PIC32_CONSOLE bool "PIC32 serial console support" - depends on SERIAL_PIC32 + depends on SERIAL_PIC32=y select SERIAL_CORE_CONSOLE help If you have a PIC32, this driver supports the putting a console on one -- cgit From e3e7b13bffae85e2806c73e3ccacd4447bcb19ed Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 21 Apr 2022 12:17:08 +0200 Subject: serial: allow COMPILE_TEST for some drivers Some more serial drivers can be compile-tested under certain circumstances (when building a specific architecture). So allow for that. This reduces the need of zillion mach/subarch-specific configs. And since the 0day bot has only allmodconfig's for some archs, this increases build coverage there too. Note that cpm needs a minor update in the header, so that it drags in at least some defines (CPM2 ones). Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220421101708.5640-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/tty/serial/Kconfig') diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 74a0594c073e..f51a8079f1f5 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -783,7 +783,7 @@ config SERIAL_PMACZILOG_CONSOLE config SERIAL_CPM tristate "CPM SCC/SMC serial port support" - depends on CPM2 || CPM1 + depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST) select SERIAL_CORE help This driver supports the SCC and SMC serial ports on Motorola @@ -807,7 +807,7 @@ config SERIAL_CPM_CONSOLE config SERIAL_PIC32 tristate "Microchip PIC32 serial support" - depends on MACH_PIC32 + depends on MACH_PIC32 || (MIPS && COMPILE_TEST) select SERIAL_CORE help If you have a PIC32, this driver supports the serial ports. @@ -1247,7 +1247,7 @@ config SERIAL_XILINX_PS_UART_CONSOLE config SERIAL_AR933X tristate "AR933X serial port support" - depends on HAVE_CLK && ATH79 + depends on (HAVE_CLK && ATH79) || (MIPS && COMPILE_TEST) select SERIAL_CORE select SERIAL_MCTRL_GPIO if GPIOLIB help -- cgit From 8043b16f522c9e21e2361a67514386bee3731c6e Mon Sep 17 00:00:00 2001 From: Valentin Caron Date: Tue, 19 Apr 2022 10:53:30 +0200 Subject: serial: stm32: add earlycon support Add early console support in stm32 uart driver. Signed-off-by: Alexandre Torgue Signed-off-by: Valentin Caron Link: https://lore.kernel.org/r/20220419085330.1178925-4-valentin.caron@foss.st.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/tty/serial/Kconfig') diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index f51a8079f1f5..80321b9c4465 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -1443,6 +1443,7 @@ config SERIAL_STM32_CONSOLE bool "Support for console on STM32" depends on SERIAL_STM32=y select SERIAL_CORE_CONSOLE + select SERIAL_EARLYCON config SERIAL_MVEBU_UART bool "Marvell EBU serial port support" -- cgit