#ifndef __HPET__
#define __HPET__ 1
+#include <linux/compiler.h>
+
/*
* Offsets into HPET Registers
*/
#define HPET_LEG_RT_CNF_MASK (2UL)
#define HPET_ENABLE_CNF_MASK (1UL)
-/*
- * HPET interrupt status register
- */
-
-#define HPET_ISR_CLEAR(HPET, TIMER) \
- (HPET)->hpet_isr |= (1UL << TIMER)
/*
* Timer configuration register
};
struct hpet_data {
- unsigned long hd_address;
+ void __iomem *hd_address;
unsigned short hd_nirqs;
unsigned short hd_flags;
unsigned int hd_state; /* timer allocated */
#define HPET_DATA_PLATFORM 0x0001 /* platform call to hpet_alloc */
+static inline void hpet_reserve_timer(struct hpet_data *hd, int timer)
+{
+ hd->hd_state |= (1 << timer);
+ return;
+}
+
int hpet_alloc(struct hpet_data *);
int hpet_register(struct hpet_task *, int);
int hpet_unregister(struct hpet_task *);