tsens: msm8960: Split write ordering for TSENS Enable
Split the writes to the TSENS controller to first enable
the CLK in the first write and enable the TSENS block in
the following write.
Change-Id: Ia5116b6b7cb3a60f8dcc40b8558112d594c63357
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
diff --git a/drivers/thermal/msm8960_tsens.c b/drivers/thermal/msm8960_tsens.c
index 742bae5..0accb32 100644
--- a/drivers/thermal/msm8960_tsens.c
+++ b/drivers/thermal/msm8960_tsens.c
@@ -601,13 +601,15 @@
writel_relaxed(reg_cntl | TSENS_SW_RST, TSENS_CNTL_ADDR);
if (tmdev->hw_type == MSM_8960 || tmdev->hw_type == MSM_9615) {
- reg_cntl |= TSENS_8960_SLP_CLK_ENA | TSENS_EN |
+ reg_cntl |= TSENS_8960_SLP_CLK_ENA |
(TSENS_MEASURE_PERIOD << 18) |
TSENS_LOWER_STATUS_CLR | TSENS_UPPER_STATUS_CLR |
TSENS_MIN_STATUS_MASK | TSENS_MAX_STATUS_MASK |
(((1 << tmdev->tsens_num_sensor) - 1) <<
TSENS_SENSOR0_SHIFT);
writel_relaxed(reg_cntl, TSENS_CNTL_ADDR);
+ reg_cntl |= TSENS_EN;
+ writel_relaxed(reg_cntl, TSENS_CNTL_ADDR);
reg_cfg = readl_relaxed(TSENS_8960_CONFIG_ADDR);
reg_cfg = (reg_cfg & ~TSENS_8960_CONFIG_MASK) |