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>
This commit is contained in:
parent
5ddfaf0807
commit
38f89f37bf
|
@ -34,9 +34,8 @@ void mainboard_pre_raminit_config(int s3_resume)
|
||||||
void mainboard_lpc_decode(void)
|
void mainboard_lpc_decode(void)
|
||||||
{
|
{
|
||||||
int lpt_en = 0;
|
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 */
|
lpt_en = LPT_LPC_EN; /* enable LPT */
|
||||||
|
|
||||||
// decode range
|
// decode range
|
||||||
|
|
|
@ -14,9 +14,8 @@
|
||||||
void mainboard_lpc_decode(void)
|
void mainboard_lpc_decode(void)
|
||||||
{
|
{
|
||||||
int lpt_en = 0;
|
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 */
|
lpt_en = LPT_LPC_EN; /* enable LPT */
|
||||||
|
|
||||||
pci_update_config16(PCI_DEV(0, 0x1f, 0), LPC_EN, ~LPT_LPC_EN, lpt_en);
|
pci_update_config16(PCI_DEV(0, 0x1f, 0), LPC_EN, ~LPT_LPC_EN, lpt_en);
|
||||||
|
|
|
@ -16,9 +16,8 @@
|
||||||
void mainboard_lpc_decode(void)
|
void mainboard_lpc_decode(void)
|
||||||
{
|
{
|
||||||
int lpt_en = 0;
|
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 */
|
lpt_en = LPT_LPC_EN; /* enable LPT */
|
||||||
|
|
||||||
pci_write_config16(PCI_DEV(0, 0x1f, 0), LPC_IO_DEC, 0x0007);
|
pci_write_config16(PCI_DEV(0, 0x1f, 0), LPC_IO_DEC, 0x0007);
|
||||||
|
|
Loading…
Reference in New Issue