diff options
author | Furquan Shaikh <furquan@google.com> | 2016-07-27 14:32:42 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2016-07-28 00:41:55 +0200 |
commit | 3339861435e5e6bba339d63573b32241281e1b80 (patch) | |
tree | da0368c58c7074be53fe07f94d2b30c1354a67d7 /src/soc | |
parent | 0faf40182327f9bc640d59d16e2ad6ae583f4155 (diff) | |
download | coreboot-3339861435e5e6bba339d63573b32241281e1b80.tar.xz |
soc/intel/skylake: Use init_vbnv_cmos from vboot vbnv
BUG=chrome-os-partner:55639
Change-Id: I7a536bc1cab51e7c942b2e0e48dfe18d8de08a6e
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/15925
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/skylake/pmc.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/soc/intel/skylake/pmc.c b/src/soc/intel/skylake/pmc.c index a8ec7b6a8e..fd04287f37 100644 --- a/src/soc/intel/skylake/pmc.c +++ b/src/soc/intel/skylake/pmc.c @@ -106,24 +106,6 @@ static void pch_set_acpi_mode(void) } } -#if IS_ENABLED(CONFIG_VBOOT_VBNV_CMOS) -/* - * Preserve Vboot NV data when clearing CMOS as it will - * have been re-initialized already by Vboot firmware init. - */ -static void pch_cmos_init_preserve(int reset) -{ - uint8_t vbnv[VBOOT_VBNV_BLOCK_SIZE]; - if (reset) - read_vbnv(vbnv); - - cmos_init(reset); - - if (reset) - save_vbnv(vbnv); -} -#endif - static void pch_rtc_init(void) { u8 reg8; @@ -141,11 +123,10 @@ static void pch_rtc_init(void) /* Ensure the date is set including century byte. */ cmos_check_update_date(); -#if IS_ENABLED(CONFIG_VBOOT_VBNV_CMOS) - pch_cmos_init_preserve(rtc_failed); -#else - cmos_init(rtc_failed); -#endif + if (IS_ENABLED(CONFIG_VBOOT_VBNV_CMOS)) + init_vbnv_cmos(rtc_failed); + else + cmos_init(rtc_failed); } static void pmc_gpe_init(config_t *config) |