aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-bfin.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-08-05 16:01:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-05 17:33:47 -0400
commit3b128fe04a3087d6e974b87402dc6e75d3142186 (patch)
treedcb06c4b0c5ba9fe893144bbcbba1321c0a88576 /drivers/rtc/rtc-bfin.c
parent605eb8b3c05e970caf71c48f693efe33c212fb7b (diff)
blackfin RTC driver: disable the write complete irq upon close
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Cc: David Brownell <david-b@pacbell.net> 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-bfin.c')
-rw-r--r--drivers/rtc/rtc-bfin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
index 56656dd6b2c1..d53772f59ce5 100644
--- a/drivers/rtc/rtc-bfin.c
+++ b/drivers/rtc/rtc-bfin.c
@@ -144,13 +144,13 @@ static void bfin_rtc_sync_pending(struct device *dev)
144 * Initialize the RTC. Enable pre-scaler to scale RTC clock 144 * Initialize the RTC. Enable pre-scaler to scale RTC clock
145 * to 1Hz and clear interrupt/status registers. 145 * to 1Hz and clear interrupt/status registers.
146 */ 146 */
147static void bfin_rtc_reset(struct device *dev) 147static void bfin_rtc_reset(struct device *dev, u16 rtc_ictl)
148{ 148{
149 struct bfin_rtc *rtc = dev_get_drvdata(dev); 149 struct bfin_rtc *rtc = dev_get_drvdata(dev);
150 dev_dbg_stamp(dev); 150 dev_dbg_stamp(dev);
151 bfin_rtc_sync_pending(dev); 151 bfin_rtc_sync_pending(dev);
152 bfin_write_RTC_PREN(0x1); 152 bfin_write_RTC_PREN(0x1);
153 bfin_write_RTC_ICTL(RTC_ISTAT_WRITE_COMPLETE); 153 bfin_write_RTC_ICTL(rtc_ictl);
154 bfin_write_RTC_SWCNT(0); 154 bfin_write_RTC_SWCNT(0);
155 bfin_write_RTC_ALARM(0); 155 bfin_write_RTC_ALARM(0);
156 bfin_write_RTC_ISTAT(0xFFFF); 156 bfin_write_RTC_ISTAT(0xFFFF);
@@ -226,7 +226,7 @@ static int bfin_rtc_open(struct device *dev)
226 226
227 ret = request_irq(IRQ_RTC, bfin_rtc_interrupt, IRQF_SHARED, to_platform_device(dev)->name, dev); 227 ret = request_irq(IRQ_RTC, bfin_rtc_interrupt, IRQF_SHARED, to_platform_device(dev)->name, dev);
228 if (!ret) 228 if (!ret)
229 bfin_rtc_reset(dev); 229 bfin_rtc_reset(dev, RTC_ISTAT_WRITE_COMPLETE);
230 230
231 return ret; 231 return ret;
232} 232}
@@ -234,7 +234,7 @@ static int bfin_rtc_open(struct device *dev)
234static void bfin_rtc_release(struct device *dev) 234static void bfin_rtc_release(struct device *dev)
235{ 235{
236 dev_dbg_stamp(dev); 236 dev_dbg_stamp(dev);
237 bfin_rtc_reset(dev); 237 bfin_rtc_reset(dev, 0);
238 free_irq(IRQ_RTC, dev); 238 free_irq(IRQ_RTC, dev);
239} 239}
240 240