dm: serial: Allow driver-model serial to be disabled for TPL
Add separate enable/disable controls for driver-model serial. While this is generally enabled in SPL it may not be in TPL, since serial output can be obtained with the debug UART with minimal code size. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5a6f06f696
commit
891f7ae633
@ -53,6 +53,26 @@ config DM_SERIAL
|
|||||||
implements serial_putc() etc. The uclass interface is
|
implements serial_putc() etc. The uclass interface is
|
||||||
defined in include/serial.h.
|
defined in include/serial.h.
|
||||||
|
|
||||||
|
config SPL_DM_SERIAL
|
||||||
|
bool "Enable Driver Model for serial drivers"
|
||||||
|
depends on DM_SERIAL
|
||||||
|
default y if SPL && DM_SERIAL
|
||||||
|
help
|
||||||
|
Enable driver model for serial in SPL. This replaces
|
||||||
|
drivers/serial/serial.c with the serial uclass, which
|
||||||
|
implements serial_putc() etc. The uclass interface is
|
||||||
|
defined in include/serial.h.
|
||||||
|
|
||||||
|
config TPL_DM_SERIAL
|
||||||
|
bool "Enable Driver Model for serial drivers"
|
||||||
|
depends on DM_SERIAL
|
||||||
|
default y if TPL && DM_SERIAL
|
||||||
|
help
|
||||||
|
Enable driver model for serial in TPL. This replaces
|
||||||
|
drivers/serial/serial.c with the serial uclass, which
|
||||||
|
implements serial_putc() etc. The uclass interface is
|
||||||
|
defined in include/serial.h.
|
||||||
|
|
||||||
config DEBUG_UART
|
config DEBUG_UART
|
||||||
bool "Enable an early debug UART for debugging"
|
bool "Enable an early debug UART for debugging"
|
||||||
help
|
help
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
ifdef CONFIG_DM_SERIAL
|
ifdef CONFIG_DM_SERIAL
|
||||||
obj-y += serial-uclass.o
|
obj-$(CONFIG_$(SPL_TPL_)DM_SERIAL) += serial-uclass.o
|
||||||
obj-$(CONFIG_PL01X_SERIAL) += serial_pl01x.o
|
obj-$(CONFIG_PL01X_SERIAL) += serial_pl01x.o
|
||||||
else
|
else
|
||||||
obj-y += serial.o
|
obj-y += serial.o
|
||||||
|
Loading…
Reference in New Issue
Block a user