]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: serial: Add a REQUIRE_SERIAL_CONSOLE option for boards with no serial port
authorHans de Goede <hdegoede@redhat.com>
Sat, 8 Aug 2015 15:45:18 +0000 (17:45 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:17:40 +0000 (08:17 +0200)
commitdd3d7aa94f4150d6ab1281fd1a4e91df5242b5e5
treea2dad1c764f2357c55c371a03e39c08b30d813df
parent2115effcd0285fe942ef00b68d639bd87b9e88b5
dm: serial: Add a REQUIRE_SERIAL_CONSOLE option for boards with no serial port

Currently the serial code assumes that there is always at least one serial
port (and panics / crashes due to null pointer dereferences when there is
none).

This makes it impossible to use u-boot on boards where there is no (debug)
serial port, because e.g. all uart pins are muxed to another function.

This commit adds a CONFIG_REQUIRE_SERIAL_CONSOLE Kconfig option, which
defaults to y (preserving existing behavior), which can be set to n on
such boards to make them work.

This commit only implements this for CONFIG_DM_SERIAL=y configs, as allowing
running without a serial port for CONFIG_DM_SERIAL=n configs is non trivial,
and is not necessary at this moment.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/serial/Kconfig
drivers/serial/serial-uclass.c