Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Masahiro Yamada | 5bc516e | 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 | { |
Simon Glass | 49c7516 | 2018-11-23 21:29:40 -0700 | [diff] [blame] | 13 | udelay(1000 * msec); |
Masahiro Yamada | 5bc516e | 2016-12-28 00:35:59 +0900 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | static inline void ndelay(unsigned long nsec) |
| 17 | { |
| 18 | udelay(DIV_ROUND_UP(nsec, 1000)); |
| 19 | } |
| 20 | |
| 21 | #endif /* defined(_LINUX_DELAY_H) */ |