@@ -1078,41 +1078,27 @@ static int omap_bandgap_restore_ctxt(struct omap_bandgap *bg_ptr)
if (OMAP_BANDGAP_HAS(bg_ptr, COUNTER))
val = omap_bandgap_readl(bg_ptr, tsr->bgap_counter);
- if (val == 0) {
- if (OMAP_BANDGAP_HAS(bg_ptr, TSHUT_CONFIG))
- omap_bandgap_writel(bg_ptr,
- rval->tshut_threshold,
- tsr->tshut_threshold);
- /* Force immediate temperature measurement and update
- * of the DTEMP field
- */
- omap_bandgap_force_single_read(bg_ptr, i);
-
- if (OMAP_BANDGAP_HAS(bg_ptr, COUNTER))
- omap_bandgap_writel(bg_ptr, rval->bg_counter,
- tsr->bgap_counter);
- if (OMAP_BANDGAP_HAS(bg_ptr, MODE_CONFIG))
- omap_bandgap_writel(bg_ptr, rval->bg_mode_ctrl,
- tsr->bgap_mode_ctrl);
- if (OMAP_BANDGAP_HAS(bg_ptr, TALERT)) {
- omap_bandgap_writel(bg_ptr,
- rval->bg_threshold,
- tsr->bgap_threshold);
- omap_bandgap_writel(bg_ptr, rval->bg_ctrl,
- tsr->bgap_mask_ctrl);
- }
- } else {
- temp = omap_bandgap_readl(bg_ptr,
- tsr->temp_sensor_ctrl);
- temp &= (tsr->bgap_dtemp_mask);
- omap_bandgap_force_single_read(bg_ptr, i);
- if (temp == 0 && OMAP_BANDGAP_HAS(bg_ptr, TALERT)) {
- temp = omap_bandgap_readl(bg_ptr,
- tsr->bgap_mask_ctrl);
- temp |= 1 << __ffs(tsr->mode_ctrl_mask);
- omap_bandgap_writel(bg_ptr, temp,
- tsr->bgap_mask_ctrl);
- }
+ if (OMAP_BANDGAP_HAS(bg_ptr, TSHUT_CONFIG))
+ omap_bandgap_writel(bg_ptr,
+ rval->tshut_threshold,
+ tsr->tshut_threshold);
+ /* Force immediate temperature measurement and update
+ * of the DTEMP field
+ */
+ omap_bandgap_force_single_read(bg_ptr, i);
+
+ if (OMAP_BANDGAP_HAS(bg_ptr, COUNTER))
+ omap_bandgap_writel(bg_ptr, rval->bg_counter,
+ tsr->bgap_counter);
+ if (OMAP_BANDGAP_HAS(bg_ptr, MODE_CONFIG))
+ omap_bandgap_writel(bg_ptr, rval->bg_mode_ctrl,
+ tsr->bgap_mode_ctrl);
+ if (OMAP_BANDGAP_HAS(bg_ptr, TALERT)) {
+ omap_bandgap_writel(bg_ptr,
+ rval->bg_threshold,
+ tsr->bgap_threshold);
+ omap_bandgap_writel(bg_ptr, rval->bg_ctrl,
+ tsr->bgap_mask_ctrl);
}
}