From c84572e0e1d17a4ccc77f5cc6e35f96417826663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 29 Jun 2020 21:58:39 +0300 Subject: mb/google/kahlee,zork: Use mainboard_fill_gnvs() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic9cdcc497bf1a9f5bfed5e6d95040bfa602b0b89 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/48732 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/mainboard/google/kahlee/acpi_tables.c | 12 ++++++++++++ src/mainboard/google/kahlee/mainboard.c | 16 ---------------- src/mainboard/google/zork/acpi_tables.c | 12 ++++++++++++ src/mainboard/google/zork/mainboard.c | 12 ------------ 4 files changed, 24 insertions(+), 28 deletions(-) create mode 100644 src/mainboard/google/kahlee/acpi_tables.c create mode 100644 src/mainboard/google/zork/acpi_tables.c (limited to 'src/mainboard') diff --git a/src/mainboard/google/kahlee/acpi_tables.c b/src/mainboard/google/kahlee/acpi_tables.c new file mode 100644 index 0000000000..ab36f40a35 --- /dev/null +++ b/src/mainboard/google/kahlee/acpi_tables.c @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include + +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 b40b4bc8e0..570f20ce31 100644 --- a/src/mainboard/google/kahlee/mainboard.c +++ b/src/mainboard/google/kahlee/mainboard.c @@ -5,14 +5,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -161,19 +159,6 @@ static void kahlee_enable(struct device *dev) 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 @@ void mainboard_suspend_resume(void) 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 0000000000..ab36f40a35 --- /dev/null +++ b/src/mainboard/google/zork/acpi_tables.c @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include + +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 3a3b1bdbb5..1de593ed49 100644 --- a/src/mainboard/google/zork/mainboard.c +++ b/src/mainboard/google/zork/mainboard.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -17,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -216,16 +214,6 @@ static void zork_enable(struct device *dev) 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()); } -- cgit v1.2.3