diff options
author | Matthew Garrett <mjg59@srcf.ucam.org> | 2007-06-01 00:46:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-01 08:18:29 -0700 |
commit | 6cd8fa87fbf31b2ab77b8aaec497e7f6a3757578 (patch) | |
tree | 25a8ac89d09f7b8f2cd3e4a33068d309cfdbc76f | |
parent | 926b28984da035ac407e6b8f22ee8b4f94f51cf1 (diff) |
RTC: use fallback IRQ if PNP tables don't provide one
Intel Macs (and possibly other machines) provide a PNP entry for the RTC,
but provide no IRQ. As a result the rtc-cmos driver doesn't allow wakeup
alarms. If the RTC is located at the legacy ioport range, assume that it's
on IRQ 8 unless the tables say otherwise.
Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/rtc/rtc-cmos.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 6085261aa2c1..e24ea82dc35b 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -641,9 +641,16 @@ cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) * drivers can't provide shutdown() methods to disable IRQs. * Or better yet, fix PNP to allow those methods... */ - return cmos_do_probe(&pnp->dev, - &pnp->res.port_resource[0], - pnp->res.irq_resource[0].start); + if (pnp_port_start(pnp,0) == 0x70 && !pnp_irq_valid(pnp,0)) + /* Some machines contain a PNP entry for the RTC, but + * don't define the IRQ. It should always be safe to + * hardcode it in these cases + */ + return cmos_do_probe(&pnp->dev, &pnp->res.port_resource[0], 8); + else + return cmos_do_probe(&pnp->dev, + &pnp->res.port_resource[0], + pnp->res.irq_resource[0].start); } static void __exit cmos_pnp_remove(struct pnp_dev *pnp) |