include/linux/clockchips.h
author Florian Westphal <fw@strlen.de>
Sun, 11 Jan 2009 20:20:11 +0100
changeset 0 aa628870c1d3
child 2 d1f6d8b6f81c
permissions -rw-r--r--
Port of Linux 2.6.28 for use with network simulation cradle.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     1
/*  linux/include/linux/clockchips.h
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     2
 *
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     3
 *  This file contains the structure definitions for clockchips.
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     4
 *
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     5
 *  If you are not a clockchip, or the time of day code, you should
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     6
 *  not be including this file!
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     7
 */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     8
#ifndef _LINUX_CLOCKCHIPS_H
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     9
#define _LINUX_CLOCKCHIPS_H
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    10
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    11
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    12
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    13
#include <linux/clocksource.h>
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    14
#include <linux/cpumask.h>
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    15
#include <linux/ktime.h>
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    16
#include <linux/notifier.h>
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    17
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    18
struct clock_event_device;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    19
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    20
/* Clock event mode commands */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    21
enum clock_event_mode {
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    22
	CLOCK_EVT_MODE_UNUSED = 0,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    23
	CLOCK_EVT_MODE_SHUTDOWN,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    24
	CLOCK_EVT_MODE_PERIODIC,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    25
	CLOCK_EVT_MODE_ONESHOT,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    26
	CLOCK_EVT_MODE_RESUME,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    27
};
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    28
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    29
/* Clock event notification values */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    30
enum clock_event_nofitiers {
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    31
	CLOCK_EVT_NOTIFY_ADD,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    32
	CLOCK_EVT_NOTIFY_BROADCAST_ON,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    33
	CLOCK_EVT_NOTIFY_BROADCAST_OFF,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    34
	CLOCK_EVT_NOTIFY_BROADCAST_FORCE,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    35
	CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    36
	CLOCK_EVT_NOTIFY_BROADCAST_EXIT,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    37
	CLOCK_EVT_NOTIFY_SUSPEND,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    38
	CLOCK_EVT_NOTIFY_RESUME,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    39
	CLOCK_EVT_NOTIFY_CPU_DEAD,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    40
};
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    41
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    42
/*
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    43
 * Clock event features
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    44
 */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    45
#define CLOCK_EVT_FEAT_PERIODIC		0x000001
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    46
#define CLOCK_EVT_FEAT_ONESHOT		0x000002
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    47
/*
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    48
 * x86(64) specific misfeatures:
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    49
 *
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    50
 * - Clockevent source stops in C3 State and needs broadcast support.
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    51
 * - Local APIC timer is used as a dummy device.
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    52
 */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    53
#define CLOCK_EVT_FEAT_C3STOP		0x000004
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    54
#define CLOCK_EVT_FEAT_DUMMY		0x000008
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    55
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    56
/**
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    57
 * struct clock_event_device - clock event device descriptor
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    58
 * @name:		ptr to clock event name
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    59
 * @features:		features
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    60
 * @max_delta_ns:	maximum delta value in ns
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    61
 * @min_delta_ns:	minimum delta value in ns
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    62
 * @mult:		nanosecond to cycles multiplier
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    63
 * @shift:		nanoseconds to cycles divisor (power of two)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    64
 * @rating:		variable to rate clock event devices
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    65
 * @irq:		IRQ number (only for non CPU local devices)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    66
 * @cpumask:		cpumask to indicate for which CPUs this device works
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    67
 * @set_next_event:	set next event function
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    68
 * @set_mode:		set mode function
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    69
 * @event_handler:	Assigned by the framework to be called by the low
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    70
 *			level handler of the event source
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    71
 * @broadcast:		function to broadcast events
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    72
 * @list:		list head for the management code
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    73
 * @mode:		operating mode assigned by the management code
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    74
 * @next_event:		local storage for the next event in oneshot mode
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    75
 */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    76
struct clock_event_device {
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    77
	const char		*name;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    78
	unsigned int		features;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    79
	unsigned long		max_delta_ns;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    80
	unsigned long		min_delta_ns;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    81
	unsigned long		mult;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    82
	int			shift;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    83
	int			rating;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    84
	int			irq;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    85
	cpumask_t		cpumask;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    86
	int			(*set_next_event)(unsigned long evt,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    87
						  struct clock_event_device *);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    88
	void			(*set_mode)(enum clock_event_mode mode,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    89
					    struct clock_event_device *);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    90
	void			(*event_handler)(struct clock_event_device *);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    91
	void			(*broadcast)(cpumask_t mask);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    92
	struct list_head	list;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    93
	enum clock_event_mode	mode;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    94
	ktime_t			next_event;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    95
};
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    96
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    97
/*
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    98
 * Calculate a multiplication factor for scaled math, which is used to convert
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    99
 * nanoseconds based values to clock ticks:
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   100
 *
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   101
 * clock_ticks = (nanoseconds * factor) >> shift.
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   102
 *
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   103
 * div_sc is the rearranged equation to calculate a factor from a given clock
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   104
 * ticks / nanoseconds ratio:
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   105
 *
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   106
 * factor = (clock_ticks << shift) / nanoseconds
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   107
 */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   108
static inline unsigned long div_sc(unsigned long ticks, unsigned long nsec,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   109
				   int shift)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   110
{
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   111
	uint64_t tmp = ((uint64_t)ticks) << shift;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   112
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   113
	do_div(tmp, nsec);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   114
	return (unsigned long) tmp;
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   115
}
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   116
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   117
/* Clock event layer functions */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   118
extern unsigned long clockevent_delta2ns(unsigned long latch,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   119
					 struct clock_event_device *evt);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   120
extern void clockevents_register_device(struct clock_event_device *dev);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   121
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   122
extern void clockevents_exchange_device(struct clock_event_device *old,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   123
					struct clock_event_device *new);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   124
extern void clockevents_set_mode(struct clock_event_device *dev,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   125
				 enum clock_event_mode mode);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   126
extern int clockevents_register_notifier(struct notifier_block *nb);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   127
extern int clockevents_program_event(struct clock_event_device *dev,
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   128
				     ktime_t expires, ktime_t now);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   129
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   130
extern void clockevents_handle_noop(struct clock_event_device *dev);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   131
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   132
#ifdef CONFIG_GENERIC_CLOCKEVENTS
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   133
extern void clockevents_notify(unsigned long reason, void *arg);
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   134
#else
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   135
# define clockevents_notify(reason, arg) do { } while (0)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   136
#endif
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   137
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   138
#else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   139
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   140
#define clockevents_notify(reason, arg) do { } while (0)
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   141
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   142
#endif
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   143
aa628870c1d3 Port of Linux 2.6.28 for use with network simulation cradle.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   144
#endif