From bee82ab798c542051bda684fed3921be5923c84e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Thu, 26 Dec 2019 10:57:43 +0200 Subject: [PATCH] Replace last uses of read_option() with get_option() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I63e80953195a6c524392da42b268efe3012ed41b Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/37953 Reviewed-by: Angel Pons Reviewed-by: Paul Menzel Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/mainboard/getac/p470/early_init.c | 6 ++++-- src/mainboard/kontron/986lcd-m/early_init.c | 4 +++- src/mainboard/roda/rk886ex/early_init.c | 4 +++- 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 1ce44ae9d7..8272d5eb8a 100644 --- a/src/mainboard/getac/p470/early_init.c +++ b/src/mainboard/getac/p470/early_init.c @@ -50,8 +50,10 @@ void mainboard_pre_raminit_config(int s3_resume) 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 0423b2c373..80ce896323 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 6f0a12c335..597501a97b 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);