code style scripts/checkpatch.pl (linux-3.9-rc1) formatting
[linux-2.6.32.60-moxart.git] / include / linux / mmtimer.h
blob884cabf16088e378f98ef757f403a34cd97b2544
1 /*
2 * Intel Multimedia Timer device interface
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.
8 * Copyright (c) 2001-2004 Silicon Graphics, Inc. All rights reserved.
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.
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
20 #ifndef _LINUX_MMTIMER_H
21 #define _LINUX_MMTIMER_H
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.
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.
32 * MMTIMER_GETRES - required
33 * The resolution of the clock in femto (10^-15) seconds
35 * MMTIMER_GETFREQ - required
36 * Frequency of the clock in Hz
38 * MMTIMER_GETBITS - required
39 * Number of bits in the clock's counter
41 * MMTIMER_MMAPAVAIL - required
42 * Returns nonzero if the registers can be mmap'd into userspace, 0 otherwise
44 * MMTIMER_GETCOUNTER - required
45 * Gets the current value in the counter
47 #define MMTIMER_IOCTL_BASE 'm'
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)
56 #endif /* _LINUX_MMTIMER_H */