drivers/pc80/mc146818rtc_early: Honor Kconfig reboot count clear setting

Change-Id: I6426ea2ca1732a6edfae059fe5dbf4f398bc9b98
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: http://review.coreboot.org/9155
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Timothy Pearson 2015-03-28 14:59:50 -05:00 committed by Stefan Reinauer
parent 68bfe16b44
commit a080260dbd
1 changed files with 4 additions and 4 deletions

View File

@ -67,10 +67,10 @@ static inline __attribute__((unused)) int do_normal_boot(void)
/* The RTC_BOOT_BYTE is now o.k. see where to go. */ /* The RTC_BOOT_BYTE is now o.k. see where to go. */
byte = cmos_read(RTC_BOOT_BYTE); byte = cmos_read(RTC_BOOT_BYTE);
/* Are we in normal mode? */ if (!IS_ENABLED(CONFIG_SKIP_MAX_REBOOT_CNT_CLEAR))
if (byte & 1) { /* Are we in normal mode? */
byte &= 0x0f; /* yes, clear the boot count */ if (byte & 1)
} byte &= 0x0f; /* yes, clear the boot count */
/* Properly set the last boot flag */ /* Properly set the last boot flag */
byte &= 0xfc; byte &= 0xfc;