Commit 7f93b631 authored by Robert Picco's avatar Robert Picco Committed by Linus Torvalds

[PATCH] hpet fixes

Some hpet clean up and a fix to the RTC request_irq issue.
Signed-off-by: default avatarBob Picco <Robert.Picco@hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f02c3bc4
......@@ -155,9 +155,9 @@ int __init hpet_enable(void)
hd.hd_address = hpet_virt_address;
hd.hd_nirqs = ntimer;
hd.hd_flags = HPET_DATA_PLATFORM;
HD_STATE(&hd, 0);
hpet_reserve_timer(&hd, 0);
#ifdef CONFIG_HPET_EMULATE_RTC
HD_STATE(&hd, 1);
hpet_reserve_timer(&hd, 1);
#endif
hd.hd_irq[0] = HPET_LEGACY_8254;
hd.hd_irq[1] = HPET_LEGACY_RTC;
......
......@@ -971,8 +971,8 @@ config HPET
default n
depends on ACPI
help
If you say Y here, you will have a device named "/dev/hpet/XX" for
each timer supported by the HPET. The timers are
If you say Y here, you will have a miscdevice named "/dev/hpet/". Each
open selects one of the timers supported by the HPET. The timers are
non-periodioc and/or periodic.
config HPET_RTC_IRQ
......
......@@ -99,7 +99,6 @@ static int rtc_irq = PCI_IRQ_NONE;
#ifdef CONFIG_HPET_RTC_IRQ
#undef RTC_IRQ
#define RTC_IRQ 0
#endif
#ifdef RTC_IRQ
......
......@@ -54,12 +54,6 @@ struct hpet {
#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
......@@ -115,8 +109,6 @@ struct hpet_task {
void *ht_opaque;
};
#define HD_STATE(HD, TIMER) (HD)->hd_state |= (1 << TIMER)
struct hpet_data {
unsigned long hd_address;
unsigned short hd_nirqs;
......@@ -127,6 +119,12 @@ struct hpet_data {
#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 *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment