aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi-ip22/ip22-time.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-10-11 18:46:08 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-10-11 18:46:08 -0400
commit4b550488f894c899aa54dc935c8fee47bca2b7df (patch)
treef7ee1d0ff80542124b5fa864a30022277d703c49 /arch/mips/sgi-ip22/ip22-time.c
parentf5ff0a280201c9cbfb6e9eb4bafdb465c2269ed3 (diff)
[MIPS] Deforest the function pointer jungle in the time code.
Hard to follow who is pointing what to where and why so it's simply getting in the way of the time code renovation. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sgi-ip22/ip22-time.c')
-rw-r--r--arch/mips/sgi-ip22/ip22-time.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c
index de3d01823ad5..0387c385b4b2 100644
--- a/arch/mips/sgi-ip22/ip22-time.c
+++ b/arch/mips/sgi-ip22/ip22-time.c
@@ -32,7 +32,7 @@
32 * note that mktime uses month from 1 to 12 while to_tm 32 * note that mktime uses month from 1 to 12 while to_tm
33 * uses 0 to 11. 33 * uses 0 to 11.
34 */ 34 */
35static unsigned long indy_rtc_get_time(void) 35unsigned long read_persistent_clock(void)
36{ 36{
37 unsigned int yrs, mon, day, hrs, min, sec; 37 unsigned int yrs, mon, day, hrs, min, sec;
38 unsigned int save_control; 38 unsigned int save_control;
@@ -60,7 +60,7 @@ static unsigned long indy_rtc_get_time(void)
60 return mktime(yrs + 1900, mon, day, hrs, min, sec); 60 return mktime(yrs + 1900, mon, day, hrs, min, sec);
61} 61}
62 62
63static int indy_rtc_set_time(unsigned long tim) 63int rtc_mips_set_time(unsigned long tim)
64{ 64{
65 struct rtc_time tm; 65 struct rtc_time tm;
66 unsigned int save_control; 66 unsigned int save_control;
@@ -128,7 +128,7 @@ static unsigned long dosample(void)
128/* 128/*
129 * Here we need to calibrate the cycle counter to at least be close. 129 * Here we need to calibrate the cycle counter to at least be close.
130 */ 130 */
131static __init void indy_time_init(void) 131__init void plat_time_init(void)
132{ 132{
133 unsigned long r4k_ticks[3]; 133 unsigned long r4k_ticks[3];
134 unsigned long r4k_tick; 134 unsigned long r4k_tick;
@@ -207,12 +207,3 @@ void __init plat_timer_setup(struct irqaction *irq)
207 /* setup irqaction */ 207 /* setup irqaction */
208 setup_irq(SGI_TIMER_IRQ, irq); 208 setup_irq(SGI_TIMER_IRQ, irq);
209} 209}
210
211void __init ip22_time_init(void)
212{
213 /* setup hookup functions */
214 rtc_mips_get_time = indy_rtc_get_time;
215 rtc_mips_set_time = indy_rtc_set_time;
216
217 board_time_init = indy_time_init;
218}