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
8 * Copyright (c) 2001-2003 Silicon Graphics, Inc. All rights reserved.
10 * Helper file for the SN implementation of mmtimers
12 * 11/01/01 - jbarnes - initial revision
15 #ifndef _SN_MMTIMER_PRIVATE_H
17 #define RTC_BITS 55 /* 55 bits for this implementation */
18 #define NUM_COMPARATORS 2 /* two comparison registers in SN1 */
21 * Check for an interrupt and clear the pending bit if
24 #define MMTIMER_INT_PENDING(x) (x ? *(RTC_INT_PENDING_B_ADDR) : *(RTC_INT_PENDING_A_ADDR))
27 * Set interrupts on RTC 'x' to 'v' (true or false)
29 #define MMTIMER_SET_INT(x,v) (x ? (*(RTC_INT_ENABLED_B_ADDR) = (unsigned long)(v)) : (*(RTC_INT_ENABLED_A_ADDR) = (unsigned long)(v)))
31 #define MMTIMER_ENABLE_INT(x) MMTIMER_SET_INT(x, 1)
32 #define MMTIMER_DISABLE_INT(x) MMTIMER_SET_INT(x, 0)
34 typedef struct mmtimer {
35 spinlock_t timer_lock;
36 unsigned long periodic;
38 volatile unsigned long *compare;
39 struct task_struct *process;
42 #endif /* _SN_LINUX_MMTIMER_PRIVATE_H */