From 5daa1d38985a19dc84f2299dba2e340dda2870ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 14 Jun 2020 12:01:58 +0300 Subject: ACPI: Replace uses of CBMEM_ID_ACPI_GNVS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are the simple cbmem_find() cases. Also drop the redundant error messages. Change-Id: I78e5445eb09c322ff94fe4f65345eb2997bd10ef Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/42361 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Nico Huber --- src/soc/intel/common/acpi_wake_source.c | 4 ++-- src/soc/intel/common/block/acpi/acpi.c | 3 ++- src/soc/intel/common/block/uart/uart.c | 4 ++-- src/soc/intel/common/nhlt.c | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/soc/intel/common') diff --git a/src/soc/intel/common/acpi_wake_source.c b/src/soc/intel/common/acpi_wake_source.c index 9f30366a7b..1342c80ebd 100644 --- a/src/soc/intel/common/acpi_wake_source.c +++ b/src/soc/intel/common/acpi_wake_source.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include -#include #include #include #include @@ -16,7 +16,7 @@ __weak int soc_fill_acpi_wake(uint32_t *pm1, uint32_t **gpe0) /* Save wake source data for ACPI _SWS methods in NVS */ static void acpi_save_wake_source(void *unused) { - global_nvs_t *gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); + global_nvs_t *gnvs = acpi_get_gnvs(); uint32_t pm1, *gpe0; int gpe_reg, gpe_reg_count; int reg_size = sizeof(uint32_t) * 8; diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c index 4e4906c5ad..8d75c9a147 100644 --- a/src/soc/intel/common/block/acpi/acpi.c +++ b/src/soc/intel/common/block/acpi/acpi.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -456,7 +457,7 @@ void generate_cpu_entries(const struct device *device) /* Save wake source data for ACPI _SWS methods in NVS */ static void acpi_save_wake_source(void *unused) { - global_nvs_t *gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); + global_nvs_t *gnvs = acpi_get_gnvs(); uint32_t pm1, *gpe0; int gpe_reg, gpe_reg_count; int reg_size = sizeof(uint32_t) * 8; diff --git a/src/soc/intel/common/block/uart/uart.c b/src/soc/intel/common/block/uart/uart.c index cc5e485d33..0c641f3746 100644 --- a/src/soc/intel/common/block/uart/uart.c +++ b/src/soc/intel/common/block/uart/uart.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include -#include +#include #include #include #include @@ -167,7 +167,7 @@ static void uart_read_resources(struct device *dev) */ static bool pch_uart_init_debug_controller_on_resume(void) { - global_nvs_t *gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); + global_nvs_t *gnvs = acpi_get_gnvs(); if (gnvs) return !!gnvs->uior; diff --git a/src/soc/intel/common/nhlt.c b/src/soc/intel/common/nhlt.c index 5d916ab7e4..099be5d8bd 100644 --- a/src/soc/intel/common/nhlt.c +++ b/src/soc/intel/common/nhlt.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#include +#include #include #include @@ -15,7 +15,7 @@ uintptr_t nhlt_soc_serialize_oem_overrides(struct nhlt *nhlt, { global_nvs_t *gnvs; - gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); + gnvs = acpi_get_gnvs(); if (gnvs == NULL) return acpi_addr; -- cgit v1.2.3