timer: generic udelay()
Add GENERIC_UDELAY Kconfig option so that a generic udelay() implementation is provided utilizing the monotonic timer. That way each board/chipset doesn't need to duplicate the same udelay(). Additionally, assume that GENERIC_UDELAY implies init_timer() is not required. BUG=None BRANCH=None TEST=Built nyan, ryu, and rambi. May need help testing. Change-Id: Idd26de19eefc91ee3b0ceddfb1bc2152e19fd8ab Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/219719 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
parent
46ede08976
commit
1a85fbcad7
19 changed files with 24 additions and 243 deletions
|
|
@ -1,7 +1,11 @@
|
|||
#ifndef DELAY_H
|
||||
#define DELAY_H
|
||||
|
||||
#if IS_ENABLED(CONFIG_GENERIC_UDELAY)
|
||||
static inline void init_timer(void) {}
|
||||
#else
|
||||
void init_timer(void);
|
||||
#endif
|
||||
|
||||
void udelay(unsigned usecs);
|
||||
void mdelay(unsigned msecs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue