diff options
Diffstat (limited to 'arch/mips/dec/time.c')
-rw-r--r-- | arch/mips/dec/time.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/mips/dec/time.c b/arch/mips/dec/time.c index 8b7e0c17ac35..820e5331205f 100644 --- a/arch/mips/dec/time.c +++ b/arch/mips/dec/time.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <asm/bootinfo.h> | 25 | #include <asm/bootinfo.h> |
26 | #include <asm/cpu.h> | 26 | #include <asm/cpu.h> |
27 | #include <asm/div64.h> | ||
28 | #include <asm/io.h> | 27 | #include <asm/io.h> |
29 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
30 | #include <asm/mipsregs.h> | 29 | #include <asm/mipsregs.h> |
@@ -36,7 +35,7 @@ | |||
36 | #include <asm/dec/ioasic_addrs.h> | 35 | #include <asm/dec/ioasic_addrs.h> |
37 | #include <asm/dec/machtype.h> | 36 | #include <asm/dec/machtype.h> |
38 | 37 | ||
39 | static unsigned long dec_rtc_get_time(void) | 38 | unsigned long read_persistent_clock(void) |
40 | { | 39 | { |
41 | unsigned int year, mon, day, hour, min, sec, real_year; | 40 | unsigned int year, mon, day, hour, min, sec, real_year; |
42 | unsigned long flags; | 41 | unsigned long flags; |
@@ -75,13 +74,13 @@ static unsigned long dec_rtc_get_time(void) | |||
75 | } | 74 | } |
76 | 75 | ||
77 | /* | 76 | /* |
78 | * In order to set the CMOS clock precisely, dec_rtc_set_mmss has to | 77 | * In order to set the CMOS clock precisely, rtc_mips_set_mmss has to |
79 | * be called 500 ms after the second nowtime has started, because when | 78 | * be called 500 ms after the second nowtime has started, because when |
80 | * nowtime is written into the registers of the CMOS clock, it will | 79 | * nowtime is written into the registers of the CMOS clock, it will |
81 | * jump to the next second precisely 500 ms later. Check the Dallas | 80 | * jump to the next second precisely 500 ms later. Check the Dallas |
82 | * DS1287 data sheet for details. | 81 | * DS1287 data sheet for details. |
83 | */ | 82 | */ |
84 | static int dec_rtc_set_mmss(unsigned long nowtime) | 83 | int rtc_mips_set_mmss(unsigned long nowtime) |
85 | { | 84 | { |
86 | int retval = 0; | 85 | int retval = 0; |
87 | int real_seconds, real_minutes, cmos_minutes; | 86 | int real_seconds, real_minutes, cmos_minutes; |
@@ -140,7 +139,6 @@ static int dec_rtc_set_mmss(unsigned long nowtime) | |||
140 | return retval; | 139 | return retval; |
141 | } | 140 | } |
142 | 141 | ||
143 | |||
144 | static int dec_timer_state(void) | 142 | static int dec_timer_state(void) |
145 | { | 143 | { |
146 | return (CMOS_READ(RTC_REG_C) & RTC_PF) != 0; | 144 | return (CMOS_READ(RTC_REG_C) & RTC_PF) != 0; |
@@ -161,11 +159,8 @@ static cycle_t dec_ioasic_hpt_read(void) | |||
161 | } | 159 | } |
162 | 160 | ||
163 | 161 | ||
164 | void __init dec_time_init(void) | 162 | void __init plat_time_init(void) |
165 | { | 163 | { |
166 | rtc_mips_get_time = dec_rtc_get_time; | ||
167 | rtc_mips_set_mmss = dec_rtc_set_mmss; | ||
168 | |||
169 | mips_timer_state = dec_timer_state; | 164 | mips_timer_state = dec_timer_state; |
170 | mips_timer_ack = dec_timer_ack; | 165 | mips_timer_ack = dec_timer_ack; |
171 | 166 | ||