summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/broadwell/pch/lpc.c4
-rw-r--r--src/soc/intel/broadwell/pch/smihandler.c5
-rw-r--r--src/soc/intel/common/block/pmc/pmclib.c4
3 files changed, 6 insertions, 7 deletions
diff --git a/src/soc/intel/broadwell/pch/lpc.c b/src/soc/intel/broadwell/pch/lpc.c
index 170f88998f..9981624f88 100644
--- a/src/soc/intel/broadwell/pch/lpc.c
+++ b/src/soc/intel/broadwell/pch/lpc.c
@@ -125,7 +125,6 @@ static void pch_power_options(struct device *dev)
{
u16 reg16;
const char *state;
- int pwr_on = CONFIG_MAINBOARD_POWER_FAILURE_STATE;
/* Which state do we want to goto after g3 (power restored)?
* 0 == S0 Full On
@@ -133,7 +132,8 @@ static void pch_power_options(struct device *dev)
*
* If the option is not existent (Laptops), use Kconfig setting.
*/
- get_option(&pwr_on, "power_on_after_fail");
+ const int pwr_on = get_int_option("power_on_after_fail",
+ CONFIG_MAINBOARD_POWER_FAILURE_STATE);
reg16 = pci_read_config16(dev, GEN_PMCON_3);
reg16 &= 0xfffe;
diff --git a/src/soc/intel/broadwell/pch/smihandler.c b/src/soc/intel/broadwell/pch/smihandler.c
index 542b330221..262ed47a18 100644
--- a/src/soc/intel/broadwell/pch/smihandler.c
+++ b/src/soc/intel/broadwell/pch/smihandler.c
@@ -127,13 +127,12 @@ static void backlight_off(void)
static int power_on_after_fail(void)
{
- u8 s5pwr = CONFIG_MAINBOARD_POWER_FAILURE_STATE;
-
/* save and recover RTC port values */
u8 tmp70, tmp72;
tmp70 = inb(0x70);
tmp72 = inb(0x72);
- get_option(&s5pwr, "power_on_after_fail");
+ const int s5pwr = get_int_option("power_on_after_fail",
+ CONFIG_MAINBOARD_POWER_FAILURE_STATE);
outb(tmp70, 0x70);
outb(tmp72, 0x72);
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c
index 3b7aa0a169..935dd0c606 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -583,8 +583,8 @@ void pmc_set_power_failure_state(const bool target_on)
{
bool on;
- uint8_t state = CONFIG_MAINBOARD_POWER_FAILURE_STATE;
- get_option(&state, "power_on_after_fail");
+ const int state = get_int_option("power_on_after_fail",
+ CONFIG_MAINBOARD_POWER_FAILURE_STATE);
switch (state) {
case MAINBOARD_POWER_STATE_OFF: