summaryrefslogtreecommitdiff
path: root/rtc
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-09-13 19:01:12 +0000
committerwdenk <wdenk>2003-09-13 19:01:12 +0000
commit531716e1710083f91d9fa351f89d18e271b5c577 (patch)
treeb16f8f3683078ee64ac2b87c2f3c1c37c60f9a93 /rtc
parentb70e7a00c8bc6feb5f5718ba1c6d4fedb294483a (diff)
* Patch by David Müller, 13 Sep 2003:LABEL_2003_09_13_2100
various changes to VCMA9 board specific files * Add I2C support for MGT5100 / MPC5200
Diffstat (limited to 'rtc')
-rw-r--r--rtc/s3c24x0_rtc.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/rtc/s3c24x0_rtc.c b/rtc/s3c24x0_rtc.c
index bf8008d8da5..9e2191e873c 100644
--- a/rtc/s3c24x0_rtc.c
+++ b/rtc/s3c24x0_rtc.c
@@ -80,13 +80,15 @@ void rtc_get (struct rtc_time *tmp)
SetRTC_Access(RTC_ENABLE);
/* read RTC registers */
- sec = rtc->BCDSEC;
- min = rtc->BCDMIN;
- hour = rtc->BCDHOUR;
- mday = rtc->BCDDATE;
- wday = rtc->BCDDAY;
- mon = rtc->BCDMON;
- year = rtc->BCDYEAR;
+ do {
+ sec = rtc->BCDSEC;
+ min = rtc->BCDMIN;
+ hour = rtc->BCDHOUR;
+ mday = rtc->BCDDATE;
+ wday = rtc->BCDDAY;
+ mon = rtc->BCDMON;
+ year = rtc->BCDYEAR;
+ } while (sec != rtc->BCDSEC);
/* read ALARM registers */
a_sec = rtc->ALMSEC;
@@ -170,7 +172,7 @@ void rtc_reset (void)
S3C24X0_RTC * const rtc = S3C24X0_GetBase_RTC();
rtc->RTCCON = (rtc->RTCCON & ~0x06) | 0x08;
- rtc->RTCCON &= ~0x08;
+ rtc->RTCCON &= ~(0x08|0x01);
}
/* ------------------------------------------------------------------------- */