diff options
author | Angel Pons <th3fanbus@gmail.com> | 2020-11-02 22:49:51 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-04-21 09:06:30 +0000 |
commit | f8a5eb2e4afc190214ba5f1766998a1812f69a40 (patch) | |
tree | aa8b375900a20bd721ceb113fe335110e47684de /src/mainboard/dell | |
parent | 0b7813fe97121eb7cb9c0b8ac59e604e9f613679 (diff) |
mainboard: Use read_int_option()
Change-Id: I9273b90b6a21b8f52fa42d9ff03a9b56eec9fcbf
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47137
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/mainboard/dell')
-rw-r--r-- | src/mainboard/dell/optiplex_9010/sch5545_ec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mainboard/dell/optiplex_9010/sch5545_ec.c b/src/mainboard/dell/optiplex_9010/sch5545_ec.c index 8110963c52..db13495aad 100644 --- a/src/mainboard/dell/optiplex_9010/sch5545_ec.c +++ b/src/mainboard/dell/optiplex_9010/sch5545_ec.c @@ -603,7 +603,7 @@ static void prepare_for_hwm_ec_sequence(uint8_t write_only, uint8_t *value) void sch5545_ec_hwm_init(void *unused) { - uint8_t val = 0, val_2fc, chassis_type, fan_speed_full = 0; + uint8_t val = 0, val_2fc, chassis_type; printk(BIOS_DEBUG, "%s\n", __func__); sch5545_emi_init(0x2e); @@ -656,9 +656,12 @@ void sch5545_ec_hwm_init(void *unused) ec_read_write_reg(EC_HWM_LDN, 0x02fc, &val_2fc, WRITE_OP); - if (get_option(&fan_speed_full, "fan_full_speed") != CB_SUCCESS) + int fan_speed_full = get_int_option("fan_full_speed", -1); + if (fan_speed_full < 0) { + fan_speed_full = 0; printk(BIOS_INFO, "fan_full_speed CMOS option not found. " "Fans will be set up for automatic control\n"); + } if (fan_speed_full) { ec_read_write_reg(EC_HWM_LDN, 0x0080, &val, READ_OP); |