Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: lantiq: Make UART's use as console selectable

Lantiq UART driver can be used for system console. Add changes to
make this driver's use as console selectable/configurable.

Signed-off-by: Rahul Tanwar <rahul.tanwar@linux.intel.com>
Link: https://lore.kernel.org/r/35f2d002ba1cb26192fe4d9b8cdab275300705bc.1589176044.git.rahul.tanwar@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rahul Tanwar and committed by
Greg Kroah-Hartman
ea7d3fd8 cf9c9445

+18 -2
+8 -1
drivers/tty/serial/Kconfig
··· 1037 1037 bool "Lantiq serial driver" 1038 1038 depends on (LANTIQ || X86) || COMPILE_TEST 1039 1039 select SERIAL_CORE 1040 + help 1041 + Support for UART on Lantiq and Intel SoCs. 1042 + 1043 + config SERIAL_LANTIQ_CONSOLE 1044 + bool "Console on Lantiq UART" 1045 + depends on SERIAL_LANTIQ=y 1040 1046 select SERIAL_CORE_CONSOLE 1041 1047 select SERIAL_EARLYCON 1042 1048 help 1043 - Support for console and UART on Lantiq SoCs. 1049 + Select this option if you would like to use a Lantiq UART as the 1050 + system console. 1044 1051 1045 1052 config SERIAL_QE 1046 1053 tristate "Freescale QUICC Engine serial port support"
+10 -1
drivers/tty/serial/lantiq.c
··· 597 597 .verify_port = lqasc_verify_port, 598 598 }; 599 599 600 + #ifdef CONFIG_SERIAL_LANTIQ_CONSOLE 600 601 static void 601 602 lqasc_console_putchar(struct uart_port *port, int ch) 602 603 { ··· 706 705 OF_EARLYCON_DECLARE(lantiq, "lantiq,asc", lqasc_serial_early_console_setup); 707 706 OF_EARLYCON_DECLARE(lantiq, "intel,lgm-asc", lqasc_serial_early_console_setup); 708 707 708 + #define LANTIQ_SERIAL_CONSOLE (&lqasc_console) 709 + 710 + #else 711 + 712 + #define LANTIQ_SERIAL_CONSOLE NULL 713 + 714 + #endif /* CONFIG_SERIAL_LANTIQ_CONSOLE */ 715 + 709 716 static struct uart_driver lqasc_reg = { 710 717 .owner = THIS_MODULE, 711 718 .driver_name = DRVNAME, ··· 721 712 .major = 0, 722 713 .minor = 0, 723 714 .nr = MAXPORTS, 724 - .cons = &lqasc_console, 715 + .cons = LANTIQ_SERIAL_CONSOLE, 725 716 }; 726 717 727 718 static int fetch_irq_lantiq(struct device *dev, struct ltq_uart_port *ltq_port)