Peter Lemenkov has uploaded this change for review.

View Change

mb/*/*/acpi_tables: Remove unnecessary function call

Remove acpi_update_thermal_table call if it does just a couple of lines
of a variable assignments.

Change-Id: I4857348088feb8eaf1dd7f553c4efb29da8943cf
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
M src/mainboard/gigabyte/ga-b75m-d3h/acpi_tables.c
M src/mainboard/google/auron/acpi_tables.c
M src/mainboard/google/butterfly/acpi_tables.c
M src/mainboard/google/jecht/acpi_tables.c
M src/mainboard/google/parrot/acpi_tables.c
M src/mainboard/google/slippy/acpi_tables.c
M src/mainboard/google/stout/acpi_tables.c
M src/mainboard/kontron/ktqm77/acpi_tables.c
M src/mainboard/lenovo/l520/acpi_tables.c
M src/mainboard/lenovo/s230u/acpi_tables.c
M src/mainboard/lenovo/t400/acpi_tables.c
M src/mainboard/lenovo/t420/acpi_tables.c
M src/mainboard/lenovo/t420s/acpi_tables.c
M src/mainboard/lenovo/t430/acpi_tables.c
M src/mainboard/lenovo/t430s/acpi_tables.c
M src/mainboard/lenovo/t520/acpi_tables.c
M src/mainboard/lenovo/t530/acpi_tables.c
M src/mainboard/lenovo/t60/acpi_tables.c
M src/mainboard/lenovo/x131e/acpi_tables.c
M src/mainboard/lenovo/x1_carbon_gen1/acpi_tables.c
M src/mainboard/lenovo/x200/acpi_tables.c
M src/mainboard/lenovo/x201/acpi_tables.c
M src/mainboard/lenovo/x220/acpi_tables.c
M src/mainboard/lenovo/x230/acpi_tables.c
M src/mainboard/lenovo/x60/acpi_tables.c
25 files changed, 73 insertions(+), 198 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/36212/1
diff --git a/src/mainboard/gigabyte/ga-b75m-d3h/acpi_tables.c b/src/mainboard/gigabyte/ga-b75m-d3h/acpi_tables.c
index 5c09059..a992e24 100644
--- a/src/mainboard/gigabyte/ga-b75m-d3h/acpi_tables.c
+++ b/src/mainboard/gigabyte/ga-b75m-d3h/acpi_tables.c
@@ -17,12 +17,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
memset((void *)gnvs, 0, sizeof(*gnvs));
@@ -35,5 +29,6 @@
gnvs->s5u0 = 0;
gnvs->s5u1 = 0;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/google/auron/acpi_tables.c b/src/mainboard/google/auron/acpi_tables.c
index 7d4d21e..7b0899a 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 @@
/* 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/butterfly/acpi_tables.c b/src/mainboard/google/butterfly/acpi_tables.c
index 9345526..5ab22e1 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 @@
// 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 879ff93..cb0d9cf 100644
--- a/src/mainboard/google/jecht/acpi_tables.c
+++ b/src/mainboard/google/jecht/acpi_tables.c
@@ -23,15 +23,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);
@@ -42,7 +33,11 @@
/* 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/parrot/acpi_tables.c b/src/mainboard/google/parrot/acpi_tables.c
index 93d77da..7f8db5e 100644
--- a/src/mainboard/google/parrot/acpi_tables.c
+++ b/src/mainboard/google/parrot/acpi_tables.c
@@ -27,13 +27,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 */
@@ -50,7 +43,9 @@
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 0b303ae..c588fce 100644
--- a/src/mainboard/google/slippy/acpi_tables.c
+++ b/src/mainboard/google/slippy/acpi_tables.c
@@ -25,16 +25,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 */
@@ -54,5 +44,10 @@
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 46aadaf..f52205b 100644
--- a/src/mainboard/google/stout/acpi_tables.c
+++ b/src/mainboard/google/stout/acpi_tables.c
@@ -28,14 +28,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 */
@@ -52,7 +44,10 @@
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;
diff --git a/src/mainboard/kontron/ktqm77/acpi_tables.c b/src/mainboard/kontron/ktqm77/acpi_tables.c
index f872be7..1686309 100644
--- a/src/mainboard/kontron/ktqm77/acpi_tables.c
+++ b/src/mainboard/kontron/ktqm77/acpi_tables.c
@@ -16,13 +16,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 Butterfly. */
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -33,5 +26,7 @@
gnvs->s5u0 = 0;
gnvs->s5u1 = 0;

- 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/lenovo/l520/acpi_tables.c b/src/mainboard/lenovo/l520/acpi_tables.c
index 31f41e7..20a8dbf1 100644
--- a/src/mainboard/lenovo/l520/acpi_tables.c
+++ b/src/mainboard/lenovo/l520/acpi_tables.c
@@ -19,12 +19,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -38,5 +32,6 @@
// the lid is open by default.
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/s230u/acpi_tables.c b/src/mainboard/lenovo/s230u/acpi_tables.c
index 8d6d93f..405f3c2 100644
--- a/src/mainboard/lenovo/s230u/acpi_tables.c
+++ b/src/mainboard/lenovo/s230u/acpi_tables.c
@@ -16,12 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -35,5 +29,6 @@
/* The LID is open by default */
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/t400/acpi_tables.c b/src/mainboard/lenovo/t400/acpi_tables.c
index 8fb9056..1bf42ed 100644
--- a/src/mainboard/lenovo/t400/acpi_tables.c
+++ b/src/mainboard/lenovo/t400/acpi_tables.c
@@ -23,12 +23,6 @@
#include <southbridge/intel/i82801ix/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
memset((void *)gnvs, 0, sizeof(*gnvs));
@@ -39,7 +33,8 @@
gnvs->cmap = 0x01;
gnvs->cmbp = 0x01;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}

unsigned long acpi_fill_madt(unsigned long current)
diff --git a/src/mainboard/lenovo/t420/acpi_tables.c b/src/mainboard/lenovo/t420/acpi_tables.c
index 279674d..a6c103f 100644
--- a/src/mainboard/lenovo/t420/acpi_tables.c
+++ b/src/mainboard/lenovo/t420/acpi_tables.c
@@ -16,12 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -35,5 +29,6 @@
// the lid is open by default.
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/t420s/acpi_tables.c b/src/mainboard/lenovo/t420s/acpi_tables.c
index 279674d..a6c103f 100644
--- a/src/mainboard/lenovo/t420s/acpi_tables.c
+++ b/src/mainboard/lenovo/t420s/acpi_tables.c
@@ -16,12 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -35,5 +29,6 @@
// the lid is open by default.
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/t430/acpi_tables.c b/src/mainboard/lenovo/t430/acpi_tables.c
index 5caa3d4..87f9c34 100644
--- a/src/mainboard/lenovo/t430/acpi_tables.c
+++ b/src/mainboard/lenovo/t430/acpi_tables.c
@@ -16,21 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.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;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -44,5 +29,15 @@
// the lid is open by default.
gnvs->lids = 1;

- 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;
}
diff --git a/src/mainboard/lenovo/t430s/acpi_tables.c b/src/mainboard/lenovo/t430s/acpi_tables.c
index 279674d..a6c103f 100644
--- a/src/mainboard/lenovo/t430s/acpi_tables.c
+++ b/src/mainboard/lenovo/t430s/acpi_tables.c
@@ -16,12 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -35,5 +29,6 @@
// the lid is open by default.
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/t520/acpi_tables.c b/src/mainboard/lenovo/t520/acpi_tables.c
index 279674d..a6c103f 100644
--- a/src/mainboard/lenovo/t520/acpi_tables.c
+++ b/src/mainboard/lenovo/t520/acpi_tables.c
@@ -16,12 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -35,5 +29,6 @@
// the lid is open by default.
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/t530/acpi_tables.c b/src/mainboard/lenovo/t530/acpi_tables.c
index 279674d..a6c103f 100644
--- a/src/mainboard/lenovo/t530/acpi_tables.c
+++ b/src/mainboard/lenovo/t530/acpi_tables.c
@@ -16,12 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -35,5 +29,6 @@
// the lid is open by default.
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/t60/acpi_tables.c b/src/mainboard/lenovo/t60/acpi_tables.c
index bd10a0e..abffdda 100644
--- a/src/mainboard/lenovo/t60/acpi_tables.c
+++ b/src/mainboard/lenovo/t60/acpi_tables.c
@@ -18,17 +18,12 @@
#include <southbridge/intel/i82801gx/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Enable both COM ports */
gnvs->cmap = 0x01;
gnvs->cmbp = 0x01;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/x131e/acpi_tables.c b/src/mainboard/lenovo/x131e/acpi_tables.c
index 279674d..a6c103f 100644
--- a/src/mainboard/lenovo/x131e/acpi_tables.c
+++ b/src/mainboard/lenovo/x131e/acpi_tables.c
@@ -16,12 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -35,5 +29,6 @@
// the lid is open by default.
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/x1_carbon_gen1/acpi_tables.c b/src/mainboard/lenovo/x1_carbon_gen1/acpi_tables.c
index 279674d..a6c103f 100644
--- a/src/mainboard/lenovo/x1_carbon_gen1/acpi_tables.c
+++ b/src/mainboard/lenovo/x1_carbon_gen1/acpi_tables.c
@@ -16,12 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -35,5 +29,6 @@
// the lid is open by default.
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/x200/acpi_tables.c b/src/mainboard/lenovo/x200/acpi_tables.c
index 8fb9056..1bf42ed 100644
--- a/src/mainboard/lenovo/x200/acpi_tables.c
+++ b/src/mainboard/lenovo/x200/acpi_tables.c
@@ -23,12 +23,6 @@
#include <southbridge/intel/i82801ix/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
memset((void *)gnvs, 0, sizeof(*gnvs));
@@ -39,7 +33,8 @@
gnvs->cmap = 0x01;
gnvs->cmbp = 0x01;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}

unsigned long acpi_fill_madt(unsigned long current)
diff --git a/src/mainboard/lenovo/x201/acpi_tables.c b/src/mainboard/lenovo/x201/acpi_tables.c
index 6fd47d7..45c19f8 100644
--- a/src/mainboard/lenovo/x201/acpi_tables.c
+++ b/src/mainboard/lenovo/x201/acpi_tables.c
@@ -18,13 +18,8 @@
#include <southbridge/intel/ibexpeak/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
+static vvoid acpi_create_gnvs(global_nvs_t * gnvs)
{
gnvs->tcrt = CRITICAL_TEMPERATURE;
gnvs->tpsv = PASSIVE_TEMPERATURE;
}
-
-void acpi_create_gnvs(global_nvs_t * gnvs)
-{
- acpi_update_thermal_table(gnvs);
-}
diff --git a/src/mainboard/lenovo/x220/acpi_tables.c b/src/mainboard/lenovo/x220/acpi_tables.c
index 279674d..a6c103f 100644
--- a/src/mainboard/lenovo/x220/acpi_tables.c
+++ b/src/mainboard/lenovo/x220/acpi_tables.c
@@ -16,12 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -35,5 +29,6 @@
// the lid is open by default.
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/x230/acpi_tables.c b/src/mainboard/lenovo/x230/acpi_tables.c
index 279674d..a6c103f 100644
--- a/src/mainboard/lenovo/x230/acpi_tables.c
+++ b/src/mainboard/lenovo/x230/acpi_tables.c
@@ -16,12 +16,6 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Disable USB ports in S3 by default */
@@ -35,5 +29,6 @@
// the lid is open by default.
gnvs->lids = 1;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}
diff --git a/src/mainboard/lenovo/x60/acpi_tables.c b/src/mainboard/lenovo/x60/acpi_tables.c
index bd10a0e..abffdda 100644
--- a/src/mainboard/lenovo/x60/acpi_tables.c
+++ b/src/mainboard/lenovo/x60/acpi_tables.c
@@ -18,17 +18,12 @@
#include <southbridge/intel/i82801gx/nvs.h>
#include "thermal.h"

-static void acpi_update_thermal_table(global_nvs_t *gnvs)
-{
- gnvs->tcrt = CRITICAL_TEMPERATURE;
- gnvs->tpsv = PASSIVE_TEMPERATURE;
-}
-
void acpi_create_gnvs(global_nvs_t *gnvs)
{
/* Enable both COM ports */
gnvs->cmap = 0x01;
gnvs->cmbp = 0x01;

- acpi_update_thermal_table(gnvs);
+ gnvs->tcrt = CRITICAL_TEMPERATURE;
+ gnvs->tpsv = PASSIVE_TEMPERATURE;
}

To view, visit change 36212. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4857348088feb8eaf1dd7f553c4efb29da8943cf
Gerrit-Change-Number: 36212
Gerrit-PatchSet: 1
Gerrit-Owner: Peter Lemenkov <lemenkov@gmail.com>
Gerrit-MessageType: newchange