blob: 71a38e15fbd3232992a775d1ede31635b7059f78 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Masahiro Yamada29d2a622016-12-28 00:35:59 +09002
3#ifndef _LINUX_DELAY_H
4#define _LINUX_DELAY_H
5
6#include <linux/kernel.h>
7
8void __udelay(unsigned long usec);
9void udelay(unsigned long usec);
10
11static inline void mdelay(unsigned long msec)
12{
Simon Glasse1e4cb32018-11-23 21:29:40 -070013 udelay(1000 * msec);
Masahiro Yamada29d2a622016-12-28 00:35:59 +090014}
15
16static inline void ndelay(unsigned long nsec)
17{
18 udelay(DIV_ROUND_UP(nsec, 1000));
19}
20
21#endif /* defined(_LINUX_DELAY_H) */