sio/nuvoton/common/early_serial.c: Guard serial enable

If CONSOLE_SERIAL is not set, do not reconfigure the UART LDN.
Otherwise, SerialICE stops working when the UART LDN is disabled.

Change-Id: Ie3113e6b7b830dfdddc4d7709f00719f29e094bf
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43582
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Angel Pons 2020-07-19 01:38:28 +02:00 committed by Nico Huber
parent 75db8c8ea8
commit 45d5f8f163
1 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,9 @@ void nuvoton_pnp_exit_conf_state(pnp_devfn_t dev)
/* Bring up early serial debugging output before the RAM is initialized. */ /* Bring up early serial debugging output before the RAM is initialized. */
void nuvoton_enable_serial(pnp_devfn_t dev, u16 iobase) void nuvoton_enable_serial(pnp_devfn_t dev, u16 iobase)
{ {
if (!CONFIG(CONSOLE_SERIAL))
return;
nuvoton_pnp_enter_conf_state(dev); nuvoton_pnp_enter_conf_state(dev);
if (CONFIG(SUPERIO_NUVOTON_NCT5539D_COM_A)) if (CONFIG(SUPERIO_NUVOTON_NCT5539D_COM_A))