Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47134 )
Change subject: mb/**/early_init.c: Use `read_option_u8` helper ......................................................................
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);
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47134
to look at the new patch set (#4).
Change subject: mb/**/early_init.c: Use get_int_option() ......................................................................
mb/**/early_init.c: Use get_int_option()
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/4
Attention is currently required from: Angel Pons. Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47134 )
Change subject: mb/**/early_init.c: Use get_int_option() ......................................................................
Patch Set 6: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47134 )
Change subject: mb/**/early_init.c: Use get_int_option() ......................................................................
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(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved
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);