From 3cbf8d955f48fc39d5b3087934cbc5739ba07c5a Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Thu, 28 Jan 2016 10:26:31 -0800 Subject: chromeos: Remove CONFIG_VBNV_SIZE variable The VBNV region size is determined by vboot and is not really configurable. Only the CMOS implementation defined this config variable so switch it to use VBNV_BLOCK_SIZE defined by vboot in vbnv_layout.h instead. This requires updating the broadwell/skylake cmos reset functions to use the right constant. BUG=chrome-os-partner:47915 BRANCH=glados TEST=manually tested on chell Change-Id: I45e3efc2a22efcb1470bbbefbdae4eda33fc6c96 Signed-off-by: Patrick Georgi Original-Commit-Id: e2b803ff3ac30ab22d65d1e62aca623730999a1d Original-Change-Id: I4896a1a5b7889d77ad00c4c8f285d184c4218e17 Original-Signed-off-by: Duncan Laurie Original-Reviewed-on: https://chromium-review.googlesource.com/324520 Original-Reviewed-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/13598 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/intel/broadwell/lpc.c | 3 ++- src/soc/intel/skylake/pmc.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/soc') diff --git a/src/soc/intel/broadwell/lpc.c b/src/soc/intel/broadwell/lpc.c index c77995d652..7e57b23504 100644 --- a/src/soc/intel/broadwell/lpc.c +++ b/src/soc/intel/broadwell/lpc.c @@ -47,6 +47,7 @@ #if IS_ENABLED(CONFIG_CHROMEOS) #include +#include #endif static void pch_enable_ioapic(struct device *dev) @@ -181,7 +182,7 @@ static void pch_power_options(device_t dev) */ static void pch_cmos_init_preserve(int reset) { - uint8_t vbnv[CONFIG_VBNV_SIZE]; + uint8_t vbnv[VBNV_BLOCK_SIZE]; if (reset) read_vbnv(vbnv); diff --git a/src/soc/intel/skylake/pmc.c b/src/soc/intel/skylake/pmc.c index a2d88aa8a4..eb7a16036d 100644 --- a/src/soc/intel/skylake/pmc.c +++ b/src/soc/intel/skylake/pmc.c @@ -37,6 +37,7 @@ #include #if IS_ENABLED(CONFIG_CHROMEOS) #include +#include #endif static const struct reg_script pch_pmc_misc_init_script[] = { @@ -114,7 +115,7 @@ static void pch_set_acpi_mode(void) */ static void pch_cmos_init_preserve(int reset) { - uint8_t vbnv[CONFIG_VBNV_SIZE]; + uint8_t vbnv[VBNV_BLOCK_SIZE]; if (reset) read_vbnv(vbnv); -- cgit v1.2.3