Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Masahiro Yamada | 29d2a62 | 2016-12-28 00:35:59 +0900 | [diff] [blame] | 2 | |
| 3 | #ifndef _LINUX_DELAY_H |
| 4 | #define _LINUX_DELAY_H |
| 5 | |
| 6 | #include <linux/kernel.h> |
| 7 | |
| 8 | void __udelay(unsigned long usec); |
| 9 | void udelay(unsigned long usec); |
| 10 | |
| 11 | static inline void mdelay(unsigned long msec) |
| 12 | { |
| 13 | while (msec--) |
| 14 | udelay(1000); |
| 15 | } |
| 16 | |
| 17 | static inline void ndelay(unsigned long nsec) |
| 18 | { |
| 19 | udelay(DIV_ROUND_UP(nsec, 1000)); |
| 20 | } |
| 21 | |
| 22 | #endif /* defined(_LINUX_DELAY_H) */ |