diff options
| author | Joel Becker <joel.becker@oracle.com> | 2010-10-15 16:03:09 -0400 |
|---|---|---|
| committer | Joel Becker <joel.becker@oracle.com> | 2010-10-15 16:03:09 -0400 |
| commit | fc3718918f13ad72827d62d36ea0f5fb55090644 (patch) | |
| tree | 4f9551256e02d08be37bab137f3d94182a67504c /drivers/rtc/rtc-bfin.c | |
| parent | 7bdb0d18bfd381cc5491eb95973ec5604b356c7e (diff) | |
| parent | d4396eafe402b710a8535137b3bf2abe6c059a15 (diff) | |
Merge branch 'globalheartbeat-2' of git://oss.oracle.com/git/smushran/linux-2.6 into ocfs2-merge-window
Conflicts:
fs/ocfs2/ocfs2.h
Diffstat (limited to 'drivers/rtc/rtc-bfin.c')
| -rw-r--r-- | drivers/rtc/rtc-bfin.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index 72b2bcc2c224..d4fb82d85e9b 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c | |||
| @@ -426,7 +426,7 @@ static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state) | |||
| 426 | enable_irq_wake(IRQ_RTC); | 426 | enable_irq_wake(IRQ_RTC); |
| 427 | bfin_rtc_sync_pending(&pdev->dev); | 427 | bfin_rtc_sync_pending(&pdev->dev); |
| 428 | } else | 428 | } else |
| 429 | bfin_rtc_int_clear(-1); | 429 | bfin_rtc_int_clear(0); |
| 430 | 430 | ||
| 431 | return 0; | 431 | return 0; |
| 432 | } | 432 | } |
| @@ -435,8 +435,17 @@ static int bfin_rtc_resume(struct platform_device *pdev) | |||
| 435 | { | 435 | { |
| 436 | if (device_may_wakeup(&pdev->dev)) | 436 | if (device_may_wakeup(&pdev->dev)) |
| 437 | disable_irq_wake(IRQ_RTC); | 437 | disable_irq_wake(IRQ_RTC); |
| 438 | else | 438 | |
| 439 | bfin_write_RTC_ISTAT(-1); | 439 | /* |
| 440 | * Since only some of the RTC bits are maintained externally in the | ||
| 441 | * Vbat domain, we need to wait for the RTC MMRs to be synced into | ||
| 442 | * the core after waking up. This happens every RTC 1HZ. Once that | ||
| 443 | * has happened, we can go ahead and re-enable the important write | ||
| 444 | * complete interrupt event. | ||
| 445 | */ | ||
| 446 | while (!(bfin_read_RTC_ISTAT() & RTC_ISTAT_SEC)) | ||
| 447 | continue; | ||
| 448 | bfin_rtc_int_set(RTC_ISTAT_WRITE_COMPLETE); | ||
| 440 | 449 | ||
| 441 | return 0; | 450 | return 0; |
| 442 | } | 451 | } |
