mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 02:08:00 +00:00
delay: collect {m, n, u}delay declarations to include/linux/delay.h
Currently, mdelay() and udelay() are declared in include/common.h, while ndelay() in include/linux/compat.h. It would be nice to collect them into include/linux/delay.h like Linux. While we are here, fix the ndelay() implementation; I used the DIV_ROUND_UP() instead of (x)/1000 because it must wait *longer* than the given period of time. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
4b105f6ca9
commit
5bc516ed66
4 changed files with 25 additions and 13 deletions
|
@ -15,8 +15,6 @@ struct p_current{
|
|||
|
||||
extern struct p_current *current;
|
||||
|
||||
#define ndelay(x) udelay((x) < 1000 ? 1 : (x)/1000)
|
||||
|
||||
#define dev_dbg(dev, fmt, args...) \
|
||||
debug(fmt, ##args)
|
||||
#define dev_vdbg(dev, fmt, args...) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue