summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@stericsson.com>2009-11-14 03:03:24 +0300
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-11-16 19:15:49 +0300
commit378ce74bee4cb0183489bc0f850790a2264ca975 (patch)
treed1999328c0a7ebabf49b0f25909779fa9e7e5966 /drivers/rtc
parent927585f650b51639f0262dad650eafeaf1611197 (diff)
downloadlinux-378ce74bee4cb0183489bc0f850790a2264ca975.tar.xz
ARM: 5787/1: U300 COH 901 331 fixes
This will fix some small issues with the COH 901 331 RTC driver: - Interrupt is disabled after alarm so that we don't fire multiple interrupts. - We return 0 from the coh901331_alarm_irq_enable() ridding a compile warning. - We alter the name in the U300 device registry to match that of the driver so they sucessfully resolve. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/rtc')
-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 = {