summaryrefslogtreecommitdiff
path: root/baseboard
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2022-10-13 13:41:30 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-14 20:04:05 +0000
commit32ff920e7474bd6467193501c1489efd4ea8ccb9 (patch)
tree40f3d4857d934d827b7a4ad1c54750868caaadaf /baseboard
parent94c7eaba830670a0b4526193e8e6340838a09fb2 (diff)
downloadchrome-ec-32ff920e7474bd6467193501c1489efd4ea8ccb9.tar.gz
baseboard/intelrvp: Work around clang bug
clang warns: error: initializer element is not a compile-time constant There is an upstream LLVM review with proposed fix: https://reviews.llvm.org/D76096. In the meantime, we will work around it. BRANCH=none BUG=b:172020503, b:202062363 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: If48c7bd9544c0fae0a889693122673016e1ba183 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3953254 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r--baseboard/intelrvp/baseboard.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/baseboard/intelrvp/baseboard.c b/baseboard/intelrvp/baseboard.c
index e1e0a06943..41bcdc26c2 100644
--- a/baseboard/intelrvp/baseboard.c
+++ b/baseboard/intelrvp/baseboard.c
@@ -70,28 +70,30 @@ const struct temp_sensor_t temp_sensors[] = {
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
-const static struct ec_thermal_config thermal_a = {
- .temp_host = {
- [EC_TEMP_THRESH_WARN] = 0,
- [EC_TEMP_THRESH_HIGH] = C_TO_K(75),
- [EC_TEMP_THRESH_HALT] = C_TO_K(80),
- },
- .temp_host_release = {
- [EC_TEMP_THRESH_WARN] = 0,
- [EC_TEMP_THRESH_HIGH] = C_TO_K(65),
- [EC_TEMP_THRESH_HALT] = 0,
- },
- .temp_fan_off = C_TO_K(15),
- .temp_fan_max = C_TO_K(50),
-};
+#define THERMAL_A \
+ { \
+ .temp_host = { \
+ [EC_TEMP_THRESH_WARN] = 0, \
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(75), \
+ [EC_TEMP_THRESH_HALT] = C_TO_K(80), \
+ }, \
+ .temp_host_release = { \
+ [EC_TEMP_THRESH_WARN] = 0, \
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(65), \
+ [EC_TEMP_THRESH_HALT] = 0, \
+ }, \
+ .temp_fan_off = C_TO_K(15), \
+ .temp_fan_max = C_TO_K(50), \
+ }
+__maybe_unused static const struct ec_thermal_config thermal_a = THERMAL_A;
struct ec_thermal_config thermal_params[] = {
- [TEMP_SNS_AMBIENT] = thermal_a, [TEMP_SNS_BATTERY] = thermal_a,
- [TEMP_SNS_DDR] = thermal_a,
+ [TEMP_SNS_AMBIENT] = THERMAL_A, [TEMP_SNS_BATTERY] = THERMAL_A,
+ [TEMP_SNS_DDR] = THERMAL_A,
#ifdef CONFIG_PECI
- [TEMP_SNS_PECI] = thermal_a,
+ [TEMP_SNS_PECI] = THERMAL_A,
#endif
- [TEMP_SNS_SKIN] = thermal_a, [TEMP_SNS_VR] = thermal_a,
+ [TEMP_SNS_SKIN] = THERMAL_A, [TEMP_SNS_VR] = THERMAL_A,
};
BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT);
#endif /* CONFIG_TEMP_SENSOR */