Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146722
b: refs/heads/master
c: 6d134b9
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed May 8, 2009
1 parent 1dd9d96 commit 7a2f6b1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b179b72fad5c88c3b616fb88a9ae7cbbc1a750d3
refs/heads/master: 6d134b9e8d3f32331ad2faca2db8186f54198931
4 changes: 4 additions & 0 deletions trunk/arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ config GENERIC_CLOCKEVENTS
config GENERIC_CLOCKEVENTS_BROADCAST
bool

config GENERIC_CMOS_UPDATE
def_bool y
depends on SH_SH03 || SH_DREAMCAST

config GENERIC_LOCKBREAK
def_bool y
depends on SMP && PREEMPT
Expand Down
14 changes: 14 additions & 0 deletions trunk/arch/sh/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ static int null_rtc_set_time(const time_t secs)
void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time;
int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time;

#ifdef CONFIG_GENERIC_CMOS_UPDATE
unsigned long read_persistent_clock(void)
{
struct timespec tv;
rtc_sh_get_time(&tv);
return tv.tv_sec;
}

int update_persistent_clock(struct timespec now)
{
return rtc_sh_set_time(now.tv_sec);
}
#endif

unsigned int get_rtc_time(struct rtc_time *tm)
{
if (rtc_sh_get_time != null_rtc_get_time) {
Expand Down

0 comments on commit 7a2f6b1

Please sign in to comment.