diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-06-14 12:01:58 +0300 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-06-24 11:48:38 +0000 |
commit | 5daa1d38985a19dc84f2299dba2e340dda2870ae (patch) | |
tree | 5ffc76d72e2b7676f520b21808c7c35709ce30d0 /src/soc/intel/braswell | |
parent | e37459ed64b40a23880babf430fd92a847752053 (diff) |
ACPI: Replace uses of CBMEM_ID_ACPI_GNVS
These are the simple cbmem_find() cases. Also drop the redundant
error messages.
Change-Id: I78e5445eb09c322ff94fe4f65345eb2997bd10ef
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42361
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/soc/intel/braswell')
-rw-r--r-- | src/soc/intel/braswell/lpe.c | 8 | ||||
-rw-r--r-- | src/soc/intel/braswell/lpss.c | 8 | ||||
-rw-r--r-- | src/soc/intel/braswell/scc.c | 8 |
3 files changed, 9 insertions, 15 deletions
diff --git a/src/soc/intel/braswell/lpe.c b/src/soc/intel/braswell/lpe.c index 394715eb5a..f3391de443 100644 --- a/src/soc/intel/braswell/lpe.c +++ b/src/soc/intel/braswell/lpe.c @@ -2,7 +2,7 @@ #include <device/mmio.h> #include <device/pci_ops.h> -#include <cbmem.h> +#include <acpi/acpi_gnvs.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> @@ -56,11 +56,9 @@ static void lpe_enable_acpi_mode(struct device *dev) global_nvs_t *gnvs; /* Find ACPI NVS to update BARs */ - gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); - if (!gnvs) { - printk(BIOS_ERR, "Unable to locate Global NVS\n"); + gnvs = acpi_get_gnvs(); + if (!gnvs) return; - } /* Save BAR0, BAR1, and firmware base to ACPI NVS */ assign_device_nvs(dev, &gnvs->dev.lpe_bar0, PCI_BASE_ADDRESS_0); diff --git a/src/soc/intel/braswell/lpss.c b/src/soc/intel/braswell/lpss.c index c173990e85..82002487af 100644 --- a/src/soc/intel/braswell/lpss.c +++ b/src/soc/intel/braswell/lpss.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <stdint.h> -#include <cbmem.h> +#include <acpi/acpi_gnvs.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> @@ -30,11 +30,9 @@ static void dev_enable_acpi_mode(struct device *dev, int iosf_reg, int nvs_index global_nvs_t *gnvs; /* Find ACPI NVS to update BARs */ - gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); - if (!gnvs) { - printk(BIOS_ERR, "Unable to locate Global NVS\n"); + gnvs = acpi_get_gnvs(); + if (!gnvs) return; - } /* Save BAR0 and BAR1 to ACPI NVS */ bar = find_resource(dev, PCI_BASE_ADDRESS_0); diff --git a/src/soc/intel/braswell/scc.c b/src/soc/intel/braswell/scc.c index df7dd7db6d..0b6385fc24 100644 --- a/src/soc/intel/braswell/scc.c +++ b/src/soc/intel/braswell/scc.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#include <cbmem.h> +#include <acpi/acpi_gnvs.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> @@ -18,11 +18,9 @@ void scc_enable_acpi_mode(struct device *dev, int iosf_reg, int nvs_index) __FILE__, __func__, dev_name(dev), iosf_reg, nvs_index); /* Find ACPI NVS to update BARs */ - gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); - if (!gnvs) { - printk(BIOS_ERR, "Unable to locate Global NVS\n"); + gnvs = acpi_get_gnvs(); + if (!gnvs) return; - } /* Save BAR0 and BAR1 to ACPI NVS */ bar = find_resource(dev, PCI_BASE_ADDRESS_0); |