1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 #ifndef _ASMRISCV_DELAY_H_ 3 #define _ASMRISCV_DELAY_H_ 4 5 #include <libcflat.h> 6 #include <asm/setup.h> 7 8 extern void delay(uint64_t cycles); 9 extern void udelay(unsigned long usecs); 10 usec_to_cycles(uint64_t usec)11static inline uint64_t usec_to_cycles(uint64_t usec) 12 { 13 return (timebase_frequency * usec) / 1000000; 14 } 15 16 #endif /* _ASMRISCV_DELAY_H_ */ 17