From bcb0de22a429eacb2e3f588cd93294b9bccea2bc Mon Sep 17 00:00:00 2001 From: Ravi Chandra Sadineni Date: Tue, 26 Jul 2016 18:04:09 -0700 Subject: [PATCH] Use CONFIG_DPTF flag instead of THROTTLE_AP. Signed-off-by: Ravi Chandra Sadineni BRANCH=none BUG=chromium:631848 TEST=make buildall -j CQ-DEPEND=CL:363008 Change-Id: I3c35f5ab2e3a1537ac6e8c750171d5c2b3a6570f Reviewed-on: https://chromium-review.googlesource.com/363583 Commit-Ready: David Hendricks Tested-by: David Hendricks Reviewed-by: David Hendricks Reviewed-by: Randall Spangler Reviewed-by: Duncan Laurie --- board/amenia/board.c | 13 ------------- board/amenia/board.h | 2 +- board/chell/board.c | 14 -------------- board/chell/board.h | 2 +- board/elm/board.c | 14 -------------- board/elm/board.h | 2 +- board/glados/board.c | 14 -------------- board/glados/board.h | 2 +- board/lucid/board.c | 10 ---------- board/oak/board.c | 11 ----------- board/oak/board.h | 2 +- board/rambi/board.c | 13 ------------- board/rambi/board.h | 2 +- board/strago/board.c | 11 ----------- board/strago/board.h | 2 +- board/wheatley/board.c | 14 -------------- board/wheatley/board.h | 2 +- 17 files changed, 8 insertions(+), 122 deletions(-) diff --git a/board/amenia/board.c b/board/amenia/board.c index a019ba0a5e..16bb51eaf2 100644 --- a/board/amenia/board.c +++ b/board/amenia/board.c @@ -227,19 +227,6 @@ const struct temp_sensor_t temp_sensors[] = { }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); -/* - * Thermal limits for each temp sensor. All temps are in degrees K. Must be in - * same order as enum temp_sensor_id. To always ignore any temp, use 0. - */ -struct ec_thermal_config thermal_params[] = { - /* {Twarn, Thigh, Thalt}, fan_off, fan_max */ - {{0, 0, 0}, 0, 0}, /* G782_Internal */ - {{0, 0, 0}, 0, 0}, /* G782_Sensor_1 */ - {{0, 0, 0}, 0, 0}, /* G782_Sensor_2 */ - {{0, 0, 0}, 0, 0}, /* Battery */ -}; -BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); - /* ALS instances. Must be in same order as enum als_id. */ struct als_t als[] = { {"ISL", isl29035_init, isl29035_read_lux, 5}, diff --git a/board/amenia/board.h b/board/amenia/board.h index c1d0e16c43..e6ee4f51d7 100644 --- a/board/amenia/board.h +++ b/board/amenia/board.h @@ -120,7 +120,7 @@ #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_G782 -#define CONFIG_THROTTLE_AP +#define CONFIG_DPTF /* Optional feature - used by nuvoton */ #define NPCX_I2C0_BUS2 0 /* 0:GPIOB4/B5 1:GPIOB2/B3 as I2C0 */ diff --git a/board/chell/board.c b/board/chell/board.c index 6404844c3b..73096c4826 100644 --- a/board/chell/board.c +++ b/board/chell/board.c @@ -223,20 +223,6 @@ const struct temp_sensor_t temp_sensors[] = { }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); -/* - * Thermal limits for each temp sensor. All temps are in degrees K. Must be in - * same order as enum temp_sensor_id. To always ignore any temp, use 0. - */ -struct ec_thermal_config thermal_params[] = { - /* {Twarn, Thigh, Thalt}, fan_off, fan_max */ - {{0, 0, 0}, 0, 0}, /* Battery */ - {{0, 0, 0}, 0, 0}, /* Ambient */ - {{0, 0, 0}, 0, 0}, /* Charger */ - {{0, 0, 0}, 0, 0}, /* DRAM */ - {{0, 0, 0}, 0, 0}, /* Wifi */ -}; -BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); - static void board_pmic_init(void) { /* DISCHGCNT3 - enable 100 ohm discharge on V1.00A */ diff --git a/board/chell/board.h b/board/chell/board.h index e3e41c749a..ffac383c9f 100644 --- a/board/chell/board.h +++ b/board/chell/board.h @@ -97,7 +97,7 @@ #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_BD99992GW #define CONFIG_THERMISTOR_NCP15WB -#define CONFIG_THROTTLE_AP +#define CONFIG_DPTF /* * Enable 1 slot of secure temporary storage to support diff --git a/board/elm/board.c b/board/elm/board.c index 1849756686..de8142080f 100644 --- a/board/elm/board.c +++ b/board/elm/board.c @@ -155,20 +155,6 @@ const struct temp_sensor_t temp_sensors[] = { }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); -/* - * Thermal limits for each temp sensor. All temps are in degrees K. Must be in - * same order as enum temp_sensor_id. To always ignore any temp, use 0. - */ -struct ec_thermal_config thermal_params[] = { -#ifdef CONFIG_TEMP_SENSOR_TMP432 - {{0, 0, 0}, 0, 0}, /* TMP432_Internal */ - {{0, 0, 0}, 0, 0}, /* TMP432_Sensor_1 */ - {{0, 0, 0}, 0, 0}, /* TMP432_Sensor_2 */ -#endif - {{0, 0, 0}, 0, 0}, /* Battery Sensor */ -}; -BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); - struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = { { .port_addr = 0, /* port idx */ diff --git a/board/elm/board.h b/board/elm/board.h index bc5e298bc3..13218c808a 100644 --- a/board/elm/board.h +++ b/board/elm/board.h @@ -79,7 +79,7 @@ #undef CONFIG_UART_CONSOLE #define CONFIG_UART_CONSOLE 1 #define CONFIG_TEMP_SENSOR -#define CONFIG_THROTTLE_AP +#define CONFIG_DPTF /* Type-C */ #define CONFIG_USBC_SS_MUX diff --git a/board/glados/board.c b/board/glados/board.c index 29d05f1dea..a6bfb36e15 100644 --- a/board/glados/board.c +++ b/board/glados/board.c @@ -196,20 +196,6 @@ const struct temp_sensor_t temp_sensors[] = { }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); -/* - * Thermal limits for each temp sensor. All temps are in degrees K. Must be in - * same order as enum temp_sensor_id. To always ignore any temp, use 0. - */ -struct ec_thermal_config thermal_params[] = { - /* {Twarn, Thigh, Thalt}, fan_off, fan_max */ - {{0, 0, 0}, 0, 0}, /* Battery */ - {{0, 0, 0}, 0, 0}, /* Ambient */ - {{0, 0, 0}, 0, 0}, /* Charger */ - {{0, 0, 0}, 0, 0}, /* DRAM */ - {{0, 0, 0}, 0, 0}, /* Wifi */ -}; -BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); - /* ALS instances. Must be in same order as enum als_id. */ struct als_t als[] = { {"TI", opt3001_init, opt3001_read_lux, 5}, diff --git a/board/glados/board.h b/board/glados/board.h index c28ae699f7..51f91a8443 100644 --- a/board/glados/board.h +++ b/board/glados/board.h @@ -99,7 +99,7 @@ #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_BD99992GW #define CONFIG_THERMISTOR_NCP15WB -#define CONFIG_THROTTLE_AP +#define CONFIG_DPTF /* * Enable 1 slot of secure temporary storage to support diff --git a/board/lucid/board.c b/board/lucid/board.c index f2c5467f87..ed552cf065 100644 --- a/board/lucid/board.c +++ b/board/lucid/board.c @@ -148,16 +148,6 @@ const struct temp_sensor_t temp_sensors[] = { }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); -/* - * Thermal limits for each temp sensor. All temps are in degrees K. Must be in - * same order as enum temp_sensor_id. To always ignore any temp, use 0. - */ -struct ec_thermal_config thermal_params[] = { - /* {Twarn, Thigh, Thalt}, fan_off, fan_max */ - {{0, 0, 0}, 0, 0}, /* Battery */ -}; -BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); - /* Initialize board. */ static void board_init(void) { diff --git a/board/oak/board.c b/board/oak/board.c index 66ac54d314..1c12dafe6e 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -160,17 +160,6 @@ struct als_t als[] = { BUILD_ASSERT(ARRAY_SIZE(als) == ALS_COUNT); #endif -/* Thermal limits for each temp sensor. All temps are in degrees K. Must be in - * same order as enum temp_sensor_id. To always ignore any temp, use 0. - */ -struct ec_thermal_config thermal_params[] = { - {{0, 0, 0}, 0, 0}, /* TMP432_Internal */ - {{0, 0, 0}, 0, 0}, /* TMP432_Sensor_1 */ - {{0, 0, 0}, 0, 0}, /* TMP432_Sensor_2 */ - {{0, 0, 0}, 0, 0}, /* Battery Sensor */ -}; -BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); - struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = { { .port_addr = 0x54 << 1, diff --git a/board/oak/board.h b/board/oak/board.h index 1377faae66..f9fa442fa5 100644 --- a/board/oak/board.h +++ b/board/oak/board.h @@ -114,7 +114,7 @@ #define CONFIG_UART_CONSOLE 1 #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_TMP432 -#define CONFIG_THROTTLE_AP +#define CONFIG_DPTF /* UART DMA */ #undef CONFIG_UART_TX_DMA diff --git a/board/rambi/board.c b/board/rambi/board.c index 5516b94ee0..452838adfe 100644 --- a/board/rambi/board.c +++ b/board/rambi/board.c @@ -103,16 +103,3 @@ const struct temp_sensor_t temp_sensors[] = { {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_temp_sensor_get_val, 0, 4}, }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); - -/* Thermal limits for each temp sensor. All temps are in degrees K. Must be in - * same order as enum temp_sensor_id. To always ignore any temp, use 0. - */ -struct ec_thermal_config thermal_params[] = { - {{0, 0, 0}, 0, 0}, - {{0, 0, 0}, 0, 0}, - {{0, 0, 0}, 0, 0}, - {{0, 0, 0}, 0, 0}, - {{0, 0, 0}, 0, 0}, -}; -BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); - diff --git a/board/rambi/board.h b/board/rambi/board.h index 430aedcbcb..18654fee2d 100644 --- a/board/rambi/board.h +++ b/board/rambi/board.h @@ -42,7 +42,7 @@ #define CONFIG_SCI_GPIO GPIO_PCH_SCI_L #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_TMP432 -#define CONFIG_THROTTLE_AP +#define CONFIG_DPTF #define CONFIG_USB_PORT_POWER_IN_S3 #define CONFIG_USB_PORT_POWER_SMART #define CONFIG_USB_PORT_POWER_SMART_SIMPLE diff --git a/board/strago/board.c b/board/strago/board.c index 5c123e7ef4..58759de1f3 100644 --- a/board/strago/board.c +++ b/board/strago/board.c @@ -162,17 +162,6 @@ struct als_t als[] = { }; BUILD_ASSERT(ARRAY_SIZE(als) == ALS_COUNT); -/* Thermal limits for each temp sensor. All temps are in degrees K. Must be in - * same order as enum temp_sensor_id. To always ignore any temp, use 0. - */ -struct ec_thermal_config thermal_params[] = { - {{0, 0, 0}, 0, 0}, /* TMP432_Internal */ - {{0, 0, 0}, 0, 0}, /* TMP432_Sensor_1 */ - {{0, 0, 0}, 0, 0}, /* TMP432_Sensor_2 */ - {{0, 0, 0}, 0, 0}, /* Battery Sensor */ -}; -BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); - const struct button_config buttons[] = { {"Volume Down", KEYBOARD_BUTTON_VOLUME_DOWN, GPIO_VOLUME_DOWN, 30 * MSEC, 0}, diff --git a/board/strago/board.h b/board/strago/board.h index 2c5c79b80b..a7ab0d864d 100644 --- a/board/strago/board.h +++ b/board/strago/board.h @@ -60,7 +60,7 @@ #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_TMP432 -#define CONFIG_THROTTLE_AP +#define CONFIG_DPTF #define CONFIG_PMIC diff --git a/board/wheatley/board.c b/board/wheatley/board.c index 408e833697..557aca2bb2 100644 --- a/board/wheatley/board.c +++ b/board/wheatley/board.c @@ -190,20 +190,6 @@ const struct temp_sensor_t temp_sensors[] = { }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); -/* - * Thermal limits for each temp sensor. All temps are in degrees K. Must be in - * same order as enum temp_sensor_id. To always ignore any temp, use 0. - */ -struct ec_thermal_config thermal_params[] = { - /* {Twarn, Thigh, Thalt}, fan_off, fan_max */ - {{0, 0, 0}, 0, 0}, /* Battery */ - {{0, 0, 0}, 0, 0}, /* Ambient */ - {{0, 0, 0}, 0, 0}, /* Charger */ - {{0, 0, 0}, 0, 0}, /* DRAM */ - {{0, 0, 0}, 0, 0}, /* Wifi */ -}; -BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); - /* ALS instances. Must be in same order as enum als_id. */ struct als_t als[] = { {"TI", opt3001_init, opt3001_read_lux, 5}, diff --git a/board/wheatley/board.h b/board/wheatley/board.h index abfe416a13..bfad967c78 100644 --- a/board/wheatley/board.h +++ b/board/wheatley/board.h @@ -96,7 +96,7 @@ #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_BD99992GW #define CONFIG_THERMISTOR_NCP15WB -#define CONFIG_THROTTLE_AP +#define CONFIG_DPTF /* Optional feature - used by nuvoton */ #define NPCX_I2C0_BUS2 0 /* 0:GPIOB4/B5 1:GPIOB2/B3 as I2C0 */