aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmtimer.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/mmtimer.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/mmtimer.h')
-rw-r--r--include/linux/mmtimer.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/include/linux/mmtimer.h b/include/linux/mmtimer.h
new file mode 100644
index 000000000000..884cabf16088
--- /dev/null
+++ b/include/linux/mmtimer.h
@@ -0,0 +1,56 @@
1/*
2 * Intel Multimedia Timer device interface
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (c) 2001-2004 Silicon Graphics, Inc. All rights reserved.
9 *
10 * This file should define an interface compatible with the IA-PC Multimedia
11 * Timers Draft Specification (rev. 0.97) from Intel. Note that some
12 * hardware may not be able to safely export its registers to userspace,
13 * so the ioctl interface should support all necessary functionality.
14 *
15 * 11/01/01 - jbarnes - initial revision
16 * 9/10/04 - Christoph Lameter - remove interrupt support
17 * 9/17/04 - jbarnes - remove test program, move some #defines to the driver
18 */
19
20#ifndef _LINUX_MMTIMER_H
21#define _LINUX_MMTIMER_H
22
23/*
24 * Breakdown of the ioctl's available. An 'optional' next to the command
25 * indicates that supporting this command is optional, while 'required'
26 * commands must be implemented if conformance is desired.
27 *
28 * MMTIMER_GETOFFSET - optional
29 * Should return the offset (relative to the start of the page where the
30 * registers are mapped) for the counter in question.
31 *
32 * MMTIMER_GETRES - required
33 * The resolution of the clock in femto (10^-15) seconds
34 *
35 * MMTIMER_GETFREQ - required
36 * Frequency of the clock in Hz
37 *
38 * MMTIMER_GETBITS - required
39 * Number of bits in the clock's counter
40 *
41 * MMTIMER_MMAPAVAIL - required
42 * Returns nonzero if the registers can be mmap'd into userspace, 0 otherwise
43 *
44 * MMTIMER_GETCOUNTER - required
45 * Gets the current value in the counter
46 */
47#define MMTIMER_IOCTL_BASE 'm'
48
49#define MMTIMER_GETOFFSET _IO(MMTIMER_IOCTL_BASE, 0)
50#define MMTIMER_GETRES _IOR(MMTIMER_IOCTL_BASE, 1, unsigned long)
51#define MMTIMER_GETFREQ _IOR(MMTIMER_IOCTL_BASE, 2, unsigned long)
52#define MMTIMER_GETBITS _IO(MMTIMER_IOCTL_BASE, 4)
53#define MMTIMER_MMAPAVAIL _IO(MMTIMER_IOCTL_BASE, 6)
54#define MMTIMER_GETCOUNTER _IOR(MMTIMER_IOCTL_BASE, 9, unsigned long)
55
56#endif /* _LINUX_MMTIMER_H */