aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2014-11-13 10:01:04 -0500
committerEduardo Valentin <edubezval@gmail.com>2014-11-20 09:52:54 -0500
commit6070c2ca37c3b04a007541761b244afebc3e9876 (patch)
treeb1998309eb4c1a54009e8d8fcfd7840c2f5d0fb9
parent9e288d6430373a679d1ee88ff90813cd6be20dd2 (diff)
thermal: exynos: remove needless emul_time_shift abstraction
reg->emul_time_shift is used only in exynos_tmu_set_emulation() and accessed only if TMU_SUPPORT_EMUL_TIME flag is set. This flag is not set for Exynos4210 and Exynos5440 (reg->emul_time_shift field is not even assigned in exynos[4210,5440]_tmu_registers and is assigned to identical value for all other SoC types) so the abstraction is not needed and can be removed. There should be no functional changes caused by this patch. Cc: Amit Daniel Kachhap <amit.daniel@samsung.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
-rw-r--r--drivers/thermal/samsung/exynos_tmu.c4
-rw-r--r--drivers/thermal/samsung/exynos_tmu.h2
-rw-r--r--drivers/thermal/samsung/exynos_tmu_data.c4
3 files changed, 2 insertions, 8 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index c108a1f3de71..e35c2895b4ed 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -380,8 +380,8 @@ static int exynos_tmu_set_emulation(void *drv_data, unsigned long temp)
380 temp /= MCELSIUS; 380 temp /= MCELSIUS;
381 381
382 if (TMU_SUPPORTS(pdata, EMUL_TIME)) { 382 if (TMU_SUPPORTS(pdata, EMUL_TIME)) {
383 val &= ~(EXYNOS_EMUL_TIME_MASK << reg->emul_time_shift); 383 val &= ~(EXYNOS_EMUL_TIME_MASK << EXYNOS_EMUL_TIME_SHIFT);
384 val |= (EXYNOS_EMUL_TIME << reg->emul_time_shift); 384 val |= (EXYNOS_EMUL_TIME << EXYNOS_EMUL_TIME_SHIFT);
385 } 385 }
386 val &= ~(EXYNOS_EMUL_DATA_MASK << EXYNOS_EMUL_DATA_SHIFT); 386 val &= ~(EXYNOS_EMUL_DATA_MASK << EXYNOS_EMUL_DATA_SHIFT);
387 val |= (temp_to_code(data, temp) << EXYNOS_EMUL_DATA_SHIFT) | 387 val |= (temp_to_code(data, temp) << EXYNOS_EMUL_DATA_SHIFT) |
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index ed3d816ae24c..2694298eef59 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -92,7 +92,6 @@ enum soc_type {
92 * @tmu_intstat: Register containing the interrupt status values. 92 * @tmu_intstat: Register containing the interrupt status values.
93 * @tmu_intclear: Register for clearing the raised interrupt status. 93 * @tmu_intclear: Register for clearing the raised interrupt status.
94 * @emul_con: TMU emulation controller register. 94 * @emul_con: TMU emulation controller register.
95 * @emul_time_shift: shift bits of emulation time.
96 * @tmu_irqstatus: register to find which TMU generated interrupts. 95 * @tmu_irqstatus: register to find which TMU generated interrupts.
97 * @tmu_pmin: register to get/set the Pmin value. 96 * @tmu_pmin: register to get/set the Pmin value.
98 */ 97 */
@@ -118,7 +117,6 @@ struct exynos_tmu_registers {
118 u32 tmu_intclear; 117 u32 tmu_intclear;
119 118
120 u32 emul_con; 119 u32 emul_con;
121 u32 emul_time_shift;
122 120
123 u32 tmu_irqstatus; 121 u32 tmu_irqstatus;
124 u32 tmu_pmin; 122 u32 tmu_pmin;
diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c
index c35a6eadafd1..cef0b9744aef 100644
--- a/drivers/thermal/samsung/exynos_tmu_data.c
+++ b/drivers/thermal/samsung/exynos_tmu_data.c
@@ -94,7 +94,6 @@ static const struct exynos_tmu_registers exynos3250_tmu_registers = {
94 .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, 94 .tmu_intstat = EXYNOS_TMU_REG_INTSTAT,
95 .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, 95 .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR,
96 .emul_con = EXYNOS_EMUL_CON, 96 .emul_con = EXYNOS_EMUL_CON,
97 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT,
98}; 97};
99 98
100#define EXYNOS3250_TMU_DATA \ 99#define EXYNOS3250_TMU_DATA \
@@ -166,7 +165,6 @@ static const struct exynos_tmu_registers exynos4412_tmu_registers = {
166 .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, 165 .tmu_intstat = EXYNOS_TMU_REG_INTSTAT,
167 .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, 166 .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR,
168 .emul_con = EXYNOS_EMUL_CON, 167 .emul_con = EXYNOS_EMUL_CON,
169 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT,
170}; 168};
171 169
172#define EXYNOS4412_TMU_DATA \ 170#define EXYNOS4412_TMU_DATA \
@@ -250,7 +248,6 @@ static const struct exynos_tmu_registers exynos5260_tmu_registers = {
250 .tmu_intstat = EXYNOS5260_TMU_REG_INTSTAT, 248 .tmu_intstat = EXYNOS5260_TMU_REG_INTSTAT,
251 .tmu_intclear = EXYNOS5260_TMU_REG_INTCLEAR, 249 .tmu_intclear = EXYNOS5260_TMU_REG_INTCLEAR,
252 .emul_con = EXYNOS5260_EMUL_CON, 250 .emul_con = EXYNOS5260_EMUL_CON,
253 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT,
254}; 251};
255 252
256#define __EXYNOS5260_TMU_DATA \ 253#define __EXYNOS5260_TMU_DATA \
@@ -324,7 +321,6 @@ static const struct exynos_tmu_registers exynos5420_tmu_registers = {
324 .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, 321 .tmu_intstat = EXYNOS_TMU_REG_INTSTAT,
325 .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, 322 .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR,
326 .emul_con = EXYNOS_EMUL_CON, 323 .emul_con = EXYNOS_EMUL_CON,
327 .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT,
328}; 324};
329 325
330#define __EXYNOS5420_TMU_DATA \ 326#define __EXYNOS5420_TMU_DATA \