Kyösti Mälkki submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Paul Menzel: Looks good to me, but someone else must approve Angel Pons: Looks good to me, approved
Replace last uses of read_option() with get_option()

Change-Id: I63e80953195a6c524392da42b268efe3012ed41b
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37953
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.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, 10 insertions(+), 4 deletions(-)

diff --git a/src/mainboard/getac/p470/early_init.c b/src/mainboard/getac/p470/early_init.c
index 1ce44ae..8272d5e 100644
--- a/src/mainboard/getac/p470/early_init.c
+++ b/src/mainboard/getac/p470/early_init.c
@@ -50,8 +50,10 @@
void mainboard_lpc_decode(void)
{
int lpt_en = 0;
- if (read_option(lpt, 0) != 0)
- lpt_en = LPT_LPC_EN;
+ u8 val;
+
+ if (get_option(&val, "lpt") == CB_SUCCESS && val)
+ lpt_en = LPT_LPC_EN; /* enable LPT */

// decode range
pci_write_config16(PCI_DEV(0, 0x1f, 0), LPC_IO_DEC, 0x0007);
diff --git a/src/mainboard/kontron/986lcd-m/early_init.c b/src/mainboard/kontron/986lcd-m/early_init.c
index 0423b2c..80ce896 100644
--- a/src/mainboard/kontron/986lcd-m/early_init.c
+++ b/src/mainboard/kontron/986lcd-m/early_init.c
@@ -29,7 +29,9 @@
void mainboard_lpc_decode(void)
{
int lpt_en = 0;
- if (read_option(lpt, 0) != 0)
+ u8 val;
+
+ if (get_option(&val, "lpt") == CB_SUCCESS && val)
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 6f0a12c..597501a 100644
--- a/src/mainboard/roda/rk886ex/early_init.c
+++ b/src/mainboard/roda/rk886ex/early_init.c
@@ -32,7 +32,9 @@
void mainboard_lpc_decode(void)
{
int lpt_en = 0;
- if (read_option(lpt, 0) != 0)
+ u8 val;
+
+ if (get_option(&val, "lpt") == CB_SUCCESS && val)
lpt_en = LPT_LPC_EN; /* enable LPT */

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

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I63e80953195a6c524392da42b268efe3012ed41b
Gerrit-Change-Number: 37953
Gerrit-PatchSet: 3
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged