blob: f77ffc1eb0c2b0d2e5a6125169da694b33bd2a0f [file] [log] [blame]
Russell Kingbc282482009-05-17 18:58:34 +01001/*
2 * arch/arm/include/asm/localtimer.h
3 *
4 * Copyright (C) 2004-2005 ARM Ltd.
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_LOCALTIMER_H
11#define __ASM_ARM_LOCALTIMER_H
12
Shawn Guobb1ac3e2011-10-06 14:57:24 +010013#include <linux/errno.h>
14
Russell Kingbc282482009-05-17 18:58:34 +010015struct clock_event_device;
16
Marc Zyngier0ef330e2012-01-10 19:26:45 +000017struct local_timer_ops {
18 int (*setup)(struct clock_event_device *);
19 void (*stop)(struct clock_event_device *);
20};
21
Russell Kingbc282482009-05-17 18:58:34 +010022#ifdef CONFIG_LOCAL_TIMERS
23/*
Marc Zyngier0ef330e2012-01-10 19:26:45 +000024 * Register a local timer driver
25 */
26int local_timer_register(struct local_timer_ops *);
Santosh Shilimkaraf90f102011-02-23 18:53:15 +010027#else
Marc Zyngier0ef330e2012-01-10 19:26:45 +000028static inline int local_timer_register(struct local_timer_ops *ops)
29{
30 return -ENXIO;
31}
Russell Kingbc282482009-05-17 18:58:34 +010032#endif
33
34#endif