diff options
author | Matthew Garrett <mjg59@srcf.ucam.org> | 2007-06-01 03:46:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-01 11:18:29 -0400 |
commit | 6cd8fa87fbf31b2ab77b8aaec497e7f6a3757578 (patch) | |
tree | 25a8ac89d09f7b8f2cd3e4a33068d309cfdbc76f /drivers/rtc/rtc-cmos.c | |
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>
Diffstat (limited to 'drivers/rtc/rtc-cmos.c')
-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) | |||
641 | * drivers can't provide shutdown() methods to disable IRQs. | 641 | * drivers can't provide shutdown() methods to disable IRQs. |
642 | * Or better yet, fix PNP to allow those methods... | 642 | * Or better yet, fix PNP to allow those methods... |
643 | */ | 643 | */ |
644 | return cmos_do_probe(&pnp->dev, | 644 | if (pnp_port_start(pnp,0) == 0x70 && !pnp_irq_valid(pnp,0)) |
645 | &pnp->res.port_resource[0], | 645 | /* Some machines contain a PNP entry for the RTC, but |
646 | pnp->res.irq_resource[0].start); | 646 | * don't define the IRQ. It should always be safe to |
647 | * hardcode it in these cases | ||
648 | */ | ||
649 | return cmos_do_probe(&pnp->dev, &pnp->res.port_resource[0], 8); | ||
650 | else | ||
651 | return cmos_do_probe(&pnp->dev, | ||
652 | &pnp->res.port_resource[0], | ||
653 | pnp->res.irq_resource[0].start); | ||
647 | } | 654 | } |
648 | 655 | ||
649 | static void __exit cmos_pnp_remove(struct pnp_dev *pnp) | 656 | static void __exit cmos_pnp_remove(struct pnp_dev *pnp) |