[PATCH] serial: Add missing Kconfig dependencies for debug consoles

Debug console is the part of serial driver in the same file. It means to be able to enable debug console you also need to enable driver itself. That's why add all dependecies and list only debug consoles which are enabled based on driver selection to avoid compilation error when user asks for certain debug console but driver is not enable for it.
Error: aarch64-linux-gnu-ld.bfd: common/built-in.o: in function `putc': /home/monstr/data/disk/u-boot/common/console.c:513: undefined reference to `printch' aarch64-linux-gnu-ld.bfd: common/built-in.o: in function `puts': /home/monstr/data/disk/u-boot/common/console.c:563: undefined reference to `printch'
Signed-off-by: Michal Simek michal.simek@xilinx.com ---
drivers/serial/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 90e3983170ce..faf97a4c4c76 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -189,6 +189,7 @@ choice
config DEBUG_UART_ALTERA_JTAGUART bool "Altera JTAG UART" + depends on ALTERA_JTAG_UART help Select this to enable a debug UART using the altera_jtag_uart driver. You will need to provide parameters to make this work. The driver will @@ -196,6 +197,7 @@ config DEBUG_UART_ALTERA_JTAGUART
config DEBUG_UART_ALTERA_UART bool "Altera UART" + depends on ALTERA_UART help Select this to enable a debug UART using the altera_uart driver. You will need to provide parameters to make this work. The driver will @@ -221,6 +223,7 @@ config DEBUG_ARC_SERIAL
config DEBUG_UART_ATMEL bool "Atmel USART" + depends on ATMEL_USART help Select this to enable a debug UART using the atmel usart driver. You will need to provide parameters to make this work. The driver will @@ -236,6 +239,7 @@ config DEBUG_UART_BCM6345
config DEBUG_UART_NS16550 bool "ns16550" + depends on SYS_NS16550_SERIAL help Select this to enable a debug UART using the ns16550 driver. You will need to provide parameters to make this work. The driver will @@ -252,6 +256,7 @@ config DEBUG_EFI_CONSOLE
config DEBUG_UART_S5P bool "Samsung S5P" + depends on S5P help Select this to enable a debug UART using the serial_s5p driver. You will need to provide parameters to make this work. The driver will @@ -267,6 +272,7 @@ config DEBUG_UART_MESON
config DEBUG_UART_UARTLITE bool "Xilinx Uartlite" + depends on XILINX_UARTLITE help Select this to enable a debug UART using the serial_uartlite driver. You will need to provide parameters to make this work. The driver will @@ -274,6 +280,7 @@ config DEBUG_UART_UARTLITE
config DEBUG_UART_ARM_DCC bool "ARM DCC" + depends on ARM_DCC help Select this to enable a debug UART using the ARM JTAG DCC port. The DCC port can be used for very early debugging and doesn't require @@ -285,6 +292,7 @@ config DEBUG_UART_ARM_DCC
config DEBUG_MVEBU_A3700_UART bool "Marvell Armada 3700" + depends on MVEBU_A3700_UART help Select this to enable a debug UART using the serial_mvebu driver. You will need to provide parameters to make this work. The driver will @@ -307,6 +315,7 @@ config DEBUG_UART_APBUART
config DEBUG_UART_PL010 bool "pl010" + depends on PL01X_SERIAL help Select this to enable a debug UART using the pl01x driver with the PL010 UART type. You will need to provide parameters to make this @@ -315,6 +324,7 @@ config DEBUG_UART_PL010
config DEBUG_UART_PL011 bool "pl011" + depends on PL011_SERIAL help Select this to enable a debug UART using the pl01x driver with the PL011 UART type. You will need to provide parameters to make this @@ -348,6 +358,7 @@ config DEBUG_UART_SANDBOX
config DEBUG_UART_SIFIVE bool "SiFive UART" + depends on PL01X_SERIAL help Select this to enable a debug UART using the serial_sifive driver. You will need to provide parameters to make this work. The driver will @@ -373,6 +384,7 @@ config DEBUG_UART_UNIPHIER
config DEBUG_UART_OMAP bool "OMAP uart" + depends on OMAP_SERIAL help Select this to enable a debug UART using the omap ns16550 driver. You will need to provide parameters to make this work. The driver

On Thu, 28 May 2020 at 04:05, Michal Simek michal.simek@xilinx.com wrote:
Debug console is the part of serial driver in the same file. It means to be able to enable debug console you also need to enable driver itself. That's why add all dependecies and list only debug consoles which are enabled based on driver selection to avoid compilation error when user asks for certain debug console but driver is not enable for it.
Error: aarch64-linux-gnu-ld.bfd: common/built-in.o: in function `putc': /home/monstr/data/disk/u-boot/common/console.c:513: undefined reference to `printch' aarch64-linux-gnu-ld.bfd: common/built-in.o: in function `puts': /home/monstr/data/disk/u-boot/common/console.c:563: undefined reference to `printch'
Signed-off-by: Michal Simek michal.simek@xilinx.com
drivers/serial/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Thu, May 28, 2020 at 12:05:12PM +0200, Michal Simek wrote:
Debug console is the part of serial driver in the same file. It means to be able to enable debug console you also need to enable driver itself. That's why add all dependecies and list only debug consoles which are enabled based on driver selection to avoid compilation error when user asks for certain debug console but driver is not enable for it.
Error: aarch64-linux-gnu-ld.bfd: common/built-in.o: in function `putc': /home/monstr/data/disk/u-boot/common/console.c:513: undefined reference to `printch' aarch64-linux-gnu-ld.bfd: common/built-in.o: in function `puts': /home/monstr/data/disk/u-boot/common/console.c:563: undefined reference to `printch'
Signed-off-by: Michal Simek michal.simek@xilinx.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
participants (3)
-
Michal Simek
-
Simon Glass
-
Tom Rini