2009-05-18 01:58:34 +08:00
|
|
|
/*
|
|
|
|
* arch/arm/include/asm/localtimer.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004-2005 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.
|
|
|
|
*/
|
|
|
|
#ifndef __ASM_ARM_LOCALTIMER_H
|
|
|
|
#define __ASM_ARM_LOCALTIMER_H
|
|
|
|
|
2011-10-06 21:57:24 +08:00
|
|
|
#include <linux/errno.h>
|
2011-07-20 23:24:14 +08:00
|
|
|
#include <linux/interrupt.h>
|
2011-10-06 21:57:24 +08:00
|
|
|
|
2009-05-18 01:58:34 +08:00
|
|
|
struct clock_event_device;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Setup a per-cpu timer, whether it be a local timer or dummy broadcast
|
|
|
|
*/
|
|
|
|
void percpu_timer_setup(void);
|
|
|
|
|
|
|
|
#ifdef CONFIG_LOCAL_TIMERS
|
2009-05-16 19:14:21 +08:00
|
|
|
|
|
|
|
#ifdef CONFIG_HAVE_ARM_TWD
|
|
|
|
|
|
|
|
#include "smp_twd.h"
|
|
|
|
|
2011-07-22 19:52:37 +08:00
|
|
|
#define local_timer_stop(c) twd_timer_stop((c))
|
2009-05-16 19:14:21 +08:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
2009-05-18 01:58:34 +08:00
|
|
|
/*
|
2011-07-22 19:52:37 +08:00
|
|
|
* Stop the local timer
|
2009-05-18 01:58:34 +08:00
|
|
|
*/
|
2011-07-22 19:52:37 +08:00
|
|
|
void local_timer_stop(struct clock_event_device *);
|
2009-05-18 01:58:34 +08:00
|
|
|
|
2009-05-16 19:14:21 +08:00
|
|
|
#endif
|
|
|
|
|
2009-05-18 01:58:34 +08:00
|
|
|
/*
|
|
|
|
* Setup a local timer interrupt for a CPU.
|
|
|
|
*/
|
2011-02-24 01:53:15 +08:00
|
|
|
int local_timer_setup(struct clock_event_device *);
|
2009-05-18 01:58:34 +08:00
|
|
|
|
2011-02-24 01:53:15 +08:00
|
|
|
#else
|
|
|
|
|
|
|
|
static inline int local_timer_setup(struct clock_event_device *evt)
|
|
|
|
{
|
|
|
|
return -ENXIO;
|
|
|
|
}
|
2011-07-22 19:52:37 +08:00
|
|
|
|
|
|
|
static inline void local_timer_stop(struct clock_event_device *evt)
|
|
|
|
{
|
|
|
|
}
|
2009-05-18 01:58:34 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|