2009-05-17 17:58:34 +00: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 13:57:24 +00:00
|
|
|
#include <linux/errno.h>
|
2011-07-20 15:24:14 +00:00
|
|
|
#include <linux/interrupt.h>
|
2011-10-06 13:57:24 +00:00
|
|
|
|
2009-05-17 17:58:34 +00: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 11:14:21 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_HAVE_ARM_TWD
|
|
|
|
|
|
|
|
#include "smp_twd.h"
|
|
|
|
|
2011-07-22 11:52:37 +00:00
|
|
|
#define local_timer_stop(c) twd_timer_stop((c))
|
2009-05-16 11:14:21 +00:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
2009-05-17 17:58:34 +00:00
|
|
|
/*
|
2011-07-22 11:52:37 +00:00
|
|
|
* Stop the local timer
|
2009-05-17 17:58:34 +00:00
|
|
|
*/
|
2011-07-22 11:52:37 +00:00
|
|
|
void local_timer_stop(struct clock_event_device *);
|
2009-05-17 17:58:34 +00:00
|
|
|
|
2009-05-16 11:14:21 +00:00
|
|
|
#endif
|
|
|
|
|
2009-05-17 17:58:34 +00:00
|
|
|
/*
|
|
|
|
* Setup a local timer interrupt for a CPU.
|
|
|
|
*/
|
2011-02-23 17:53:15 +00:00
|
|
|
int local_timer_setup(struct clock_event_device *);
|
2009-05-17 17:58:34 +00:00
|
|
|
|
2011-02-23 17:53:15 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
static inline int local_timer_setup(struct clock_event_device *evt)
|
|
|
|
{
|
|
|
|
return -ENXIO;
|
|
|
|
}
|
2011-07-22 11:52:37 +00:00
|
|
|
|
|
|
|
static inline void local_timer_stop(struct clock_event_device *evt)
|
|
|
|
{
|
|
|
|
}
|
2009-05-17 17:58:34 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|