mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08: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:

committed by
Tom Rini

parent
4b105f6ca9
commit
5bc516ed66
@ -154,9 +154,3 @@ void udelay(unsigned long usec)
|
||||
usec -= kv;
|
||||
} while(usec);
|
||||
}
|
||||
|
||||
void mdelay(unsigned long msec)
|
||||
{
|
||||
while (msec--)
|
||||
udelay(1000);
|
||||
}
|
||||
|
Reference in New Issue
Block a user