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:
Masahiro Yamada 2016-12-28 00:35:59 +09:00 committed by Tom Rini
parent 4b105f6ca9
commit 5bc516ed66
4 changed files with 25 additions and 13 deletions

View file

@ -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...) \