diff options
Diffstat (limited to 'arch/mips/sgi-ip27/ip27-timer.c')
-rw-r--r-- | arch/mips/sgi-ip27/ip27-timer.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index 4e870fc4469b..5e82a268e3c9 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c | |||
@@ -134,13 +134,6 @@ again: | |||
134 | irq_exit(); | 134 | irq_exit(); |
135 | } | 135 | } |
136 | 136 | ||
137 | unsigned long ip27_do_gettimeoffset(void) | ||
138 | { | ||
139 | unsigned long ct_cur1; | ||
140 | ct_cur1 = REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT) + CYCLES_PER_JIFFY; | ||
141 | return (ct_cur1 - ct_cur[0]) * NSEC_PER_CYCLE / 1000; | ||
142 | } | ||
143 | |||
144 | /* Includes for ioc3_init(). */ | 137 | /* Includes for ioc3_init(). */ |
145 | #include <asm/sn/types.h> | 138 | #include <asm/sn/types.h> |
146 | #include <asm/sn/sn0/addrs.h> | 139 | #include <asm/sn/sn0/addrs.h> |
@@ -221,8 +214,6 @@ static struct irqaction rt_irqaction = { | |||
221 | .name = "timer" | 214 | .name = "timer" |
222 | }; | 215 | }; |
223 | 216 | ||
224 | extern int allocate_irqno(void); | ||
225 | |||
226 | void __init plat_timer_setup(struct irqaction *irq) | 217 | void __init plat_timer_setup(struct irqaction *irq) |
227 | { | 218 | { |
228 | int irqno = allocate_irqno(); | 219 | int irqno = allocate_irqno(); |
@@ -248,12 +239,17 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
248 | setup_irq(irqno, &rt_irqaction); | 239 | setup_irq(irqno, &rt_irqaction); |
249 | } | 240 | } |
250 | 241 | ||
242 | static unsigned int ip27_hpt_read(void) | ||
243 | { | ||
244 | return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT); | ||
245 | } | ||
246 | |||
251 | void __init ip27_time_init(void) | 247 | void __init ip27_time_init(void) |
252 | { | 248 | { |
249 | mips_hpt_read = ip27_hpt_read; | ||
250 | mips_hpt_frequency = CYCLES_PER_SEC; | ||
253 | xtime.tv_sec = get_m48t35_time(); | 251 | xtime.tv_sec = get_m48t35_time(); |
254 | xtime.tv_nsec = 0; | 252 | xtime.tv_nsec = 0; |
255 | |||
256 | do_gettimeoffset = ip27_do_gettimeoffset; | ||
257 | } | 253 | } |
258 | 254 | ||
259 | void __init cpu_time_init(void) | 255 | void __init cpu_time_init(void) |