From 4b4e995988884855b800ccb392847965aec3cd83 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Sun, 28 Jun 2020 21:28:54 +0300 Subject: sb/intel: Factor out soc_fill_gnvs() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Name the common part of GNVS initialisation as soc_fill_gnvs(). It is also moved before the call to acpi_create_gnvs(), which followup will rename to mainbord_fill_gnvs() to reflect that implementation is under mb/. Change-Id: Ic4cf1548b65a86212d6e45d460fcd23bb8036365 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/48706 Reviewed-by: Lance Zhao Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/soc/intel/broadwell/pch/lpc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/soc/intel/broadwell') diff --git a/src/soc/intel/broadwell/pch/lpc.c b/src/soc/intel/broadwell/pch/lpc.c index 60c65cbaaa..7c6cf8268d 100644 --- a/src/soc/intel/broadwell/pch/lpc.c +++ b/src/soc/intel/broadwell/pch/lpc.c @@ -600,18 +600,22 @@ static void pch_lpc_read_resources(struct device *dev) pch_lpc_add_io_resources(dev); } -static void southcluster_inject_dsdt(const struct device *device) +void soc_fill_gnvs(struct global_nvs *gnvs) { - struct global_nvs *gnvs = acpi_get_gnvs(); - if (!gnvs) - return; - /* Set unknown wake source */ gnvs->pm1i = -1; /* CPU core count */ gnvs->pcnt = dev_count_cpu(); +} + +static void southcluster_inject_dsdt(const struct device *device) +{ + struct global_nvs *gnvs = acpi_get_gnvs(); + if (!gnvs) + return; + soc_fill_gnvs(gnvs); acpi_create_gnvs(gnvs); acpi_inject_nvsa(); } -- cgit v1.2.3