Root/
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 */ |
57 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9