brintos

brintos / linux-shallow public Read only

0
0
Text · 2.1 KiB · 409fae1 Raw
58 lines · c
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */2/*3 * Intel Multimedia Timer device interface4 *5 * This file is subject to the terms and conditions of the GNU General Public6 * License.  See the file "COPYING" in the main directory of this archive7 * for more details.8 *9 * Copyright (c) 2001-2004 Silicon Graphics, Inc.  All rights reserved.10 *11 * This file should define an interface compatible with the IA-PC Multimedia12 * Timers Draft Specification (rev. 0.97) from Intel.  Note that some13 * hardware may not be able to safely export its registers to userspace,14 * so the ioctl interface should support all necessary functionality.15 *16 * 11/01/01 - jbarnes - initial revision17 * 9/10/04 - Christoph Lameter - remove interrupt support18 * 9/17/04 - jbarnes - remove test program, move some #defines to the driver19 */20 21#ifndef _LINUX_MMTIMER_H22#define _LINUX_MMTIMER_H23 24/*25 * Breakdown of the ioctl's available.  An 'optional' next to the command26 * indicates that supporting this command is optional, while 'required'27 * commands must be implemented if conformance is desired.28 *29 * MMTIMER_GETOFFSET - optional30 *   Should return the offset (relative to the start of the page where the31 *   registers are mapped) for the counter in question.32 *33 * MMTIMER_GETRES - required34 *   The resolution of the clock in femto (10^-15) seconds35 *36 * MMTIMER_GETFREQ - required37 *   Frequency of the clock in Hz38 *39 * MMTIMER_GETBITS - required40 *   Number of bits in the clock's counter41 *42 * MMTIMER_MMAPAVAIL - required43 *   Returns nonzero if the registers can be mmap'd into userspace, 0 otherwise44 *45 * MMTIMER_GETCOUNTER - required46 *   Gets the current value in the counter47 */48#define MMTIMER_IOCTL_BASE 'm'49 50#define MMTIMER_GETOFFSET _IO(MMTIMER_IOCTL_BASE, 0)51#define MMTIMER_GETRES _IOR(MMTIMER_IOCTL_BASE, 1, unsigned long)52#define MMTIMER_GETFREQ _IOR(MMTIMER_IOCTL_BASE, 2, unsigned long)53#define MMTIMER_GETBITS _IO(MMTIMER_IOCTL_BASE, 4)54#define MMTIMER_MMAPAVAIL _IO(MMTIMER_IOCTL_BASE, 6)55#define MMTIMER_GETCOUNTER _IOR(MMTIMER_IOCTL_BASE, 9, unsigned long)56 57#endif /* _LINUX_MMTIMER_H */58