aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r--drivers/char/hpet.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 84e6a7e673b7..a2cbb828e92a 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -465,6 +465,21 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp)
465 if (irq) { 465 if (irq) {
466 unsigned long irq_flags; 466 unsigned long irq_flags;
467 467
468 if (devp->hd_flags & HPET_SHARED_IRQ) {
469 /*
470 * To prevent the interrupt handler from seeing an
471 * unwanted interrupt status bit, program the timer
472 * so that it will not fire in the near future ...
473 */
474 writel(readl(&timer->hpet_config) & ~Tn_TYPE_CNF_MASK,
475 &timer->hpet_config);
476 write_counter(read_counter(&hpet->hpet_mc),
477 &timer->hpet_compare);
478 /* ... and clear any left-over status. */
479 isr = 1 << (devp - devp->hd_hpets->hp_dev);
480 writel(isr, &hpet->hpet_isr);
481 }
482
468 sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); 483 sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev));
469 irq_flags = devp->hd_flags & HPET_SHARED_IRQ 484 irq_flags = devp->hd_flags & HPET_SHARED_IRQ
470 ? IRQF_SHARED : IRQF_DISABLED; 485 ? IRQF_SHARED : IRQF_DISABLED;