diff options
| author | Chanwoo Choi <cw00.choi@samsung.com> | 2015-02-23 23:56:54 -0500 |
|---|---|---|
| committer | Lukasz Majewski <l.majewski@samsung.com> | 2015-03-02 04:04:51 -0500 |
| commit | 42b696e808bbea3a4ebf8029e1965d2314612402 (patch) | |
| tree | 990f4088bcc544c620e9d27baacc4d108ccde3d8 /drivers/thermal | |
| parent | 5912e264d9eec512598d8faf33440630a3aee989 (diff) | |
thermal: exynos: Fix wrong control of power down detection mode for Exynos7
This patch fixes the wrong control of PD_DET_EN (power down detection mode)
for Exynos7 because exynos7_tmu_control() always enables the power down detection
mode regardless 'on' parameter.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'drivers/thermal')
| -rw-r--r-- | drivers/thermal/samsung/exynos_tmu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 1fc54ab911d2..1d30b0975651 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c | |||
| @@ -682,6 +682,7 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) | |||
| 682 | 682 | ||
| 683 | if (on) { | 683 | if (on) { |
| 684 | con |= (1 << EXYNOS_TMU_CORE_EN_SHIFT); | 684 | con |= (1 << EXYNOS_TMU_CORE_EN_SHIFT); |
| 685 | con |= (1 << EXYNOS7_PD_DET_EN_SHIFT); | ||
| 685 | interrupt_en = | 686 | interrupt_en = |
| 686 | (of_thermal_is_trip_valid(tz, 7) | 687 | (of_thermal_is_trip_valid(tz, 7) |
| 687 | << EXYNOS7_TMU_INTEN_RISE7_SHIFT) | | 688 | << EXYNOS7_TMU_INTEN_RISE7_SHIFT) | |
| @@ -704,9 +705,9 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) | |||
| 704 | interrupt_en << EXYNOS_TMU_INTEN_FALL0_SHIFT; | 705 | interrupt_en << EXYNOS_TMU_INTEN_FALL0_SHIFT; |
| 705 | } else { | 706 | } else { |
| 706 | con &= ~(1 << EXYNOS_TMU_CORE_EN_SHIFT); | 707 | con &= ~(1 << EXYNOS_TMU_CORE_EN_SHIFT); |
| 708 | con &= ~(1 << EXYNOS7_PD_DET_EN_SHIFT); | ||
| 707 | interrupt_en = 0; /* Disable all interrupts */ | 709 | interrupt_en = 0; /* Disable all interrupts */ |
| 708 | } | 710 | } |
| 709 | con |= 1 << EXYNOS7_PD_DET_EN_SHIFT; | ||
| 710 | 711 | ||
| 711 | writel(interrupt_en, data->base + EXYNOS7_TMU_REG_INTEN); | 712 | writel(interrupt_en, data->base + EXYNOS7_TMU_REG_INTEN); |
| 712 | writel(con, data->base + EXYNOS_TMU_REG_CONTROL); | 713 | writel(con, data->base + EXYNOS_TMU_REG_CONTROL); |
