HV: allow disabling serial port via Kconfig
This patch allows to disable the serial port directly from Kconfig. This used to only be possible from the command-line (by passing "uart=disabled"). To disable the serial port via Kconfig, simply unselect the "Serial IO type" option. The default options do not seem to have any effect anymore (and were confusing anyway) so they are removed and the serial port is enabled for various platforms in their corresponding *.config file. Tracked-On: #1481 Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This commit is contained in:
parent
584f6b7255
commit
26dc54ce37
|
@ -154,13 +154,15 @@ config CPU_UP_TIMEOUT
|
|||
for secondary CPUs to start up.
|
||||
|
||||
choice
|
||||
prompt "serial IO type"
|
||||
prompt "Serial IO type"
|
||||
depends on !RELEASE
|
||||
default SERIAL_MMIO if PLATFORM_SBL
|
||||
default SERIAL_PIO if PLATFORM_UEFI
|
||||
optional
|
||||
help
|
||||
Whether the physical serial port shall be accessed via memory-mapped
|
||||
registers or I/O ports.
|
||||
If selected, this configures whether the physical serial port shall
|
||||
be accessed via memory-mapped registers or I/O ports.
|
||||
|
||||
If this is not selected, the serial port is disabled. This is the
|
||||
default.
|
||||
|
||||
config SERIAL_MMIO
|
||||
bool "MMIO"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib)
|
||||
CONFIG_BOARD="apl-mrb"
|
||||
# CONFIG_PLATFORM_UEFI is not set
|
||||
CONFIG_PLATFORM_SBL=y
|
||||
CONFIG_SERIAL_MMIO=y
|
||||
CONFIG_COM_BASE=0x3e8
|
||||
CONFIG_COM_IRQ=6
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
CONFIG_BOARD="cb2_dnv"
|
||||
CONFIG_PLATFORM_SBL=y
|
||||
# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib)
|
||||
CONFIG_PARTITION_MODE=y
|
||||
CONFIG_BOARD="cb2_dnv"
|
||||
CONFIG_SERIAL_PIO=y
|
||||
CONFIG_SERIAL_PIO_BASE=0x1000
|
||||
CONFIG_DMAR_PARSE_ENABLED=y
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_BOARD="NUC6CAYH"
|
||||
# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib)
|
||||
CONFIG_PLATFORM_UEFI=y
|
||||
# CONFIG_PLATFORM_SBL is not set
|
||||
CONFIG_BOARD="NUC6CAYH"
|
||||
CONFIG_SERIAL_PIO=y
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
CONFIG_BOARD="UP2"
|
||||
# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib)
|
||||
CONFIG_PLATFORM_UEFI=y
|
||||
# CONFIG_PLATFORM_SBL is not set
|
||||
CONFIG_BOARD="UP2"
|
||||
CONFIG_SERIAL_MMIO=y
|
||||
CONFIG_SERIAL_MMIO_BASE=0x9141e000
|
||||
|
|
|
@ -16,7 +16,6 @@ static bool serial_port_mapped;
|
|||
static bool uart_enabled = true;
|
||||
#define UART_BASE_ADDRESS CONFIG_SERIAL_MMIO_BASE
|
||||
#else
|
||||
#warning "no uart base configure, please check!"
|
||||
static bool serial_port_mapped;
|
||||
static bool uart_enabled;
|
||||
#define UART_BASE_ADDRESS 0UL
|
||||
|
|
Loading…
Reference in New Issue