Commit 6cd8fa87 authored by Matthew Garrett's avatar Matthew Garrett Committed by Linus Torvalds

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: default avatarMatthew Garrett <mjg59@srcf.ucam.org>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 926b2898
...@@ -641,9 +641,16 @@ cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) ...@@ -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. * drivers can't provide shutdown() methods to disable IRQs.
* Or better yet, fix PNP to allow those methods... * Or better yet, fix PNP to allow those methods...
*/ */
return cmos_do_probe(&pnp->dev, if (pnp_port_start(pnp,0) == 0x70 && !pnp_irq_valid(pnp,0))
&pnp->res.port_resource[0], /* Some machines contain a PNP entry for the RTC, but
pnp->res.irq_resource[0].start); * 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) static void __exit cmos_pnp_remove(struct pnp_dev *pnp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment