diff options
author | Peter Lemenkov <lemenkov@gmail.com> | 2019-10-21 21:42:17 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-12-27 09:09:02 +0000 |
commit | 6c2c018e15a1c4d3ae394333263e6c7c3eb30415 (patch) | |
tree | 832792ac36f7b5ce890e001fee96639cbbecd6c3 /src/mainboard/google | |
parent | 1fe7dcb047d157de79acafedaab0fe98408aeafc (diff) |
mb/*/*/acpi_tables: Remove unnecessary function call
Remove acpi_update_thermal_table local function.
Change-Id: I4857348088feb8eaf1dd7f553c4efb29da8943cf
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36212
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/auron/acpi_tables.c | 15 | ||||
-rw-r--r-- | src/mainboard/google/beltino/acpi_tables.c | 40 | ||||
-rw-r--r-- | src/mainboard/google/butterfly/acpi_tables.c | 11 | ||||
-rw-r--r-- | src/mainboard/google/jecht/acpi_tables.c | 15 | ||||
-rw-r--r-- | src/mainboard/google/link/acpi_tables.c | 29 | ||||
-rw-r--r-- | src/mainboard/google/parrot/acpi_tables.c | 11 | ||||
-rw-r--r-- | src/mainboard/google/slippy/acpi_tables.c | 17 | ||||
-rw-r--r-- | src/mainboard/google/stout/acpi_tables.c | 13 |
8 files changed, 55 insertions, 96 deletions
diff --git a/src/mainboard/google/auron/acpi_tables.c b/src/mainboard/google/auron/acpi_tables.c index 7d4d21ed87..7b0899a065 100644 --- a/src/mainboard/google/auron/acpi_tables.c +++ b/src/mainboard/google/auron/acpi_tables.c @@ -19,15 +19,6 @@ #include <soc/nvs.h> #include <variant/thermal.h> -static void acpi_update_thermal_table(global_nvs_t *gnvs) -{ - gnvs->tmps = CTL_TDP_SENSOR_ID; - gnvs->tcrt = CRITICAL_TEMPERATURE; - gnvs->tpsv = PASSIVE_TEMPERATURE; - gnvs->tmax = MAX_TEMPERATURE; - gnvs->flvl = 1; -} - void acpi_create_gnvs(global_nvs_t *gnvs) { acpi_init_gnvs(gnvs); @@ -38,7 +29,11 @@ void acpi_create_gnvs(global_nvs_t *gnvs) /* Disable USB ports in S5 */ gnvs->s5u0 = 0; - acpi_update_thermal_table(gnvs); + gnvs->tmps = CTL_TDP_SENSOR_ID; + gnvs->tcrt = CRITICAL_TEMPERATURE; + gnvs->tpsv = PASSIVE_TEMPERATURE; + gnvs->tmax = MAX_TEMPERATURE; + gnvs->flvl = 1; } unsigned long acpi_fill_madt(unsigned long current) diff --git a/src/mainboard/google/beltino/acpi_tables.c b/src/mainboard/google/beltino/acpi_tables.c index a04a9507ff..09ac6504ef 100644 --- a/src/mainboard/google/beltino/acpi_tables.c +++ b/src/mainboard/google/beltino/acpi_tables.c @@ -23,8 +23,24 @@ #include <vendorcode/google/chromeos/gnvs.h> #include <variant/thermal.h> -static void acpi_update_thermal_table(global_nvs_t *gnvs) +void acpi_create_gnvs(global_nvs_t *gnvs) { + /* Enable USB ports in S3 */ + gnvs->s3u0 = 1; + gnvs->s3u1 = 1; + + /* Disable USB ports in S5 */ + gnvs->s5u0 = 0; + gnvs->s5u1 = 0; + + /* TPM Present */ + gnvs->tpmp = 1; + +#if CONFIG(CHROMEOS) + // SuperIO is always RO + gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO; +#endif + gnvs->f4of = FAN4_THRESHOLD_OFF; gnvs->f4on = FAN4_THRESHOLD_ON; gnvs->f4pw = FAN4_PWM; @@ -50,25 +66,3 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs) gnvs->tmax = MAX_TEMPERATURE; gnvs->flvl = 5; } - -void acpi_create_gnvs(global_nvs_t *gnvs) -{ - /* Enable USB ports in S3 */ - gnvs->s3u0 = 1; - gnvs->s3u1 = 1; - - /* Disable USB ports in S5 */ - gnvs->s5u0 = 0; - gnvs->s5u1 = 0; - - /* TPM Present */ - gnvs->tpmp = 1; - - -#if CONFIG(CHROMEOS) - // SuperIO is always RO - gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO; -#endif - - acpi_update_thermal_table(gnvs); -} diff --git a/src/mainboard/google/butterfly/acpi_tables.c b/src/mainboard/google/butterfly/acpi_tables.c index 93455260c0..5ab22e1fd5 100644 --- a/src/mainboard/google/butterfly/acpi_tables.c +++ b/src/mainboard/google/butterfly/acpi_tables.c @@ -18,13 +18,6 @@ #include <vendorcode/google/chromeos/gnvs.h> #include "thermal.h" -static void acpi_update_thermal_table(global_nvs_t *gnvs) -{ - /* EC handles all thermal and fan control on Butterfly. */ - gnvs->tcrt = CRITICAL_TEMPERATURE; - gnvs->tpsv = PASSIVE_TEMPERATURE; -} - void acpi_create_gnvs(global_nvs_t *gnvs) { /* Disable USB ports in S3 by default */ @@ -45,6 +38,8 @@ void acpi_create_gnvs(global_nvs_t *gnvs) // the lid is open by default. gnvs->lids = 1; - acpi_update_thermal_table(gnvs); + /* EC handles all thermal and fan control on Butterfly. */ + gnvs->tcrt = CRITICAL_TEMPERATURE; + gnvs->tpsv = PASSIVE_TEMPERATURE; } diff --git a/src/mainboard/google/jecht/acpi_tables.c b/src/mainboard/google/jecht/acpi_tables.c index 445f03771c..48b7a36797 100644 --- a/src/mainboard/google/jecht/acpi_tables.c +++ b/src/mainboard/google/jecht/acpi_tables.c @@ -22,15 +22,6 @@ #include <soc/nvs.h> #include <variant/thermal.h> -static void acpi_update_thermal_table(global_nvs_t *gnvs) -{ - gnvs->tmps = TEMPERATURE_SENSOR_ID; - gnvs->tcrt = CRITICAL_TEMPERATURE; - gnvs->tpsv = PASSIVE_TEMPERATURE; - gnvs->tmax = MAX_TEMPERATURE; - gnvs->flvl = 1; -} - void acpi_create_gnvs(global_nvs_t *gnvs) { acpi_init_gnvs(gnvs); @@ -41,7 +32,11 @@ void acpi_create_gnvs(global_nvs_t *gnvs) /* Disable USB ports in S5 */ gnvs->s5u0 = 0; - acpi_update_thermal_table(gnvs); + gnvs->tmps = TEMPERATURE_SENSOR_ID; + gnvs->tcrt = CRITICAL_TEMPERATURE; + gnvs->tpsv = PASSIVE_TEMPERATURE; + gnvs->tmax = MAX_TEMPERATURE; + gnvs->flvl = 1; } unsigned long acpi_fill_madt(unsigned long current) diff --git a/src/mainboard/google/link/acpi_tables.c b/src/mainboard/google/link/acpi_tables.c index 0ff4364574..891151a4cb 100644 --- a/src/mainboard/google/link/acpi_tables.c +++ b/src/mainboard/google/link/acpi_tables.c @@ -19,22 +19,6 @@ #include <vendorcode/google/chromeos/gnvs.h> #include "thermal.h" -static void acpi_update_thermal_table(global_nvs_t *gnvs) -{ - gnvs->tmps = CTDP_SENSOR_ID; - - gnvs->f1of = CTDP_NOMINAL_THRESHOLD_OFF; - gnvs->f1on = CTDP_NOMINAL_THRESHOLD_ON; - - gnvs->f0of = CTDP_DOWN_THRESHOLD_OFF; - gnvs->f0on = CTDP_DOWN_THRESHOLD_ON; - - gnvs->tcrt = CRITICAL_TEMPERATURE; - gnvs->tpsv = PASSIVE_TEMPERATURE; - gnvs->tmax = MAX_TEMPERATURE; - gnvs->flvl = 1; -} - void acpi_create_gnvs(global_nvs_t *gnvs) { /* Disable USB ports in S3 by default */ @@ -50,7 +34,18 @@ void acpi_create_gnvs(global_nvs_t *gnvs) ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; #endif - acpi_update_thermal_table(gnvs); + gnvs->tmps = CTDP_SENSOR_ID; + + gnvs->f1of = CTDP_NOMINAL_THRESHOLD_OFF; + gnvs->f1on = CTDP_NOMINAL_THRESHOLD_ON; + + gnvs->f0of = CTDP_DOWN_THRESHOLD_OFF; + gnvs->f0on = CTDP_DOWN_THRESHOLD_ON; + + gnvs->tcrt = CRITICAL_TEMPERATURE; + gnvs->tpsv = PASSIVE_TEMPERATURE; + gnvs->tmax = MAX_TEMPERATURE; + gnvs->flvl = 1; // the lid is open by default. gnvs->lids = 1; diff --git a/src/mainboard/google/parrot/acpi_tables.c b/src/mainboard/google/parrot/acpi_tables.c index e92734da1a..bd7df70cb0 100644 --- a/src/mainboard/google/parrot/acpi_tables.c +++ b/src/mainboard/google/parrot/acpi_tables.c @@ -26,13 +26,6 @@ #include "thermal.h" #include "onboard.h" -static void acpi_update_thermal_table(global_nvs_t *gnvs) -{ - /* EC handles all active thermal and fan control on Parrot. */ - gnvs->tcrt = CRITICAL_TEMPERATURE; - gnvs->tpsv = PASSIVE_TEMPERATURE; -} - void acpi_create_gnvs(global_nvs_t *gnvs) { /* Disable USB ports in S3 by default */ @@ -49,7 +42,9 @@ void acpi_create_gnvs(global_nvs_t *gnvs) ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; #endif - acpi_update_thermal_table(gnvs); + /* EC handles all active thermal and fan control on Parrot. */ + gnvs->tcrt = CRITICAL_TEMPERATURE; + gnvs->tpsv = PASSIVE_TEMPERATURE; // the lid is open by default. gnvs->lids = 1; diff --git a/src/mainboard/google/slippy/acpi_tables.c b/src/mainboard/google/slippy/acpi_tables.c index 5838823ddd..d7a8cbbdb6 100644 --- a/src/mainboard/google/slippy/acpi_tables.c +++ b/src/mainboard/google/slippy/acpi_tables.c @@ -24,16 +24,6 @@ #include "thermal.h" -static void acpi_update_thermal_table(global_nvs_t *gnvs) -{ - gnvs->tmps = TEMPERATURE_SENSOR_ID; - gnvs->tcrt = CRITICAL_TEMPERATURE; - gnvs->tpsv = PASSIVE_TEMPERATURE; - gnvs->tmax = MAX_TEMPERATURE; - gnvs->f0pw = EC_THROTTLE_POWER_LIMIT; - gnvs->flvl = 1; -} - void acpi_create_gnvs(global_nvs_t *gnvs) { /* Enable USB ports in S3 */ @@ -53,5 +43,10 @@ void acpi_create_gnvs(global_nvs_t *gnvs) ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; #endif - acpi_update_thermal_table(gnvs); + gnvs->tmps = TEMPERATURE_SENSOR_ID; + gnvs->tcrt = CRITICAL_TEMPERATURE; + gnvs->tpsv = PASSIVE_TEMPERATURE; + gnvs->tmax = MAX_TEMPERATURE; + gnvs->f0pw = EC_THROTTLE_POWER_LIMIT; + gnvs->flvl = 1; } diff --git a/src/mainboard/google/stout/acpi_tables.c b/src/mainboard/google/stout/acpi_tables.c index 597cb8fb76..089fdee270 100644 --- a/src/mainboard/google/stout/acpi_tables.c +++ b/src/mainboard/google/stout/acpi_tables.c @@ -27,14 +27,6 @@ #include <southbridge/intel/bd82x6x/nvs.h> #include "thermal.h" -static void acpi_update_thermal_table(global_nvs_t *gnvs) -{ - /* EC handles all thermal and fan control on Stout. */ - gnvs->tcrt = CRITICAL_TEMPERATURE; - gnvs->tpsv = PASSIVE_TEMPERATURE; - gnvs->tmax = MAX_TEMPERATURE; -} - void acpi_create_gnvs(global_nvs_t *gnvs) { /* Disable USB ports in S3 by default */ @@ -51,7 +43,10 @@ void acpi_create_gnvs(global_nvs_t *gnvs) ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; #endif - acpi_update_thermal_table(gnvs); + /* EC handles all thermal and fan control on Stout. */ + gnvs->tcrt = CRITICAL_TEMPERATURE; + gnvs->tpsv = PASSIVE_TEMPERATURE; + gnvs->tmax = MAX_TEMPERATURE; // the lid is open by default. gnvs->lids = 1; |