hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/thermal/tegra/tegra210-soctherm.c
....@@ -1,5 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
2
- * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
3
+ * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
34 *
45 * This software is licensed under the terms of the GNU General Public
56 * License version 2, as published by the Free Software Foundation, and
....@@ -56,6 +57,7 @@
5657 .thermtrip_any_en_mask = TEGRA210_THERMTRIP_ANY_EN_MASK,
5758 .thermtrip_enable_mask = TEGRA210_THERMTRIP_CPU_EN_MASK,
5859 .thermtrip_threshold_mask = TEGRA210_THERMTRIP_CPU_THRESH_MASK,
60
+ .thermctl_isr_mask = THERM_IRQ_CPU_MASK,
5961 .thermctl_lvl0_offset = THERMCTL_LEVEL0_GROUP_CPU,
6062 .thermctl_lvl0_up_thresh_mask = TEGRA210_THERMCTL_LVL0_UP_THRESH_MASK,
6163 .thermctl_lvl0_dn_thresh_mask = TEGRA210_THERMCTL_LVL0_DN_THRESH_MASK,
....@@ -74,6 +76,7 @@
7476 .thermtrip_any_en_mask = TEGRA210_THERMTRIP_ANY_EN_MASK,
7577 .thermtrip_enable_mask = TEGRA210_THERMTRIP_GPU_EN_MASK,
7678 .thermtrip_threshold_mask = TEGRA210_THERMTRIP_GPUMEM_THRESH_MASK,
79
+ .thermctl_isr_mask = THERM_IRQ_GPU_MASK,
7780 .thermctl_lvl0_offset = THERMCTL_LEVEL0_GROUP_GPU,
7881 .thermctl_lvl0_up_thresh_mask = TEGRA210_THERMCTL_LVL0_UP_THRESH_MASK,
7982 .thermctl_lvl0_dn_thresh_mask = TEGRA210_THERMCTL_LVL0_DN_THRESH_MASK,
....@@ -90,6 +93,7 @@
9093 .thermtrip_any_en_mask = TEGRA210_THERMTRIP_ANY_EN_MASK,
9194 .thermtrip_enable_mask = TEGRA210_THERMTRIP_TSENSE_EN_MASK,
9295 .thermtrip_threshold_mask = TEGRA210_THERMTRIP_TSENSE_THRESH_MASK,
96
+ .thermctl_isr_mask = THERM_IRQ_TSENSE_MASK,
9397 .thermctl_lvl0_offset = THERMCTL_LEVEL0_GROUP_TSENSE,
9498 .thermctl_lvl0_up_thresh_mask = TEGRA210_THERMCTL_LVL0_UP_THRESH_MASK,
9599 .thermctl_lvl0_dn_thresh_mask = TEGRA210_THERMCTL_LVL0_DN_THRESH_MASK,
....@@ -108,6 +112,7 @@
108112 .thermtrip_any_en_mask = TEGRA210_THERMTRIP_ANY_EN_MASK,
109113 .thermtrip_enable_mask = TEGRA210_THERMTRIP_MEM_EN_MASK,
110114 .thermtrip_threshold_mask = TEGRA210_THERMTRIP_GPUMEM_THRESH_MASK,
115
+ .thermctl_isr_mask = THERM_IRQ_MEM_MASK,
111116 .thermctl_lvl0_offset = THERMCTL_LEVEL0_GROUP_MEM,
112117 .thermctl_lvl0_up_thresh_mask = TEGRA210_THERMCTL_LVL0_UP_THRESH_MASK,
113118 .thermctl_lvl0_dn_thresh_mask = TEGRA210_THERMCTL_LVL0_DN_THRESH_MASK,
....@@ -203,6 +208,13 @@
203208 .fuse_spare_realignment = 0,
204209 };
205210
211
+static struct tsensor_group_thermtrips tegra210_tsensor_thermtrips[] = {
212
+ {.id = TEGRA124_SOCTHERM_SENSOR_NUM},
213
+ {.id = TEGRA124_SOCTHERM_SENSOR_NUM},
214
+ {.id = TEGRA124_SOCTHERM_SENSOR_NUM},
215
+ {.id = TEGRA124_SOCTHERM_SENSOR_NUM},
216
+};
217
+
206218 const struct tegra_soctherm_soc tegra210_soctherm = {
207219 .tsensors = tegra210_tsensors,
208220 .num_tsensors = ARRAY_SIZE(tegra210_tsensors),
....@@ -212,4 +224,5 @@
212224 .thresh_grain = TEGRA210_THRESH_GRAIN,
213225 .bptt = TEGRA210_BPTT,
214226 .use_ccroc = false,
227
+ .thermtrips = tegra210_tsensor_thermtrips,
215228 };