summaryrefslogtreecommitdiff
path: root/baseboard
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2021-05-19 14:39:05 -0600
committerCommit Bot <commit-bot@chromium.org>2021-05-24 20:41:58 +0000
commita8b87b8e128292db37e53a412742fd2532f14292 (patch)
treea641a5b3fa7f0f1f2cc2863a356c8533d31a58a6 /baseboard
parentd4d9349c1198f831d45199209827e91fd21a8d01 (diff)
downloadchrome-ec-a8b87b8e128292db37e53a412742fd2532f14292.tar.gz
guybrush: Disable SOC_TEMP for board_version > 1
SOC_TEMP is being replaced with i2c temp sensor in board version 2. Disable SOC_TEMP so it doesn't cause thermal trips on board version 2. Move board_get_soc_temp to board level since variants will not need this logic. BUG=b:188540408 TEST=Boot guybrush, see SOC temp is correct BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I8880b74993d0a942894f1c06346c534d1f39466d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2906314 Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r--baseboard/guybrush/baseboard.c9
-rw-r--r--baseboard/guybrush/baseboard.h2
2 files changed, 3 insertions, 8 deletions
diff --git a/baseboard/guybrush/baseboard.c b/baseboard/guybrush/baseboard.c
index 4a370143b7..2cf2da3051 100644
--- a/baseboard/guybrush/baseboard.c
+++ b/baseboard/guybrush/baseboard.c
@@ -189,7 +189,7 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
/* Temp Sensors */
static int board_get_memory_temp(int, int *);
-static int board_get_soc_temp(int, int *);
+
const struct temp_sensor_t temp_sensors[] = {
[TEMP_SENSOR_SOC] = {
.name = "SOC",
@@ -755,13 +755,6 @@ static int board_get_memory_temp(int idx, int *temp_k)
return get_temp_3v3_30k9_47k_4050b(idx, temp_k);
}
-static int board_get_soc_temp(int idx, int *temp_k)
-{
- if (chipset_in_state(CHIPSET_STATE_HARD_OFF))
- return EC_ERROR_NOT_POWERED;
- return get_temp_3v3_30k9_47k_4050b(idx, temp_k);
-}
-
/**
* Return if VBUS is sagging too low
*/
diff --git a/baseboard/guybrush/baseboard.h b/baseboard/guybrush/baseboard.h
index 84a65e8508..20c298126a 100644
--- a/baseboard/guybrush/baseboard.h
+++ b/baseboard/guybrush/baseboard.h
@@ -348,6 +348,8 @@ void sbu_fault_interrupt(enum ioex_signal signal);
void baseboard_en_pwr_pcore_s0(enum gpio_signal signal);
void baseboard_en_pwr_s0(enum gpio_signal signal);
+int board_get_soc_temp(int idx, int *temp_k);
+
/* CBI utility functions */
uint32_t get_sku_id(void);
uint32_t get_board_version(void);