aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-19 20:10:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-19 20:10:06 -0400
commit7d02093e29de9efc4a72d5e93baae9506969b789 (patch)
treea6fc2450132ae419934f6eb9d223baa338b7d782 /arch/cris/kernel
parent6e0b7b2c39b91b467270dd0bc383914f99e1fb28 (diff)
parente9ddbc075d95b2edf111247cdde16f33c31654a8 (diff)
Merge branch 'timers-for-linus-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: avr32: Fix typo in read_persistent_clock() sparc: Convert sparc to use read/update_persistent_clock cris: Convert cris to use read/update_persistent_clock m68k: Convert m68k to use read/update_persistent_clock m32r: Convert m32r to use read/update_peristent_clock blackfin: Convert blackfin to use read/update_persistent_clock ia64: Convert ia64 to use read/update_persistent_clock avr32: Convert avr32 to use read/update_persistent_clock h8300: Convert h8300 to use read/update_persistent_clock frv: Convert frv to use read/update_persistent_clock mn10300: Convert mn10300 to use read/update_persistent_clock alpha: Convert alpha to use read/update_persistent_clock xtensa: Fix unnecessary setting of xtime time: Clean up direct xtime usage in xen
Diffstat (limited to 'arch/cris/kernel')
-rw-r--r--arch/cris/kernel/time.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c
index a05dd31f3efb..c72730d20ef6 100644
--- a/arch/cris/kernel/time.c
+++ b/arch/cris/kernel/time.c
@@ -98,6 +98,8 @@ unsigned long
98get_cmos_time(void) 98get_cmos_time(void)
99{ 99{
100 unsigned int year, mon, day, hour, min, sec; 100 unsigned int year, mon, day, hour, min, sec;
101 if(!have_rtc)
102 return 0;
101 103
102 sec = CMOS_READ(RTC_SECONDS); 104 sec = CMOS_READ(RTC_SECONDS);
103 min = CMOS_READ(RTC_MINUTES); 105 min = CMOS_READ(RTC_MINUTES);
@@ -119,19 +121,19 @@ get_cmos_time(void)
119 return mktime(year, mon, day, hour, min, sec); 121 return mktime(year, mon, day, hour, min, sec);
120} 122}
121 123
122/* update xtime from the CMOS settings. used when /dev/rtc gets a SET_TIME.
123 * TODO: this doesn't reset the fancy NTP phase stuff as do_settimeofday does.
124 */
125 124
126void 125int update_persistent_clock(struct timespec now)
127update_xtime_from_cmos(void)
128{ 126{
129 if(have_rtc) { 127 return set_rtc_mmss(now.tv_sec);
130 xtime.tv_sec = get_cmos_time();
131 xtime.tv_nsec = 0;
132 }
133} 128}
134 129
130void read_persistent_clock(struct timespec *ts)
131{
132 ts->tv_sec = get_cmos_time();
133 ts->tv_nsec = 0;
134}
135
136
135extern void cris_profile_sample(struct pt_regs* regs); 137extern void cris_profile_sample(struct pt_regs* regs);
136 138
137void 139void