blob: 193603451a765b146d3c092095eea3d23415c48e [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Masahiro Yamada5bc516e2016-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{
13 while (msec--)
14 udelay(1000);
15}
16
17static inline void ndelay(unsigned long nsec)
18{
19 udelay(DIV_ROUND_UP(nsec, 1000));
20}
21
22#endif /* defined(_LINUX_DELAY_H) */