summaryrefslogtreecommitdiff
path: root/src/superio/nuvoton/common
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2020-10-03 08:57:57 +0200
committerNico Huber <nico.h@gmx.de>2020-10-13 17:16:19 +0000
commitf710bf65dcd824854a5d0c2020ebd636dd08a861 (patch)
treeae0a454799934eac7b7414ed27b47c04f3a887da /src/superio/nuvoton/common
parenta2118c7b54f310ab25f44bf4682a01b15c955151 (diff)
superio/nuvoton/common: Collapse two if statements
There are more devices requiring this code, so avoid duplicating the if block over and over. Change-Id: Ib4f787e3c883b1fec941de77bc8e19ccf0d5224c Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45970 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/superio/nuvoton/common')
-rw-r--r--src/superio/nuvoton/common/early_serial.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/superio/nuvoton/common/early_serial.c b/src/superio/nuvoton/common/early_serial.c
index 22d882ef1a..cc21f40d2a 100644
--- a/src/superio/nuvoton/common/early_serial.c
+++ b/src/superio/nuvoton/common/early_serial.c
@@ -52,11 +52,8 @@ void nuvoton_enable_serial(pnp_devfn_t dev, u16 iobase)
nuvoton_pnp_enter_conf_state(dev);
- if (CONFIG(SUPERIO_NUVOTON_NCT5539D_COM_A))
- /* Route COM A to GPIO8 pin group */
- pnp_write_config(dev, 0x2a, 0x40);
-
- if (CONFIG(SUPERIO_NUVOTON_NCT6776_COM_A))
+ if (CONFIG(SUPERIO_NUVOTON_NCT5539D_COM_A) ||
+ CONFIG(SUPERIO_NUVOTON_NCT6776_COM_A))
/* Route COM A to GPIO8 pin group */
pnp_write_config(dev, 0x2a, 0x40);