diff options
Diffstat (limited to 'include/lib/timer.h')
-rw-r--r-- | include/lib/timer.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/lib/timer.h b/include/lib/timer.h index 1c12354..7385d9b 100644 --- a/include/lib/timer.h +++ b/include/lib/timer.h @@ -76,6 +76,23 @@ int tftf_program_timer_and_suspend(unsigned long milli_secs, unsigned int pwr_state); /* + * Requests the timer framework to send an interrupt after milli_secs and to + * suspend the system. The interrupt is sent to the calling core of this api. + * The actual time the interrupt is received by the core can be greater than + * the requested time. For the system suspend to succeed, all cores other than + * the calling core should be in the OFF state. + * + * Return codes from tftf_program_timer calls and tftf_cpu_system suspend + * are stored respectively in timer_rc and suspend_rc output parameters. + * If a function is not executed, the return value stored in the output + * parameters will be as if the correponding call succeeded. NULL pointers are + * accepted to discard the return codes. + * Returns 0 on success and -1 on failure. + */ +int tftf_program_timer_and_sys_suspend(unsigned long milli_secs, + int *timer_rc, int *suspend_rc); + +/* * Suspends the calling CPU for specified milliseconds. * * Returns 0 on success, and -1 otherwise. |