drivers/pc80/rtc: Clean up some inlined functions

Change-Id: Ie73797b4e9a09605a0685f0b03cb85e9a3be93ad
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38179
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Kyösti Mälkki
2020-01-04 17:38:17 +02:00
parent a0259b4273
commit 1a9b7b50c7
3 changed files with 45 additions and 45 deletions

View File

@@ -19,14 +19,6 @@
#include <option_table.h>
#endif
int cmos_error(void)
{
unsigned char reg_d;
/* See if the cmos error condition has been flagged */
reg_d = cmos_read(RTC_REG_D);
return (reg_d & RTC_VRT) == 0;
}
int cmos_chksum_valid(void)
{
#if CONFIG(USE_OPTION_TABLE)
@@ -59,10 +51,10 @@ void sanitize_cmos(void)
CBFS_COMPONENT_CMOS_DEFAULT, &length);
if (cmos_default) {
size_t i;
cmos_disable_rtc();
u8 control_state = cmos_disable_rtc();
for (i = 14; i < MIN(128, length); i++)
cmos_write_inner(cmos_default[i], i);
cmos_enable_rtc();
cmos_restore_rtc(control_state);
}
}
}
@@ -72,22 +64,22 @@ void sanitize_cmos(void)
#error "CONFIG_MAX_REBOOT_CNT too high"
#endif
static inline int boot_count(uint8_t rtc_byte)
static int boot_count(uint8_t rtc_byte)
{
return rtc_byte >> 4;
}
static inline uint8_t increment_boot_count(uint8_t rtc_byte)
static uint8_t increment_boot_count(uint8_t rtc_byte)
{
return rtc_byte + (1 << 4);
}
static inline uint8_t boot_set_fallback(uint8_t rtc_byte)
static uint8_t boot_set_fallback(uint8_t rtc_byte)
{
return rtc_byte & ~RTC_BOOT_NORMAL;
}
static inline int boot_use_normal(uint8_t rtc_byte)
static int boot_use_normal(uint8_t rtc_byte)
{
return rtc_byte & RTC_BOOT_NORMAL;
}