diff options
| author | Tom Rini <[email protected]> | 2020-10-05 13:05:46 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2020-10-05 14:10:59 -0400 |
| commit | b7e7831e5d5be047f421ddc1f308afc22764a893 (patch) | |
| tree | 7d5f27c82b260278ed0b3ea96bce592b0505b898 /include/timer.h | |
| parent | 050acee119b3757fee3bd128f55d720fdd9bb890 (diff) | |
| parent | caebff09efe8c061b4d99b82262c67fb2db9bbcf (diff) | |
Merge branch 'next'
Bring in the assorted changes that have been staged in the 'next' branch
prior to release.
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'include/timer.h')
| -rw-r--r-- | include/timer.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/timer.h b/include/timer.h index a49b500ce35..8b9fa51c53d 100644 --- a/include/timer.h +++ b/include/timer.h @@ -15,6 +15,21 @@ */ int dm_timer_init(void); +/** + * timer_timebase_fallback() - Helper for timers using timebase fallback + * @dev: A timer partially-probed timer device + * + * This is a helper function designed for timers which need to fall back on the + * cpu's timebase. This function is designed to be called during the driver's + * probe(). If there is a clocks or clock-frequency property in the timer's + * binding, then it will be used. Otherwise, the timebase of the current cpu + * will be used. This is initialized by the cpu driver, and usually gotten from + * ``/cpus/timebase-frequency`` or ``/cpus/cpu@X/timebase-frequency``. + * + * Return: 0 if OK, or negative error code on failure + */ +int timer_timebase_fallback(struct udevice *dev); + /* * timer_conv_64 - convert 32-bit counter value to 64-bit * |
