18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_TIMEX_H
38c2ecf20Sopenharmony_ci#define _ASM_POWERPC_TIMEX_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#ifdef __KERNEL__
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/*
88c2ecf20Sopenharmony_ci * PowerPC architecture timex specifications
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <asm/cputable.h>
128c2ecf20Sopenharmony_ci#include <asm/reg.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#define CLOCK_TICK_RATE	1024000 /* Underlying HZ */
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_citypedef unsigned long cycles_t;
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistatic inline cycles_t get_cycles(void)
198c2ecf20Sopenharmony_ci{
208c2ecf20Sopenharmony_ci	return mftb();
218c2ecf20Sopenharmony_ci}
228c2ecf20Sopenharmony_ci#define get_cycles get_cycles
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci#endif	/* __KERNEL__ */
258c2ecf20Sopenharmony_ci#endif	/* _ASM_POWERPC_TIMEX_H */
26