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