{sb,soc}/intel: Use get_int_option
function
Change-Id: I05f724785880089a513319d70dfd70fc2a6b7679 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47109 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
committed by
Patrick Georgi
parent
5daa412939
commit
62719a3797
@@ -150,17 +150,13 @@ static void i82801gx_power_options(struct device *dev)
|
||||
/* Get the chip configuration */
|
||||
const struct southbridge_intel_i82801gx_config *config = dev->chip_info;
|
||||
|
||||
int pwr_on = CONFIG_MAINBOARD_POWER_FAILURE_STATE;
|
||||
int nmi_option;
|
||||
|
||||
/* Which state do we want to goto after g3 (power restored)?
|
||||
* 0 == S0 Full On
|
||||
* 1 == S5 Soft Off
|
||||
*
|
||||
* If the option is not existent (Laptops), use MAINBOARD_POWER_ON.
|
||||
*/
|
||||
pwr_on = MAINBOARD_POWER_ON;
|
||||
get_option(&pwr_on, "power_on_after_fail");
|
||||
const int pwr_on = get_int_option("power_on_after_fail", MAINBOARD_POWER_ON);
|
||||
|
||||
reg8 = pci_read_config8(dev, GEN_PMCON_3);
|
||||
reg8 &= 0xfe;
|
||||
@@ -196,8 +192,7 @@ static void i82801gx_power_options(struct device *dev)
|
||||
outb(reg8, 0x61);
|
||||
|
||||
reg8 = inb(0x70);
|
||||
nmi_option = NMI_OFF;
|
||||
get_option(&nmi_option, "nmi");
|
||||
const int nmi_option = get_int_option("nmi", NMI_OFF);
|
||||
if (nmi_option) {
|
||||
printk(BIOS_INFO, "NMI sources enabled.\n");
|
||||
reg8 &= ~(1 << 7); /* Set NMI. */
|
||||
|
Reference in New Issue
Block a user