blob: 963342acebb7200445970aeb51907e6cdf2eceed [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Russell King4baa9922008-08-02 10:55:55 +01002 * arch/arm/include/asm/timex.h
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Architecture Specific TIME specifications
11 */
12#ifndef _ASMARM_TIMEX_H
13#define _ASMARM_TIMEX_H
14
Will Deacon923df96b2012-07-06 15:46:45 +010015#include <asm/arch_timer.h>
Rob Herring387798b2012-09-06 13:41:12 -050016#ifdef CONFIG_ARCH_MULTIPLATFORM
17#define CLOCK_TICK_RATE 1000000
18#else
Russell Kinga09e64f2008-08-05 16:14:15 +010019#include <mach/timex.h>
Rob Herring387798b2012-09-06 13:41:12 -050020#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070021
22typedef unsigned long cycles_t;
23
Will Deacon923df96b2012-07-06 15:46:45 +010024#ifdef ARCH_HAS_READ_CURRENT_TIMER
25#define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; })
26#else
27#define get_cycles() (0)
28#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070029
30#endif