vboot: remove init_vbnv_cmos()

Instead of having each potential caller deal with the differences
of cmos_init() and init_vbnv_cmos() when VBOOT is enabled put the
correct logic within the callee, cmos_init(), for handling the
vbnv in CMOS. The internal __cmos_init() routine returns when the
CMOS area was cleared.

BUG=b:63054105

Change-Id: Ia124bcd61d3ac03e899a4ecf3645fc4b7a558f03
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/21549
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Aaron Durbin
2017-09-15 11:01:17 -06:00
parent aa51cd5c12
commit 9fde0d780d
8 changed files with 36 additions and 47 deletions

View File

@@ -17,7 +17,6 @@
#include <intelblocks/rtc.h>
#include <soc/pcr_ids.h>
#include <pc80/mc146818rtc.h>
#include <vboot/vbnv.h>
/* RTC PCR configuration */
#define PCR_RTC_CONF 0x3400
@@ -39,14 +38,8 @@ __attribute__((weak)) int soc_get_rtc_failed(void)
void rtc_init(void)
{
int rtc_failed;
rtc_failed = soc_get_rtc_failed();
/* Ensure the date is set including century byte. */
cmos_check_update_date();
if (IS_ENABLED(CONFIG_VBOOT_VBNV_CMOS))
init_vbnv_cmos(rtc_failed);
else
cmos_init(rtc_failed);
cmos_init(soc_get_rtc_failed());
}