aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/Kconfig2
-rw-r--r--drivers/rtc/rtc-at91sam9.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 82f5ad9c3af4..9e7de63b26ef 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -16,7 +16,7 @@ menuconfig RTC_CLASS
16 probably want to enable one or more of the interfaces below. 16 probably want to enable one or more of the interfaces below.
17 17
18 This driver can also be built as a module. If so, the module 18 This driver can also be built as a module. If so, the module
19 will be called rtc-class. 19 will be called rtc-core.
20 20
21if RTC_CLASS 21if RTC_CLASS
22 22
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)
274 * SR clears it, so we must only read it in this irq handler! 274 * SR clears it, so we must only read it in this irq handler!
275 */ 275 */
276 mr = rtt_readl(rtc, MR) & (AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN); 276 mr = rtt_readl(rtc, MR) & (AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN);
277 sr = rtt_readl(rtc, SR) & mr; 277 sr = rtt_readl(rtc, SR) & (mr >> 16);
278 if (!sr) 278 if (!sr)
279 return IRQ_NONE; 279 return IRQ_NONE;
280 280
@@ -321,6 +321,10 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
321 if (!rtc) 321 if (!rtc)
322 return -ENOMEM; 322 return -ENOMEM;
323 323
324 /* platform setup code should have handled this; sigh */
325 if (!device_can_wakeup(&pdev->dev))
326 device_init_wakeup(&pdev->dev, 1);
327
324 platform_set_drvdata(pdev, rtc); 328 platform_set_drvdata(pdev, rtc);
325 rtc->rtt = (void __force __iomem *) (AT91_VA_BASE_SYS - AT91_BASE_SYS); 329 rtc->rtt = (void __force __iomem *) (AT91_VA_BASE_SYS - AT91_BASE_SYS);
326 rtc->rtt += r->start; 330 rtc->rtt += r->start;