Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48732 )
Change subject: mb/google/kahlee,zork: Use mainboard_fill_gnvs() ......................................................................
mb/google/kahlee,zork: Use mainboard_fill_gnvs()
Change-Id: Ic9cdcc497bf1a9f5bfed5e6d95040bfa602b0b89 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- A src/mainboard/google/kahlee/acpi_tables.c M src/mainboard/google/kahlee/mainboard.c A src/mainboard/google/zork/acpi_tables.c M src/mainboard/google/zork/mainboard.c 4 files changed, 24 insertions(+), 28 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/48732/1
diff --git a/src/mainboard/google/kahlee/acpi_tables.c b/src/mainboard/google/kahlee/acpi_tables.c new file mode 100644 index 0000000..ab36f40 --- /dev/null +++ b/src/mainboard/google/kahlee/acpi_tables.c @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <acpi/acpi_gnvs.h> +#include <soc/nvs.h> +#include <variant/thermal.h> + +void mainboard_fill_gnvs(struct global_nvs *gnvs) +{ + gnvs->tmps = CTL_TDP_SENSOR_ID; + gnvs->tcrt = CRITICAL_TEMPERATURE; + gnvs->tpsv = PASSIVE_TEMPERATURE; +} diff --git a/src/mainboard/google/kahlee/mainboard.c b/src/mainboard/google/kahlee/mainboard.c index b40b4bc..570f20c 100644 --- a/src/mainboard/google/kahlee/mainboard.c +++ b/src/mainboard/google/kahlee/mainboard.c @@ -5,14 +5,12 @@ #include <device/device.h> #include <device/mmio.h> #include <acpi/acpi.h> -#include <acpi/acpi_gnvs.h> #include <amdblocks/agesawrapper.h> #include <amdblocks/amd_pci_util.h> #include <amdblocks/smi.h> #include <baseboard/variants.h> #include <boardid.h> #include <smbios.h> -#include <soc/nvs.h> #include <soc/pci_devs.h> #include <soc/southbridge.h> #include <soc/smi.h> @@ -161,19 +159,6 @@ dev->ops->acpi_inject_dsdt = chromeos_dsdt_generator; }
-static void mainboard_final(void *chip_info) -{ - struct global_nvs *gnvs; - - gnvs = acpi_get_gnvs(); - - if (gnvs) { - gnvs->tmps = CTL_TDP_SENSOR_ID; - gnvs->tcrt = CRITICAL_TEMPERATURE; - gnvs->tpsv = PASSIVE_TEMPERATURE; - } -} - int mainboard_get_xhci_oc_map(uint16_t *map) { return variant_get_xhci_oc_map(map); @@ -192,7 +177,6 @@ struct chip_operations mainboard_ops = { .init = mainboard_init, .enable_dev = kahlee_enable, - .final = mainboard_final, };
/* Variants may override these functions so see definitions in variants/ */ diff --git a/src/mainboard/google/zork/acpi_tables.c b/src/mainboard/google/zork/acpi_tables.c new file mode 100644 index 0000000..ab36f40 --- /dev/null +++ b/src/mainboard/google/zork/acpi_tables.c @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <acpi/acpi_gnvs.h> +#include <soc/nvs.h> +#include <variant/thermal.h> + +void mainboard_fill_gnvs(struct global_nvs *gnvs) +{ + gnvs->tmps = CTL_TDP_SENSOR_ID; + gnvs->tcrt = CRITICAL_TEMPERATURE; + gnvs->tpsv = PASSIVE_TEMPERATURE; +} diff --git a/src/mainboard/google/zork/mainboard.c b/src/mainboard/google/zork/mainboard.c index dce2eaf..6a20c7c 100644 --- a/src/mainboard/google/zork/mainboard.c +++ b/src/mainboard/google/zork/mainboard.c @@ -7,7 +7,6 @@ #include <device/mmio.h> #include <acpi/acpi.h> #include <acpi/acpigen.h> -#include <acpi/acpi_gnvs.h> #include <amdblocks/amd_pci_util.h> #include <amdblocks/gpio_banks.h> #include <amdblocks/smi.h> @@ -17,7 +16,6 @@ #include <smbios.h> #include <soc/cpu.h> #include <soc/gpio.h> -#include <soc/nvs.h> #include <soc/pci_devs.h> #include <soc/platform_descriptors.h> #include <soc/southbridge.h> @@ -231,16 +229,6 @@
static void mainboard_final(void *chip_info) { - struct global_nvs *gnvs; - - gnvs = acpi_get_gnvs(); - - if (gnvs) { - gnvs->tmps = CTL_TDP_SENSOR_ID; - gnvs->tcrt = CRITICAL_TEMPERATURE; - gnvs->tpsv = PASSIVE_TEMPERATURE; - } - finalize_gpios(acpi_get_sleep_type()); }