summaryrefslogtreecommitdiff
path: root/drivers/serial/Kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/Kconfig')
-rw-r--r--drivers/serial/Kconfig48
1 files changed, 40 insertions, 8 deletions
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 93e602e0ee..76d5e99647 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -24,6 +24,15 @@ config REQUIRE_SERIAL_CONSOLE
during serial port initialization (default y). Set this to n on
boards which have no debug serial port whatsoever.
+config SPECIFY_CONSOLE_INDEX
+ bool "Specify the port number used for console"
+ default y if !DM_SERIAL || (SPL && !SPL_DM_SERIAL) || \
+ (TPL && !TPL_DM_SERIAL)
+ help
+ In various cases, we need to specify which of the UART devices that
+ a board or SoC has available are to be used for the console device
+ in U-Boot.
+
config SERIAL_PRESENT
bool "Provide a serial driver"
depends on DM_SERIAL
@@ -44,16 +53,39 @@ config SPL_SERIAL_PRESENT
This option enables the full UART in SPL, so if is it disabled,
the full UART driver will be omitted, thus saving space.
+# Logic to allow us to use the imply keyword to set what the default port
+# should be. The default is otherwise 1.
+config CONS_INDEX_0
+ bool
+
+config CONS_INDEX_2
+ bool
+
+config CONS_INDEX_3
+ bool
+
+config CONS_INDEX_4
+ bool
+
+config CONS_INDEX_5
+ bool
+
+config CONS_INDEX_6
+ bool
+
config CONS_INDEX
int "UART used for console"
- depends on ARCH_SUNXI
- default 2 if MACH_SUN5I
- default 5 if MACH_SUN8I_A23 || MACH_SUN8I_A33
+ depends on SPECIFY_CONSOLE_INDEX
+ range 0 6
+ default 0 if CONS_INDEX_0
+ default 2 if CONS_INDEX_2
+ default 3 if CONS_INDEX_3
+ default 4 if CONS_INDEX_4
+ default 5 if CONS_INDEX_5
+ default 6 if CONS_INDEX_6
default 1
help
- Configures the console index.
- For Allwinner SoC., default values are 2 for SUN5I and 5 for A23/A33.
- Otherwise, the index equals 1.
+ Set this to match the UART number of the serial console.
config DM_SERIAL
bool "Enable Driver Model for serial drivers"
@@ -93,8 +125,8 @@ config SERIAL_SEARCH_ALL
config SPL_DM_SERIAL
bool "Enable Driver Model for serial drivers in SPL"
- depends on DM_SERIAL
- default y if SPL && DM_SERIAL
+ depends on DM_SERIAL && SPL_DM
+ default y
help
Enable driver model for serial in SPL. This replaces
drivers/serial/serial.c with the serial uclass, which