diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2021-02-10 17:53:34 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-04-21 09:27:31 +0000 |
commit | 84d10cc5d38d706ffecd0cd60f6e1f9d90064f96 (patch) | |
tree | f5497cb6cb0c236cbb0b1ab002e75d8e73e5efe4 /src/acpi | |
parent | 307be997d1acd604a573e2ab895ef10570454fc4 (diff) |
ChromeOS: Use CHROMEOS_NVS guard
Replace CONFIG(CHROMEOS) with CONFIG(CHROMEOS_NVS) for cases where
the conditional and dependency are clearly about the presence of
an ACPI NVS table specified by vendorcode. For couple locations also
CONFIG(HAVE_ACPI_TABLES) changes to CONFIG(CHROMEOS_NVS).
This also helps find some of the CONFIG(CHROMEOS) cases that might
be more FMAP and VPD related and not about ChromeOS per-se, as
suggested by followup works.
Change-Id: Ife888ae43093949bb2d3e397565033037396f434
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50611
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Lance Zhao
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/acpi')
-rw-r--r-- | src/acpi/Makefile.inc | 2 | ||||
-rw-r--r-- | src/acpi/acpigen_extern.asl | 2 | ||||
-rw-r--r-- | src/acpi/dsdt_top.asl | 2 | ||||
-rw-r--r-- | src/acpi/gnvs.c | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/acpi/Makefile.inc b/src/acpi/Makefile.inc index b8e44221af..3c3bd9ed12 100644 --- a/src/acpi/Makefile.inc +++ b/src/acpi/Makefile.inc @@ -10,7 +10,7 @@ ramstage-$(CONFIG_PCI) += acpigen_pci.c ramstage-y += acpigen_ps2_keybd.c ramstage-y += acpigen_usb.c ramstage-y += device.c -ramstage-$(CONFIG_CHROMEOS) += chromeos-gnvs.c +ramstage-$(CONFIG_CHROMEOS_NVS) += chromeos-gnvs.c ramstage-$(CONFIG_ACPI_SOC_NVS) += gnvs.c ramstage-y += pld.c ramstage-y += sata.c diff --git a/src/acpi/acpigen_extern.asl b/src/acpi/acpigen_extern.asl index 5e380b5039..117177ea27 100644 --- a/src/acpi/acpigen_extern.asl +++ b/src/acpi/acpigen_extern.asl @@ -19,7 +19,7 @@ External (NVS1, IntObj) OperationRegion (DNVS, SystemMemory, NVB1, NVS1) #endif -#if CONFIG(CHROMEOS) +#if CONFIG(CHROMEOS_NVS) External (NVB2, IntObj) External (NVS2, IntObj) OperationRegion (CNVS, SystemMemory, NVB2, NVS2) diff --git a/src/acpi/dsdt_top.asl b/src/acpi/dsdt_top.asl index eece7f7f22..ff148aef74 100644 --- a/src/acpi/dsdt_top.asl +++ b/src/acpi/dsdt_top.asl @@ -2,7 +2,7 @@ #include <acpi/acpigen_extern.asl> -#if CONFIG(CHROMEOS) +#if CONFIG(CHROMEOS_NVS) /* Chrome OS specific */ #include <vendorcode/google/chromeos/acpi/gnvs.asl> #include <vendorcode/google/chromeos/acpi/chromeos.asl> diff --git a/src/acpi/gnvs.c b/src/acpi/gnvs.c index 01aff62907..3decebbcb0 100644 --- a/src/acpi/gnvs.c +++ b/src/acpi/gnvs.c @@ -26,7 +26,7 @@ void acpi_create_gnvs(void) gnvs_size = 0x100; if (CONFIG(ACPI_HAS_DEVICE_NVS)) gnvs_size = 0x2000; - else if (CONFIG(CHROMEOS)) + else if (CONFIG(CHROMEOS_NVS)) gnvs_size = 0x1000; gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, gnvs_size); @@ -38,7 +38,7 @@ void acpi_create_gnvs(void) if (CONFIG(CONSOLE_CBMEM)) gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE); - if (CONFIG(CHROMEOS)) + if (CONFIG(CHROMEOS_NVS)) gnvs_assign_chromeos((u8 *)gnvs + GNVS_CHROMEOS_ACPI_OFFSET); } @@ -78,7 +78,7 @@ void acpi_fill_gnvs(void) acpigen_write_name_dword("NVS0", 0x100); acpigen_pop_len(); - if (CONFIG(CHROMEOS)) { + if (CONFIG(CHROMEOS_NVS)) { acpigen_write_scope("\\"); acpigen_write_name_dword("NVB2", (uintptr_t)gnvs + GNVS_CHROMEOS_ACPI_OFFSET); acpigen_write_name_dword("NVS2", 0xf00); |