diff options
author | David Brownell <david-b@pacbell.net> | 2008-03-20 03:01:09 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-20 04:53:37 +0300 |
commit | 9fedc9f1b18f6b931c3b695d7280f17fc308309b (patch) | |
tree | 17c5ed06d8ac23e5bf14111d8d28aa662a83879c /drivers/rtc/rtc-at91sam9.c | |
parent | 3150e63df41450a795bbd0bd98a8e70da74e0285 (diff) | |
download | linux-9fedc9f1b18f6b931c3b695d7280f17fc308309b.tar.xz |
rtc-at91sam9 fixes
Updates to the at91sam9 rtt-as-rtc driver:
- Bugfix: IRQ enable bits need shifting before masking with status
- Platform code to initialize wakeup bits didn't get merged; cope
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Justin Waters <justin.waters@timesys.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-at91sam9.c')
-rw-r--r-- | drivers/rtc/rtc-at91sam9.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c index bbf10ecf416c..56728a2a3385 100644 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c @@ -274,7 +274,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *_rtc) * SR clears it, so we must only read it in this irq handler! */ mr = rtt_readl(rtc, MR) & (AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN); - sr = rtt_readl(rtc, SR) & mr; + sr = rtt_readl(rtc, SR) & (mr >> 16); if (!sr) return IRQ_NONE; @@ -321,6 +321,10 @@ static int __init at91_rtc_probe(struct platform_device *pdev) if (!rtc) return -ENOMEM; + /* platform setup code should have handled this; sigh */ + if (!device_can_wakeup(&pdev->dev)) + device_init_wakeup(&pdev->dev, 1); + platform_set_drvdata(pdev, rtc); rtc->rtt = (void __force __iomem *) (AT91_VA_BASE_SYS - AT91_BASE_SYS); rtc->rtt += r->start; |