soc/intel/broadwell: Use init_vbnv_cmos from vboot vbnv
BUG=chrome-os-partner:55639 Change-Id: Ie38cdbec513e2bb66e276399c8b4490cbe34a747 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/15924 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
baf88d3703
commit
0faf401823
|
@ -172,25 +172,6 @@ static void pch_power_options(device_t dev)
|
||||||
enable_alt_smi(config->alt_gp_smi_en);
|
enable_alt_smi(config->alt_gp_smi_en);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CHROMEOS) && 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(struct device *dev)
|
static void pch_rtc_init(struct device *dev)
|
||||||
{
|
{
|
||||||
u8 reg8;
|
u8 reg8;
|
||||||
|
@ -204,11 +185,10 @@ static void pch_rtc_init(struct device *dev)
|
||||||
printk(BIOS_DEBUG, "rtc_failed = 0x%x\n", rtc_failed);
|
printk(BIOS_DEBUG, "rtc_failed = 0x%x\n", rtc_failed);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CHROMEOS) && IS_ENABLED(CONFIG_VBOOT_VBNV_CMOS)
|
if (IS_ENABLED(CONFIG_VBOOT_VBNV_CMOS))
|
||||||
pch_cmos_init_preserve(rtc_failed);
|
init_vbnv_cmos(rtc_failed);
|
||||||
#else
|
else
|
||||||
cmos_init(rtc_failed);
|
cmos_init(rtc_failed);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct reg_script pch_misc_init_script[] = {
|
static const struct reg_script pch_misc_init_script[] = {
|
||||||
|
|
Loading…
Reference in New Issue