diff options
author | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-18 17:06:00 -0400 |
---|---|---|
committer | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-18 17:06:00 -0400 |
commit | a215aa7b9ab3759c047201199fba64d3042d7f13 (patch) | |
tree | bca37493d9b2233450e6d3ffced1261d0e4f71fe /drivers/char/hpet.c | |
parent | d31199a77ef606f1d06894385f1852181ba6136b (diff) |
Update 2.6.36 to 2.6.36.4wip-dissipation2-jerickso
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r-- | drivers/char/hpet.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index a0a1829d3198..f8e7d89ceb2c 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -479,6 +479,21 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp) | |||
479 | if (irq) { | 479 | if (irq) { |
480 | unsigned long irq_flags; | 480 | unsigned long irq_flags; |
481 | 481 | ||
482 | if (devp->hd_flags & HPET_SHARED_IRQ) { | ||
483 | /* | ||
484 | * To prevent the interrupt handler from seeing an | ||
485 | * unwanted interrupt status bit, program the timer | ||
486 | * so that it will not fire in the near future ... | ||
487 | */ | ||
488 | writel(readl(&timer->hpet_config) & ~Tn_TYPE_CNF_MASK, | ||
489 | &timer->hpet_config); | ||
490 | write_counter(read_counter(&hpet->hpet_mc), | ||
491 | &timer->hpet_compare); | ||
492 | /* ... and clear any left-over status. */ | ||
493 | isr = 1 << (devp - devp->hd_hpets->hp_dev); | ||
494 | writel(isr, &hpet->hpet_isr); | ||
495 | } | ||
496 | |||
482 | sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); | 497 | sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); |
483 | irq_flags = devp->hd_flags & HPET_SHARED_IRQ | 498 | irq_flags = devp->hd_flags & HPET_SHARED_IRQ |
484 | ? IRQF_SHARED : IRQF_DISABLED; | 499 | ? IRQF_SHARED : IRQF_DISABLED; |
@@ -970,6 +985,8 @@ static int hpet_acpi_add(struct acpi_device *device) | |||
970 | return -ENODEV; | 985 | return -ENODEV; |
971 | 986 | ||
972 | if (!data.hd_address || !data.hd_nirqs) { | 987 | if (!data.hd_address || !data.hd_nirqs) { |
988 | if (data.hd_address) | ||
989 | iounmap(data.hd_address); | ||
973 | printk("%s: no address or irqs in _CRS\n", __func__); | 990 | printk("%s: no address or irqs in _CRS\n", __func__); |
974 | return -ENODEV; | 991 | return -ENODEV; |
975 | } | 992 | } |