Angel Pons has uploaded this change for review.

View Change

mb/**/early_init.c: Use `read_option_u8` helper

Change-Id: I460cad0cc671be830d0fa0f68a531acaea7effcc
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
---
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(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/47134/1
diff --git a/src/mainboard/getac/p470/early_init.c b/src/mainboard/getac/p470/early_init.c
index 087e279..1796f5b 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 (read_option_u8("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..b24ff1d 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 (read_option_u8("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..0eb5917 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 (read_option_u8("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: 1
Gerrit-Owner: Angel Pons <th3fanbus@gmail.com>
Gerrit-MessageType: newchange