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

@ -154,9 +154,3 @@ void udelay(unsigned long usec)
usec -= kv;
} while(usec);
}
void mdelay(unsigned long msec)
{
while (msec--)
udelay(1000);
}