summaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-03-14 22:28:29 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-04-30 06:59:05 +0200
commit70342a7f51a0069446966c42db4dbc44f6db16ee (patch)
treec701e9fe78ca219fae3664fc7b4d54ab187f7f4f /src/console
parenta8d089d3acc0c2254b3dbeb04c1e622ab01e6d98 (diff)
uart: Support multiple ports
The port for console remains to be a compile time constant. The Kconfig option is changed to select an UART port with index to avoid putting map of UART base addresses in Kconfigs. With this change it is possible to have other than debug console on different UART port. Change-Id: Ie1845a946f8d3b2604ef5404edb31b2e811f3ccd Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5342 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/console')
-rw-r--r--src/console/Kconfig38
1 files changed, 10 insertions, 28 deletions
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 65fc1aaa48..703e5c7d38 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -48,39 +48,21 @@ if CONSOLE_SERIAL
comment "device-specific UART"
depends on HAVE_UART_SPECIAL
-choice
- prompt "Serial port for 8250"
- default CONSOLE_SERIAL_COM1
- depends on DRIVERS_UART_8250IO
-
-config CONSOLE_SERIAL_COM1
- bool "COM1/ttyS0, I/O port 0x3f8"
- help
- Serial console on COM1/ttyS0 at I/O port 0x3f8.
-config CONSOLE_SERIAL_COM2
- bool "COM2/ttyS1, I/O port 0x2f8"
- help
- Serial console on COM2/ttyS1 at I/O port 0x2f8.
-config CONSOLE_SERIAL_COM3
- bool "COM3/ttyS2, I/O port 0x3e8"
- help
- Serial console on COM3/ttyS2 at I/O port 0x3e8.
-config CONSOLE_SERIAL_COM4
- bool "COM4/ttyS3, I/O port 0x2e8"
- help
- Serial console on COM4/ttyS3 at I/O port 0x2e8.
-
-endchoice
+config UART_FOR_CONSOLE
+ prompt "Index for UART port to use for console"
+ default 0
+# FIXME: Early programming in romstage is incorrect as we should
+# program different LDN to actually change the physical port.
config TTYS0_BASE
hex
depends on DRIVERS_UART_8250IO
- default 0x3f8 if CONSOLE_SERIAL_COM1
- default 0x2f8 if CONSOLE_SERIAL_COM2
- default 0x3e8 if CONSOLE_SERIAL_COM3
- default 0x2e8 if CONSOLE_SERIAL_COM4
+ default 0x3f8 if UART_FOR_CONSOLE = 0
+ default 0x2f8 if UART_FOR_CONSOLE = 1
+ default 0x3e8 if UART_FOR_CONSOLE = 2
+ default 0x2e8 if UART_FOR_CONSOLE = 3
help
- Map the COM port names to the respective I/O port.
+ Map the COM port number to the respective I/O port.
choice
prompt "Baud rate"