blob: 3dcd435d0d388a2ff0a223dec75eac9094215350 [file] [log] [blame]
Masahiro Yamada5bc516e2016-12-28 00:35:59 +09001/*
2 * SPDX-License-Identifier: GPL-2.0+
3 */
4
5#ifndef _LINUX_DELAY_H
6#define _LINUX_DELAY_H
7
8#include <linux/kernel.h>
9
10void __udelay(unsigned long usec);
11void udelay(unsigned long usec);
12
13static inline void mdelay(unsigned long msec)
14{
15 while (msec--)
16 udelay(1000);
17}
18
19static inline void ndelay(unsigned long nsec)
20{
21 udelay(DIV_ROUND_UP(nsec, 1000));
22}
23
24#endif /* defined(_LINUX_DELAY_H) */