To avoid calling get_time() when the caller already knows the value, add
a parameter to timestamp_expired().
BUG=chrome-os-partner:9424
TEST=build and boot on Daisy
Change-Id: Ibb97c86f429ec4b814e17b41cbf79b612a75097a
Signed-off-by: Simon Glass <sjg@chromium.org>
Rather than open code this each time, create a function for this. The
wrap-around condition may not be needed, if the timer starts at zero,
since we have 64 bits to play with.
BUG=chrome-os-partner:9424
TEST=build and boot on daisy
Change-Id: I84ae651212769b5927c452bc03f31f60a25a829e
Signed-off-by: Simon Glass <sjg@chromium.org>
1) When frequency changes, reload the watchdog timer right away, or it
may expire before the next reload. (Only matters when re-enabling the
PLL.)
2) Split out the timer/task debug output used by the watchdog into
their own routines, instead of assuming it's safe to call the command
handlers. Also make the flushes in those print routines safe to call
from interrupt level.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=waitms 1500; should print task dump again
Change-Id: I07e0ed24a526ae499566dab0bbeb0f5755cd5be6