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