diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:08 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:08 -0400 |
commit | 4b550488f894c899aa54dc935c8fee47bca2b7df (patch) | |
tree | f7ee1d0ff80542124b5fa864a30022277d703c49 /arch/mips/sgi-ip22 | |
parent | f5ff0a280201c9cbfb6e9eb4bafdb465c2269ed3 (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')
-rw-r--r-- | arch/mips/sgi-ip22/ip22-setup.c | 2 | ||||
-rw-r--r-- | arch/mips/sgi-ip22/ip22-time.c | 15 |
2 files changed, 3 insertions, 14 deletions
diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setup.c index e7ce7982db72..174f09e42f6b 100644 --- a/arch/mips/sgi-ip22/ip22-setup.c +++ b/arch/mips/sgi-ip22/ip22-setup.c | |||
@@ -51,7 +51,6 @@ void ip22_do_break(void) | |||
51 | EXPORT_SYMBOL(ip22_do_break); | 51 | EXPORT_SYMBOL(ip22_do_break); |
52 | 52 | ||
53 | extern void ip22_be_init(void) __init; | 53 | extern void ip22_be_init(void) __init; |
54 | extern void ip22_time_init(void) __init; | ||
55 | 54 | ||
56 | void __init plat_mem_setup(void) | 55 | void __init plat_mem_setup(void) |
57 | { | 56 | { |
@@ -59,7 +58,6 @@ void __init plat_mem_setup(void) | |||
59 | char *cserial; | 58 | char *cserial; |
60 | 59 | ||
61 | board_be_init = ip22_be_init; | 60 | board_be_init = ip22_be_init; |
62 | ip22_time_init(); | ||
63 | 61 | ||
64 | /* Init the INDY HPC I/O controller. Need to call this before | 62 | /* Init the INDY HPC I/O controller. Need to call this before |
65 | * fucking with the memory controller because it needs to know the | 63 | * fucking with the memory controller because it needs to know the |
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 | */ |
35 | static unsigned long indy_rtc_get_time(void) | 35 | unsigned 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 | ||
63 | static int indy_rtc_set_time(unsigned long tim) | 63 | int 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 | */ |
131 | static __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 | |||
211 | void __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 | } | ||