summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/Kconfig20
-rw-r--r--drivers/serial/Makefile2
2 files changed, 21 insertions, 1 deletions
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index ca56a7e604..0900cc8acb 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -53,6 +53,26 @@ config DM_SERIAL
implements serial_putc() etc. The uclass interface is
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
bool "Enable an early debug UART for debugging"
help
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 4ed4bba1bb..8ba15ce028 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -6,7 +6,7 @@
#
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
else
obj-y += serial.o