Patrick Georgi submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved
mb/**/early_init.c: Use get_int_option()

Change-Id: I460cad0cc671be830d0fa0f68a531acaea7effcc
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47134
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
---
M src/mainboard/getac/p470/early_init.c
M src/mainboard/kontron/986lcd-m/early_init.c
M src/mainboard/roda/rk886ex/early_init.c
3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/mainboard/getac/p470/early_init.c b/src/mainboard/getac/p470/early_init.c
index 087e279..1ca9b79 100644
--- a/src/mainboard/getac/p470/early_init.c
+++ b/src/mainboard/getac/p470/early_init.c
@@ -34,9 +34,8 @@
void mainboard_lpc_decode(void)
{
int lpt_en = 0;
- u8 val;

- if (get_option(&val, "lpt") == CB_SUCCESS && val)
+ if (get_int_option("lpt", 0))
lpt_en = LPT_LPC_EN; /* enable LPT */

// decode range
diff --git a/src/mainboard/kontron/986lcd-m/early_init.c b/src/mainboard/kontron/986lcd-m/early_init.c
index 9022198..ff3babb 100644
--- a/src/mainboard/kontron/986lcd-m/early_init.c
+++ b/src/mainboard/kontron/986lcd-m/early_init.c
@@ -14,9 +14,8 @@
void mainboard_lpc_decode(void)
{
int lpt_en = 0;
- u8 val;

- if (get_option(&val, "lpt") == CB_SUCCESS && val)
+ if (get_int_option("lpt", 0))
lpt_en = LPT_LPC_EN; /* enable LPT */

pci_update_config16(PCI_DEV(0, 0x1f, 0), LPC_EN, ~LPT_LPC_EN, lpt_en);
diff --git a/src/mainboard/roda/rk886ex/early_init.c b/src/mainboard/roda/rk886ex/early_init.c
index 21f115c..8f6cedd 100644
--- a/src/mainboard/roda/rk886ex/early_init.c
+++ b/src/mainboard/roda/rk886ex/early_init.c
@@ -16,9 +16,8 @@
void mainboard_lpc_decode(void)
{
int lpt_en = 0;
- u8 val;

- if (get_option(&val, "lpt") == CB_SUCCESS && val)
+ if (get_int_option("lpt", 0))
lpt_en = LPT_LPC_EN; /* enable LPT */

pci_write_config16(PCI_DEV(0, 0x1f, 0), LPC_IO_DEC, 0x0007);

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I460cad0cc671be830d0fa0f68a531acaea7effcc
Gerrit-Change-Number: 47134
Gerrit-PatchSet: 7
Gerrit-Owner: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-MessageType: merged