Masahiro Yamada | 5bc516e | 2016-12-28 00:35:59 +0900 | [diff] [blame] | 1 | /* |
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 | |||||
10 | void __udelay(unsigned long usec); | ||||
11 | void udelay(unsigned long usec); | ||||
12 | |||||
13 | static inline void mdelay(unsigned long msec) | ||||
14 | { | ||||
15 | while (msec--) | ||||
16 | udelay(1000); | ||||
17 | } | ||||
18 | |||||
19 | static inline void ndelay(unsigned long nsec) | ||||
20 | { | ||||
21 | udelay(DIV_ROUND_UP(nsec, 1000)); | ||||
22 | } | ||||
23 | |||||
24 | #endif /* defined(_LINUX_DELAY_H) */ |