Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210442
b: refs/heads/master
c: b6de860
h: refs/heads/master
v: v3
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Sep 10, 2010
1 parent a17885e commit 2216103
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 110b7e9698601b28f313c2c560d51a8b1c742002
refs/heads/master: b6de860651d5a9e56ba4f4e3edc1aa52ac2ac849
13 changes: 11 additions & 2 deletions trunk/drivers/rtc/rtc-bfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,17 @@ static int bfin_rtc_resume(struct platform_device *pdev)
{
if (device_may_wakeup(&pdev->dev))
disable_irq_wake(IRQ_RTC);
else
bfin_write_RTC_ISTAT(-1);

/*
* Since only some of the RTC bits are maintained externally in the
* Vbat domain, we need to wait for the RTC MMRs to be synced into
* the core after waking up. This happens every RTC 1HZ. Once that
* has happened, we can go ahead and re-enable the important write
* complete interrupt event.
*/
while (!(bfin_read_RTC_ISTAT() & RTC_ISTAT_SEC))
continue;
bfin_rtc_int_set(RTC_ISTAT_WRITE_COMPLETE);

return 0;
}
Expand Down

0 comments on commit 2216103

Please sign in to comment.