soc: qcom: watchdog_v2: update last_pet variable during resume

The last_pet variable is set in suspend callback and during
pet_watchdog() and is printed when watchdog bark handler gets
called. This variable does not represent exact last pet time in
cases where non secure bark occurs before system could pet the
watchdog upon wakeup event from low power mode. Reset the
watchdog during msm_watchdog_resume() and update last_pet
variable so that watchdog bark messages will represent latest
info.

This commit also adds memory barrier after resetting watchdog in
msm_watchdog_suspend(). This will make sure watchdog writes are
complete before proceeding further.

Change-Id: I44492a947bc3664b7d14cfae9e877ebe0dc32836
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
1 file changed