[coreboot-gerrit] New patch to review for coreboot: intel/soc/broadwell: Use init_vbnv_cmos from vboot vbnv

Furquan Shaikh (furquan@google.com) gerrit at coreboot.org
Wed Jul 27 23:33:47 CEST 2016


Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15924

-gerrit

commit d4650a863ff02becd60a4dbd26c4081798263b96
Author: Furquan Shaikh <furquan at google.com>
Date:   Wed Jul 27 14:31:16 2016 -0700

    intel/soc/broadwell: Use init_vbnv_cmos from vboot vbnv
    
    BUG=chrome-os-partner:55639
    
    Change-Id: Ie38cdbec513e2bb66e276399c8b4490cbe34a747
    Signed-off-by: Furquan Shaikh <furquan at google.com>
---
 src/soc/intel/broadwell/lpc.c | 28 ++++------------------------
 1 file changed, 4 insertions(+), 24 deletions(-)

diff --git a/src/soc/intel/broadwell/lpc.c b/src/soc/intel/broadwell/lpc.c
index 20fa345..7ec9b46 100644
--- a/src/soc/intel/broadwell/lpc.c
+++ b/src/soc/intel/broadwell/lpc.c
@@ -172,25 +172,6 @@ static void pch_power_options(device_t dev)
 	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)
 {
 	u8 reg8;
@@ -204,11 +185,10 @@ static void pch_rtc_init(struct device *dev)
 		printk(BIOS_DEBUG, "rtc_failed = 0x%x\n", rtc_failed);
 	}
 
-#if IS_ENABLED(CONFIG_CHROMEOS) && 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 const struct reg_script pch_misc_init_script[] = {



More information about the coreboot-gerrit mailing list