aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/samsung/exynos_tmu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 0d96a510389f..ffccc894f0f8 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -225,6 +225,8 @@ skip_calib_data:
225 trigger_levs++; 225 trigger_levs++;
226 } 226 }
227 227
228 rising_threshold = readl(data->base + reg->threshold_th0);
229
228 if (data->soc == SOC_ARCH_EXYNOS4210) { 230 if (data->soc == SOC_ARCH_EXYNOS4210) {
229 /* Write temperature code for threshold */ 231 /* Write temperature code for threshold */
230 threshold_code = temp_to_code(data, pdata->threshold); 232 threshold_code = temp_to_code(data, pdata->threshold);
@@ -249,6 +251,7 @@ skip_calib_data:
249 ret = threshold_code; 251 ret = threshold_code;
250 goto out; 252 goto out;
251 } 253 }
254 rising_threshold &= ~(0xff << 8 * i);
252 rising_threshold |= threshold_code << 8 * i; 255 rising_threshold |= threshold_code << 8 * i;
253 if (pdata->threshold_falling) { 256 if (pdata->threshold_falling) {
254 threshold_code = temp_to_code(data, 257 threshold_code = temp_to_code(data,
@@ -281,6 +284,7 @@ skip_calib_data:
281 } 284 }
282 if (i == EXYNOS_MAX_TRIGGER_PER_REG - 1) { 285 if (i == EXYNOS_MAX_TRIGGER_PER_REG - 1) {
283 /* 1-4 level to be assigned in th0 reg */ 286 /* 1-4 level to be assigned in th0 reg */
287 rising_threshold &= ~(0xff << 8 * i);
284 rising_threshold |= threshold_code << 8 * i; 288 rising_threshold |= threshold_code << 8 * i;
285 writel(rising_threshold, 289 writel(rising_threshold,
286 data->base + reg->threshold_th0); 290 data->base + reg->threshold_th0);