blob: f73c908b7fa091ac56e927ecbb8c504e7fef9ffe [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Russell King4baa9922008-08-02 10:55:55 +01002 * arch/arm/include/asm/mach/time.h
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
4 * Copyright (C) 2004 MontaVista Software, Inc.
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#ifndef __ASM_ARM_MACH_TIME_H
11#define __ASM_ARM_MACH_TIME_H
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013/*
14 * This is our kernel timer structure.
15 *
16 * - init
17 * Initialise the kernels jiffy timer source, claim interrupt
18 * using setup_irq. This is called early on during initialisation
19 * while interrupts are still disabled on the local CPU.
20 * - suspend
21 * Suspend the kernel jiffy timer source, if necessary. This
22 * is called with interrupts disabled, after all normal devices
23 * have been suspended. If no action is required, set this to
24 * NULL.
25 * - resume
26 * Resume the kernel jiffy timer source, if necessary. This
27 * is called with interrupts disabled before any normal devices
28 * are resumed. If no action is required, set this to NULL.
29 * - offset
30 * Return the timer offset in microseconds since the last timer
31 * interrupt. Note: this must take account of any unprocessed
32 * timer interrupt which may be pending.
33 */
34struct sys_timer {
Linus Torvalds1da177e2005-04-16 15:20:36 -070035 void (*init)(void);
36 void (*suspend)(void);
37 void (*resume)(void);
John Stultz5cfc8ee2010-03-24 00:22:36 +000038#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
Linus Torvalds1da177e2005-04-16 15:20:36 -070039 unsigned long (*offset)(void);
Kevin Hilman746140c2006-09-22 00:16:30 +010040#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070041};
42
Linus Torvalds0cd61b62006-10-06 10:53:39 -070043extern void timer_tick(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
Linus Torvalds1da177e2005-04-16 15:20:36 -070045#endif