[8895] thermal: samsung: Disable TMU core EN
authorSoomin Kim <sm8326.kim@samsung.com>
Tue, 12 Jul 2016 08:18:25 +0000 (17:18 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:09:27 +0000 (17:09 +0900)
Before set the TMU control register, disable
enable bit to abnormal operation.

Change-Id: Ic2979d3149581a5020c21c593e207ed9ef1fe972
Signed-off-by: Soomin Kim <sm8326.kim@samsung.com>
drivers/thermal/samsung/exynos_tmu.c

index c19b3180ce60bf88f0370b473fe076db8d337a27..593d61927b68ac987119183f07369e53c32cea54 100644 (file)
@@ -582,6 +582,12 @@ static void exynos8895_tmu_control(struct platform_device *pdev, bool on)
        int i;
        u32 avg_con, avg_sel;
 
+       con = readl(data->base + EXYNOS_TMU_REG_CONTROL);
+       con &= ~(1 << EXYNOS_TMU_CORE_EN_SHIFT);
+       con &= ~(1 << EXYNOS_TMU_THERM_TRIP_EN_SHIFT);
+       writel(con, data->base + EXYNOS_TMU_REG_CONTROL);
+       con = 0;
+
        trim_info = readl(data->base + EXYNOS_TMU_REG_TRIMINFO);
        trim_info1 = readl(data->base + EXYNOS_TMU_REG_TRIMINFO1);
        trim_info2 = readl(data->base + EXYNOS_TMU_REG_TRIMINFO2);