diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2014-11-13 10:01:05 -0500 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2014-11-20 09:52:58 -0500 |
commit | 421d5d127d422bb98ce96ffa70af713698035f93 (patch) | |
tree | f27445e010227c87a2844bbfbbe364c9158be8dc | |
parent | 6070c2ca37c3b04a007541761b244afebc3e9876 (diff) |
thermal: exynos: replace tmu_irqstatus check by Exynos5440 one
reg->tmu_irqstatus is set to non-zero value only for Exynos5440
so replace check for non-zero value of reg->tmu_irqstatus by
explicitly checking for Exynos5440 SoC type. Then remove no
longer needed reg->tmu_irqstatus register abstraction.
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.c | 6 | ||||
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu.h | 2 | ||||
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu_data.c | 1 |
3 files changed, 2 insertions, 7 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index e35c2895b4ed..839b07bbcebf 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c | |||
@@ -407,15 +407,13 @@ static void exynos_tmu_work(struct work_struct *work) | |||
407 | { | 407 | { |
408 | struct exynos_tmu_data *data = container_of(work, | 408 | struct exynos_tmu_data *data = container_of(work, |
409 | struct exynos_tmu_data, irq_work); | 409 | struct exynos_tmu_data, irq_work); |
410 | struct exynos_tmu_platform_data *pdata = data->pdata; | ||
411 | const struct exynos_tmu_registers *reg = pdata->registers; | ||
412 | unsigned int val_type; | 410 | unsigned int val_type; |
413 | 411 | ||
414 | if (!IS_ERR(data->clk_sec)) | 412 | if (!IS_ERR(data->clk_sec)) |
415 | clk_enable(data->clk_sec); | 413 | clk_enable(data->clk_sec); |
416 | /* Find which sensor generated this interrupt */ | 414 | /* Find which sensor generated this interrupt */ |
417 | if (reg->tmu_irqstatus) { | 415 | if (data->soc == SOC_ARCH_EXYNOS5440) { |
418 | val_type = readl(data->base_second + reg->tmu_irqstatus); | 416 | val_type = readl(data->base_second + EXYNOS5440_TMU_IRQ_STATUS); |
419 | if (!((val_type >> data->id) & 0x1)) | 417 | if (!((val_type >> data->id) & 0x1)) |
420 | goto out; | 418 | goto out; |
421 | } | 419 | } |
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index 2694298eef59..5c2cef1770dd 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 | * @tmu_irqstatus: register to find which TMU generated interrupts. | ||
96 | * @tmu_pmin: register to get/set the Pmin value. | 95 | * @tmu_pmin: register to get/set the Pmin value. |
97 | */ | 96 | */ |
98 | struct exynos_tmu_registers { | 97 | struct exynos_tmu_registers { |
@@ -118,7 +117,6 @@ struct exynos_tmu_registers { | |||
118 | 117 | ||
119 | u32 emul_con; | 118 | u32 emul_con; |
120 | 119 | ||
121 | u32 tmu_irqstatus; | ||
122 | u32 tmu_pmin; | 120 | u32 tmu_pmin; |
123 | }; | 121 | }; |
124 | 122 | ||
diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c index cef0b9744aef..557b4a598b37 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c +++ b/drivers/thermal/samsung/exynos_tmu_data.c | |||
@@ -401,7 +401,6 @@ static const struct exynos_tmu_registers exynos5440_tmu_registers = { | |||
401 | .inten_fall0_shift = EXYNOS5440_TMU_INTEN_FALL0_SHIFT, | 401 | .inten_fall0_shift = EXYNOS5440_TMU_INTEN_FALL0_SHIFT, |
402 | .tmu_intstat = EXYNOS5440_TMU_S0_7_IRQ, | 402 | .tmu_intstat = EXYNOS5440_TMU_S0_7_IRQ, |
403 | .tmu_intclear = EXYNOS5440_TMU_S0_7_IRQ, | 403 | .tmu_intclear = EXYNOS5440_TMU_S0_7_IRQ, |
404 | .tmu_irqstatus = EXYNOS5440_TMU_IRQ_STATUS, | ||
405 | .emul_con = EXYNOS5440_TMU_S0_7_DEBUG, | 404 | .emul_con = EXYNOS5440_TMU_S0_7_DEBUG, |
406 | .tmu_pmin = EXYNOS5440_TMU_PMIN, | 405 | .tmu_pmin = EXYNOS5440_TMU_PMIN, |
407 | }; | 406 | }; |