aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/thermal/samsung/exynos_tmu.c2
-rw-r--r--drivers/thermal/samsung/exynos_tmu.h7
-rw-r--r--drivers/thermal/samsung/exynos_tmu_data.c17
3 files changed, 9 insertions, 17 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 209221f1fab2..51d8cc70b6d6 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -476,7 +476,7 @@ static int exynos_tmu_set_emulation(void *drv_data, unsigned long temp)
476 struct exynos_tmu_platform_data *pdata = data->pdata; 476 struct exynos_tmu_platform_data *pdata = data->pdata;
477 int ret = -EINVAL; 477 int ret = -EINVAL;
478 478
479 if (!TMU_SUPPORTS(pdata, EMULATION)) 479 if (data->soc == SOC_ARCH_EXYNOS4210)
480 goto out; 480 goto out;
481 481
482 if (temp && temp < MCELSIUS) 482 if (temp && temp < MCELSIUS)
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index d90852a0b403..5ad3f3fbc6f0 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -47,17 +47,14 @@ enum soc_type {
47 47
48/** 48/**
49 * EXYNOS TMU supported features. 49 * EXYNOS TMU supported features.
50 * TMU_SUPPORT_EMULATION - This features is used to set user defined
51 * temperature to the TMU controller.
52 * TMU_SUPPORT_MULTI_INST - This features denotes that the soc 50 * TMU_SUPPORT_MULTI_INST - This features denotes that the soc
53 * has many instances of TMU. 51 * has many instances of TMU.
54 * TMU_SUPPORT_ADDRESS_MULTIPLE - This feature tells that the different TMU 52 * TMU_SUPPORT_ADDRESS_MULTIPLE - This feature tells that the different TMU
55 * sensors shares some common registers. 53 * sensors shares some common registers.
56 * TMU_SUPPORT - macro to compare the above features with the supplied. 54 * TMU_SUPPORT - macro to compare the above features with the supplied.
57 */ 55 */
58#define TMU_SUPPORT_EMULATION BIT(0) 56#define TMU_SUPPORT_MULTI_INST BIT(0)
59#define TMU_SUPPORT_MULTI_INST BIT(1) 57#define TMU_SUPPORT_ADDRESS_MULTIPLE BIT(1)
60#define TMU_SUPPORT_ADDRESS_MULTIPLE BIT(2)
61 58
62#define TMU_SUPPORTS(a, b) (a->features & TMU_SUPPORT_ ## b) 59#define TMU_SUPPORTS(a, b) (a->features & TMU_SUPPORT_ ## b)
63 60
diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c
index 82f1cba2dc7f..4dd8d1c1b822 100644
--- a/drivers/thermal/samsung/exynos_tmu_data.c
+++ b/drivers/thermal/samsung/exynos_tmu_data.c
@@ -100,8 +100,7 @@ struct exynos_tmu_init_data const exynos4210_default_tmu_data = {
100 .freq_clip_max = 400 * 1000, \ 100 .freq_clip_max = 400 * 1000, \
101 .temp_level = 95, \ 101 .temp_level = 95, \
102 }, \ 102 }, \
103 .freq_tab_count = 2, \ 103 .freq_tab_count = 2
104 .features = TMU_SUPPORT_EMULATION
105#endif 104#endif
106 105
107#if defined(CONFIG_SOC_EXYNOS3250) 106#if defined(CONFIG_SOC_EXYNOS3250)
@@ -152,8 +151,7 @@ struct exynos_tmu_init_data const exynos3250_default_tmu_data = {
152 .freq_clip_max = 400 * 1000, \ 151 .freq_clip_max = 400 * 1000, \
153 .temp_level = 95, \ 152 .temp_level = 95, \
154 }, \ 153 }, \
155 .freq_tab_count = 2, \ 154 .freq_tab_count = 2
156 .features = TMU_SUPPORT_EMULATION
157#endif 155#endif
158 156
159#if defined(CONFIG_SOC_EXYNOS4412) 157#if defined(CONFIG_SOC_EXYNOS4412)
@@ -220,8 +218,7 @@ struct exynos_tmu_init_data const exynos5250_default_tmu_data = {
220 218
221#define EXYNOS5260_TMU_DATA \ 219#define EXYNOS5260_TMU_DATA \
222 __EXYNOS5260_TMU_DATA \ 220 __EXYNOS5260_TMU_DATA \
223 .type = SOC_ARCH_EXYNOS5260, \ 221 .type = SOC_ARCH_EXYNOS5260
224 .features = TMU_SUPPORT_EMULATION
225 222
226struct exynos_tmu_init_data const exynos5260_default_tmu_data = { 223struct exynos_tmu_init_data const exynos5260_default_tmu_data = {
227 .tmu_data = { 224 .tmu_data = {
@@ -274,13 +271,12 @@ struct exynos_tmu_init_data const exynos5260_default_tmu_data = {
274 271
275#define EXYNOS5420_TMU_DATA \ 272#define EXYNOS5420_TMU_DATA \
276 __EXYNOS5420_TMU_DATA \ 273 __EXYNOS5420_TMU_DATA \
277 .type = SOC_ARCH_EXYNOS5420, \ 274 .type = SOC_ARCH_EXYNOS5420
278 .features = TMU_SUPPORT_EMULATION
279 275
280#define EXYNOS5420_TMU_DATA_SHARED \ 276#define EXYNOS5420_TMU_DATA_SHARED \
281 __EXYNOS5420_TMU_DATA \ 277 __EXYNOS5420_TMU_DATA \
282 .type = SOC_ARCH_EXYNOS5420_TRIMINFO, \ 278 .type = SOC_ARCH_EXYNOS5420_TRIMINFO, \
283 .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_ADDRESS_MULTIPLE) 279 .features = TMU_SUPPORT_ADDRESS_MULTIPLE
284 280
285struct exynos_tmu_init_data const exynos5420_default_tmu_data = { 281struct exynos_tmu_init_data const exynos5420_default_tmu_data = {
286 .tmu_data = { 282 .tmu_data = {
@@ -314,8 +310,7 @@ struct exynos_tmu_init_data const exynos5420_default_tmu_data = {
314 .second_point_trim = 70, \ 310 .second_point_trim = 70, \
315 .default_temp_offset = 25, \ 311 .default_temp_offset = 25, \
316 .type = SOC_ARCH_EXYNOS5440, \ 312 .type = SOC_ARCH_EXYNOS5440, \
317 .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_MULTI_INST | \ 313 .features = (TMU_SUPPORT_MULTI_INST | TMU_SUPPORT_ADDRESS_MULTIPLE),
318 TMU_SUPPORT_ADDRESS_MULTIPLE),
319 314
320struct exynos_tmu_init_data const exynos5440_default_tmu_data = { 315struct exynos_tmu_init_data const exynos5440_default_tmu_data = {
321 .tmu_data = { 316 .tmu_data = {