aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300
diff options
context:
space:
mode:
Diffstat (limited to 'arch/h8300')
-rw-r--r--arch/h8300/include/asm/atomic.h2
-rw-r--r--arch/h8300/kernel/time.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h
index 33c8c0fa9583..e936804b7508 100644
--- a/arch/h8300/include/asm/atomic.h
+++ b/arch/h8300/include/asm/atomic.h
@@ -10,7 +10,7 @@
10 10
11#define ATOMIC_INIT(i) { (i) } 11#define ATOMIC_INIT(i) { (i) }
12 12
13#define atomic_read(v) ((v)->counter) 13#define atomic_read(v) (*(volatile int *)&(v)->counter)
14#define atomic_set(v, i) (((v)->counter) = i) 14#define atomic_set(v, i) (((v)->counter) = i)
15 15
16#include <asm/system.h> 16#include <asm/system.h>
diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c
index 7f2d6cfbb4b6..165005aff9df 100644
--- a/arch/h8300/kernel/time.c
+++ b/arch/h8300/kernel/time.c
@@ -41,7 +41,7 @@ void h8300_timer_tick(void)
41 update_process_times(user_mode(get_irq_regs())); 41 update_process_times(user_mode(get_irq_regs()));
42} 42}
43 43
44void __init time_init(void) 44void read_persistent_clock(struct timespec *ts)
45{ 45{
46 unsigned int year, mon, day, hour, min, sec; 46 unsigned int year, mon, day, hour, min, sec;
47 47
@@ -56,8 +56,12 @@ void __init time_init(void)
56#endif 56#endif
57 if ((year += 1900) < 1970) 57 if ((year += 1900) < 1970)
58 year += 100; 58 year += 100;
59 xtime.tv_sec = mktime(year, mon, day, hour, min, sec); 59 ts->tv_sec = mktime(year, mon, day, hour, min, sec);
60 xtime.tv_nsec = 0; 60 ts->tv_nsec = 0;
61}
62
63void __init time_init(void)
64{
61 65
62 h8300_timer_setup(); 66 h8300_timer_setup();
63} 67}