David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 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 | |
| 12 | /* Using TCX0 as our clock. CLOCK_TICK_RATE scheduled to be removed. */ |
| 13 | #define CLOCK_TICK_RATE TCX0_CLK_RATE |
| 14 | |
| 15 | #define ARCH_HAS_READ_CURRENT_TIMER |
| 16 | |
| 17 | static inline int read_current_timer(unsigned long *timer_val) |
| 18 | { |
| 19 | *timer_val = (unsigned long) __vmgettime(); |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | #endif |