summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-06 19:45:33 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-06 19:45:33 +0000
commit84ea3f25300aa70d00093c64a5d6301fcde572a9 (patch)
tree09a45dd93997be14d96279d7f0e2e11eea7254e5
parentb5886beb816b15b3ca99c862897a8c8b11b087f6 (diff)
downloadrockbox-84ea3f25300aa70d00093c64a5d6301fcde572a9.tar.gz
rockbox-84ea3f25300aa70d00093c64a5d6301fcde572a9.tar.bz2
rockbox-84ea3f25300aa70d00093c64a5d6301fcde572a9.zip
Ingenic Jz4740: add a delay between enabling the RTC clock and setting the RTC time
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20862 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/rtc/rtc_jz4740.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/drivers/rtc/rtc_jz4740.c b/firmware/drivers/rtc/rtc_jz4740.c
index 61ee0e0c7b..479e3591db 100644
--- a/firmware/drivers/rtc/rtc_jz4740.c
+++ b/firmware/drivers/rtc/rtc_jz4740.c
@@ -162,7 +162,9 @@ int rtc_write_datetime(unsigned char* buf)
lval = jz_mktime(year, rtc_tm->tm_mon, rtc_tm->tm_mday, rtc_tm->tm_hour,
rtc_tm->tm_min, rtc_tm->tm_sec);
+
__cpm_start_rtc();
+ udelay(100);
REG_RTC_RSR = lval;
__cpm_stop_rtc();