From 985c0679dfa459a1deed31b999b26e4420786874 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Mon, 5 Mar 2012 11:49:30 +0000 Subject: arm64: Generic timers support This patch adds support for the ARM generic timers with A64 instructions for accessing the timer registers. It uses the physical counter as the clock source and the virtual counter as sched_clock. The timer frequency can be specified via DT or read from the CNTFRQ_EL0 register. The physical counter is also accessible from user space allowing fast gettimeofday() implementation. Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Acked-by: Tony Lindgren Acked-by: Nicolas Pitre Acked-by: Olof Johansson Acked-by: Santosh Shilimkar Acked-by: Arnd Bergmann --- include/clocksource/arm_generic.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 include/clocksource/arm_generic.h (limited to 'include/clocksource') diff --git a/include/clocksource/arm_generic.h b/include/clocksource/arm_generic.h new file mode 100644 index 0000000..5b41b0d --- /dev/null +++ b/include/clocksource/arm_generic.h @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __CLKSOURCE_ARM_GENERIC_H +#define __CLKSOURCE_ARM_GENERIC_H + +extern int arm_generic_timer_init(void); + +#endif -- cgit v1.1