|
@@ -465,6 +465,21 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp)
|
|
if (irq) {
|
|
if (irq) {
|
|
unsigned long irq_flags;
|
|
unsigned long irq_flags;
|
|
|
|
|
|
|
|
+ if (devp->hd_flags & HPET_SHARED_IRQ) {
|
|
|
|
+ /*
|
|
|
|
+ * To prevent the interrupt handler from seeing an
|
|
|
|
+ * unwanted interrupt status bit, program the timer
|
|
|
|
+ * so that it will not fire in the near future ...
|
|
|
|
+ */
|
|
|
|
+ writel(readl(&timer->hpet_config) & ~Tn_TYPE_CNF_MASK,
|
|
|
|
+ &timer->hpet_config);
|
|
|
|
+ write_counter(read_counter(&hpet->hpet_mc),
|
|
|
|
+ &timer->hpet_compare);
|
|
|
|
+ /* ... and clear any left-over status. */
|
|
|
|
+ isr = 1 << (devp - devp->hd_hpets->hp_dev);
|
|
|
|
+ writel(isr, &hpet->hpet_isr);
|
|
|
|
+ }
|
|
|
|
+
|
|
sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev));
|
|
sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev));
|
|
irq_flags = devp->hd_flags & HPET_SHARED_IRQ
|
|
irq_flags = devp->hd_flags & HPET_SHARED_IRQ
|
|
? IRQF_SHARED : IRQF_DISABLED;
|
|
? IRQF_SHARED : IRQF_DISABLED;
|