xref: /openbmc/linux/arch/powerpc/include/asm/timex.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2b8b572e1SStephen Rothwell #ifndef _ASM_POWERPC_TIMEX_H
3b8b572e1SStephen Rothwell #define _ASM_POWERPC_TIMEX_H
4b8b572e1SStephen Rothwell 
5b8b572e1SStephen Rothwell #ifdef __KERNEL__
6b8b572e1SStephen Rothwell 
7b8b572e1SStephen Rothwell /*
8b8b572e1SStephen Rothwell  * PowerPC architecture timex specifications
9b8b572e1SStephen Rothwell  */
10b8b572e1SStephen Rothwell 
11b8b572e1SStephen Rothwell #include <asm/cputable.h>
12d26b3817SChristophe Leroy #include <asm/vdso/timebase.h>
13b8b572e1SStephen Rothwell 
14b8b572e1SStephen Rothwell #define CLOCK_TICK_RATE	1024000 /* Underlying HZ */
15b8b572e1SStephen Rothwell 
16b8b572e1SStephen Rothwell typedef unsigned long cycles_t;
17b8b572e1SStephen Rothwell 
get_cycles(void)18b8b572e1SStephen Rothwell static inline cycles_t get_cycles(void)
19b8b572e1SStephen Rothwell {
20b8b572e1SStephen Rothwell 	return mftb();
21b8b572e1SStephen Rothwell }
22*40883583SJason A. Donenfeld #define get_cycles get_cycles
23b8b572e1SStephen Rothwell 
24b8b572e1SStephen Rothwell #endif	/* __KERNEL__ */
25b8b572e1SStephen Rothwell #endif	/* _ASM_POWERPC_TIMEX_H */
26