summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-04-26 17:10:28 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-05-06 14:48:15 +0000
commit88dcb3179b4b78a2376609577ae4dd4327fb59c7 (patch)
tree9c1ae01959fb4d084ea30893a196687c7b611fff /src/soc
parenta2cf34129fb3b2a9302bb7cf06e4ee758b9bb85a (diff)
src: Retype option API to use unsigned integers
The CMOS option system does not support negative integers. Thus, retype and rename the option API functions to reflect this. Change-Id: Id3480e5cfc0ec90674def7ef0919e0b7ac5b19b3 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52672 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/broadwell/pch/lpc.c2
-rw-r--r--src/soc/intel/broadwell/pch/smihandler.c2
-rw-r--r--src/soc/intel/common/block/pmc/pmclib.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/soc/intel/broadwell/pch/lpc.c b/src/soc/intel/broadwell/pch/lpc.c
index 9981624f88..f7835db68b 100644
--- a/src/soc/intel/broadwell/pch/lpc.c
+++ b/src/soc/intel/broadwell/pch/lpc.c
@@ -132,7 +132,7 @@ static void pch_power_options(struct device *dev)
*
* If the option is not existent (Laptops), use Kconfig setting.
*/
- const int pwr_on = get_int_option("power_on_after_fail",
+ const unsigned int pwr_on = get_uint_option("power_on_after_fail",
CONFIG_MAINBOARD_POWER_FAILURE_STATE);
reg16 = pci_read_config16(dev, GEN_PMCON_3);
diff --git a/src/soc/intel/broadwell/pch/smihandler.c b/src/soc/intel/broadwell/pch/smihandler.c
index 262ed47a18..a8e206783d 100644
--- a/src/soc/intel/broadwell/pch/smihandler.c
+++ b/src/soc/intel/broadwell/pch/smihandler.c
@@ -131,7 +131,7 @@ static int power_on_after_fail(void)
u8 tmp70, tmp72;
tmp70 = inb(0x70);
tmp72 = inb(0x72);
- const int s5pwr = get_int_option("power_on_after_fail",
+ const unsigned int s5pwr = get_uint_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 935dd0c606..aa5b3621f1 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -583,7 +583,7 @@ void pmc_set_power_failure_state(const bool target_on)
{
bool on;
- const int state = get_int_option("power_on_after_fail",
+ const unsigned int state = get_uint_option("power_on_after_fail",
CONFIG_MAINBOARD_POWER_FAILURE_STATE);
switch (state) {