diff options
Diffstat (limited to 'arch/mips/pmc-sierra/yosemite/setup.c')
-rw-r--r-- | arch/mips/pmc-sierra/yosemite/setup.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c index 58862c8d1d00..56bf69595da8 100644 --- a/arch/mips/pmc-sierra/yosemite/setup.c +++ b/arch/mips/pmc-sierra/yosemite/setup.c | |||
@@ -70,7 +70,7 @@ void __init bus_error_init(void) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | 72 | ||
73 | unsigned long m48t37y_get_time(void) | 73 | unsigned long read_persistent_clock(void) |
74 | { | 74 | { |
75 | unsigned int year, month, day, hour, min, sec; | 75 | unsigned int year, month, day, hour, min, sec; |
76 | unsigned long flags; | 76 | unsigned long flags; |
@@ -95,7 +95,7 @@ unsigned long m48t37y_get_time(void) | |||
95 | return mktime(year, month, day, hour, min, sec); | 95 | return mktime(year, month, day, hour, min, sec); |
96 | } | 96 | } |
97 | 97 | ||
98 | int m48t37y_set_time(unsigned long sec) | 98 | int rtc_mips_set_time(unsigned long tim) |
99 | { | 99 | { |
100 | struct rtc_time tm; | 100 | struct rtc_time tm; |
101 | unsigned long flags; | 101 | unsigned long flags; |
@@ -138,7 +138,7 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
138 | setup_irq(7, irq); | 138 | setup_irq(7, irq); |
139 | } | 139 | } |
140 | 140 | ||
141 | void yosemite_time_init(void) | 141 | void __init plat_time_init(void) |
142 | { | 142 | { |
143 | mips_hpt_frequency = cpu_clock_freq / 2; | 143 | mips_hpt_frequency = cpu_clock_freq / 2; |
144 | mips_hpt_frequency = 33000000 * 3 * 5; | 144 | mips_hpt_frequency = 33000000 * 3 * 5; |
@@ -198,17 +198,6 @@ static void __init py_rtc_setup(void) | |||
198 | m48t37_base = ioremap(YOSEMITE_RTC_BASE, YOSEMITE_RTC_SIZE); | 198 | m48t37_base = ioremap(YOSEMITE_RTC_BASE, YOSEMITE_RTC_SIZE); |
199 | if (!m48t37_base) | 199 | if (!m48t37_base) |
200 | printk(KERN_ERR "Mapping the RTC failed\n"); | 200 | printk(KERN_ERR "Mapping the RTC failed\n"); |
201 | |||
202 | rtc_mips_get_time = m48t37y_get_time; | ||
203 | rtc_mips_set_time = m48t37y_set_time; | ||
204 | |||
205 | write_seqlock(&xtime_lock); | ||
206 | xtime.tv_sec = m48t37y_get_time(); | ||
207 | xtime.tv_nsec = 0; | ||
208 | |||
209 | set_normalized_timespec(&wall_to_monotonic, | ||
210 | -xtime.tv_sec, -xtime.tv_nsec); | ||
211 | write_sequnlock(&xtime_lock); | ||
212 | } | 201 | } |
213 | 202 | ||
214 | /* Not only time init but that's what the hook it's called through is named */ | 203 | /* Not only time init but that's what the hook it's called through is named */ |
@@ -221,7 +210,6 @@ static void __init py_late_time_init(void) | |||
221 | 210 | ||
222 | void __init plat_mem_setup(void) | 211 | void __init plat_mem_setup(void) |
223 | { | 212 | { |
224 | board_time_init = yosemite_time_init; | ||
225 | late_time_init = py_late_time_init; | 213 | late_time_init = py_late_time_init; |
226 | 214 | ||
227 | /* Add memory regions */ | 215 | /* Add memory regions */ |