aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-coh901331.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-04 16:22:32 +0100
committerTakashi Iwai <tiwai@suse.de>2009-12-04 16:22:32 +0100
commit79598324838a25cc378ecbb8c29dd1e3d3951d35 (patch)
tree7d29e81580cba854042df4e33bdc8f38bbd65d03 /drivers/rtc/rtc-coh901331.c
parentALSA: AACI: fix recording bug (diff)
parentMerge branch 'topic/pcm-dma-fix' into topic/core-change (diff)
downloadlinux-dev-79598324838a25cc378ecbb8c29dd1e3d3951d35.tar.xz
linux-dev-79598324838a25cc378ecbb8c29dd1e3d3951d35.zip
Merge branch 'topic/core-change' into for-linus
Diffstat (limited to 'drivers/rtc/rtc-coh901331.c')
-rw-r--r--drivers/rtc/rtc-coh901331.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c
index 7fe1fa26c52c..03ea530981d1 100644
--- a/drivers/rtc/rtc-coh901331.c
+++ b/drivers/rtc/rtc-coh901331.c
@@ -58,7 +58,16 @@ static irqreturn_t coh901331_interrupt(int irq, void *data)
clk_enable(rtap->clk);
/* Ack IRQ */
writel(1, rtap->virtbase + COH901331_IRQ_EVENT);
+ /*
+ * Disable the interrupt. This is necessary because
+ * the RTC lives on a lower-clocked line and will
+ * not release the IRQ line until after a few (slower)
+ * clock cycles. The interrupt will be re-enabled when
+ * a new alarm is set anyway.
+ */
+ writel(0, rtap->virtbase + COH901331_IRQ_MASK);
clk_disable(rtap->clk);
+
/* Set alarm flag */
rtc_update_irq(rtap->rtc, 1, RTC_AF);
@@ -128,6 +137,8 @@ static int coh901331_alarm_irq_enable(struct device *dev, unsigned int enabled)
else
writel(0, rtap->virtbase + COH901331_IRQ_MASK);
clk_disable(rtap->clk);
+
+ return 0;
}
static struct rtc_class_ops coh901331_ops = {