CHROMIUMOS: exynos:tmu: use saved thresh_rise value on resume
authorGrant Grundler <grundler@chromium.org>
Wed, 18 Jul 2012 00:42:37 +0000 (00:42 +0000)
committerGerrit <chrome-bot@google.com>
Wed, 18 Jul 2012 19:41:05 +0000 (12:41 -0700)
commit82a0af6277e356154f6093d8b11668247319c903
tree7b27421759f2d1cb7c10847a20a681367bff439d
parent51a32e63e4ad47bf4877b7e05e5bc29ace0e3a94
CHROMIUMOS: exynos:tmu: use saved thresh_rise value on resume

Cache the THD_THRESH_RISE register value.  On resume, we won't depend
on uboot to reconfigure "level3" threshold value for HW Thermal poweroff.
Currently uboot is only setting up TMU on at boot time - not on resume.

Jonathan Kliegman also found the bug where we didn't set "level3" at all
in the "uboot already set level3" code path. This code path was
clobbering level3 threshhold and causing poweroff while resuming.

BUG=chrome-os-partner:11273
TEST=manual test
    echo +20  > /sys/class/rtc/rtc1/wakealarm
    echo mem > /sys/power/state

Change-Id: Ie44d76d79b2b7ad68f0150af887d92f9fde2eda8
Signed-off-by: Grant Grundler <grundler@chromium.org>
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27735
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
drivers/thermal/exynos_thermal.c