xref: /openbmc/linux/arch/hexagon/include/asm/timex.h (revision ac4dfccb)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
4  */
5 
6 #ifndef _ASM_TIMEX_H
7 #define _ASM_TIMEX_H
8 
9 #include <asm-generic/timex.h>
10 #include <asm/timer-regs.h>
11 #include <asm/hexagon_vm.h>
12 
13 /* Using TCX0 as our clock.  CLOCK_TICK_RATE scheduled to be removed. */
14 #define CLOCK_TICK_RATE              TCX0_CLK_RATE
15 
16 #define ARCH_HAS_READ_CURRENT_TIMER
17 
18 static inline int read_current_timer(unsigned long *timer_val)
19 {
20 	*timer_val = __vmgettime();
21 	return 0;
22 }
23 
24 #endif
25