Nico Huber submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Felix Held: Looks good to me, but someone else must approve Angel Pons: Looks good to me, approved
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>
---
M src/superio/nuvoton/common/early_serial.c
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/superio/nuvoton/common/early_serial.c b/src/superio/nuvoton/common/early_serial.c
index 22d882e..cc21f40 100644
--- a/src/superio/nuvoton/common/early_serial.c
+++ b/src/superio/nuvoton/common/early_serial.c
@@ -52,11 +52,8 @@

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);


To view, visit change 45970. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib4f787e3c883b1fec941de77bc8e19ccf0d5224c
Gerrit-Change-Number: 45970
Gerrit-PatchSet: 5
Gerrit-Owner: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged