sb/intel/bd82x6x: Use {get,set}_int_option
Change-Id: Icbfea8c516c42b45d689da92b7e426cb6d5112a5
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52509
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
diff --git a/src/southbridge/intel/bd82x6x/me.c b/src/southbridge/intel/bd82x6x/me.c
index cda2540..7ffef42 100644
--- a/src/southbridge/intel/bd82x6x/me.c
+++ b/src/southbridge/intel/bd82x6x/me.c
@@ -178,15 +178,14 @@
static void intel_me_init(struct device *dev)
{
me_bios_path path = intel_me_path(dev);
- u8 me_state = 0, me_state_prev = 0;
bool need_reset = false;
union me_hfs hfs;
/* Do initial setup and determine the BIOS path */
printk(BIOS_NOTICE, "ME: BIOS path: %s\n", me_get_bios_path_string(path));
- get_option(&me_state, "me_state");
- get_option(&me_state_prev, "me_state_prev");
+ u8 me_state = get_int_option("me_state", 0);
+ u8 me_state_prev = get_int_option("me_state_prev", 0);
printk(BIOS_DEBUG, "ME: me_state=%u, me_state_prev=%u\n", me_state, me_state_prev);
@@ -269,7 +268,7 @@
set the 'changed' bit here. */
if (me_state != CMOS_ME_STATE(me_state_prev) || need_reset) {
u8 new_state = me_state | CMOS_ME_STATE_CHANGED;
- set_option("me_state_prev", &new_state);
+ set_int_option("me_state_prev", new_state);
}
if (need_reset) {
diff --git a/src/southbridge/intel/bd82x6x/me_8.x.c b/src/southbridge/intel/bd82x6x/me_8.x.c
index abca881..3c5fcd1 100644
--- a/src/southbridge/intel/bd82x6x/me_8.x.c
+++ b/src/southbridge/intel/bd82x6x/me_8.x.c
@@ -176,15 +176,14 @@
{
me_bios_path path = intel_me_path(dev);
me_bios_payload mbp_data;
- u8 me_state = 0, me_state_prev = 0;
bool need_reset = false;
union me_hfs hfs;
/* Do initial setup and determine the BIOS path */
printk(BIOS_NOTICE, "ME: BIOS path: %s\n", me_get_bios_path_string(path));
- get_option(&me_state, "me_state");
- get_option(&me_state_prev, "me_state_prev");
+ u8 me_state = get_int_option("me_state", 0);
+ u8 me_state_prev = get_int_option("me_state_prev", 0);
printk(BIOS_DEBUG, "ME: me_state=%u, me_state_prev=%u\n", me_state, me_state_prev);
@@ -268,7 +267,7 @@
set the 'changed' bit here. */
if (me_state != CMOS_ME_STATE(me_state_prev) || need_reset) {
u8 new_state = me_state | CMOS_ME_STATE_CHANGED;
- set_option("me_state_prev", &new_state);
+ set_int_option("me_state_prev", new_state);
}
if (need_reset) {