aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ixp4xx/common.c')
-rw-r--r--arch/arm/mach-ixp4xx/common.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 5083f03e9b5e..cfd52fb341cb 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -41,8 +41,8 @@
41#include <asm/mach/irq.h> 41#include <asm/mach/irq.h>
42#include <asm/mach/time.h> 42#include <asm/mach/time.h>
43 43
44static int __init ixp4xx_clocksource_init(void); 44static void __init ixp4xx_clocksource_init(void);
45static int __init ixp4xx_clockevent_init(void); 45static void __init ixp4xx_clockevent_init(void);
46static struct clock_event_device clockevent_ixp4xx; 46static struct clock_event_device clockevent_ixp4xx;
47 47
48/************************************************************************* 48/*************************************************************************
@@ -267,7 +267,7 @@ void __init ixp4xx_init_irq(void)
267 267
268static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id) 268static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id)
269{ 269{
270 struct clock_event_device *evt = &clockevent_ixp4xx; 270 struct clock_event_device *evt = dev_id;
271 271
272 /* Clear Pending Interrupt by writing '1' to it */ 272 /* Clear Pending Interrupt by writing '1' to it */
273 *IXP4XX_OSST = IXP4XX_OSST_TIMER_1_PEND; 273 *IXP4XX_OSST = IXP4XX_OSST_TIMER_1_PEND;
@@ -281,6 +281,7 @@ static struct irqaction ixp4xx_timer_irq = {
281 .name = "timer1", 281 .name = "timer1",
282 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 282 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
283 .handler = ixp4xx_timer_interrupt, 283 .handler = ixp4xx_timer_interrupt,
284 .dev_id = &clockevent_ixp4xx,
284}; 285};
285 286
286void __init ixp4xx_timer_init(void) 287void __init ixp4xx_timer_init(void)
@@ -401,7 +402,7 @@ void __init ixp4xx_sys_init(void)
401/* 402/*
402 * clocksource 403 * clocksource
403 */ 404 */
404cycle_t ixp4xx_get_cycles(struct clocksource *cs) 405static cycle_t ixp4xx_get_cycles(struct clocksource *cs)
405{ 406{
406 return *IXP4XX_OSTS; 407 return *IXP4XX_OSTS;
407} 408}
@@ -417,14 +418,12 @@ static struct clocksource clocksource_ixp4xx = {
417 418
418unsigned long ixp4xx_timer_freq = FREQ; 419unsigned long ixp4xx_timer_freq = FREQ;
419EXPORT_SYMBOL(ixp4xx_timer_freq); 420EXPORT_SYMBOL(ixp4xx_timer_freq);
420static int __init ixp4xx_clocksource_init(void) 421static void __init ixp4xx_clocksource_init(void)
421{ 422{
422 clocksource_ixp4xx.mult = 423 clocksource_ixp4xx.mult =
423 clocksource_hz2mult(ixp4xx_timer_freq, 424 clocksource_hz2mult(ixp4xx_timer_freq,
424 clocksource_ixp4xx.shift); 425 clocksource_ixp4xx.shift);
425 clocksource_register(&clocksource_ixp4xx); 426 clocksource_register(&clocksource_ixp4xx);
426
427 return 0;
428} 427}
429 428
430/* 429/*
@@ -480,7 +479,7 @@ static struct clock_event_device clockevent_ixp4xx = {
480 .set_next_event = ixp4xx_set_next_event, 479 .set_next_event = ixp4xx_set_next_event,
481}; 480};
482 481
483static int __init ixp4xx_clockevent_init(void) 482static void __init ixp4xx_clockevent_init(void)
484{ 483{
485 clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC, 484 clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC,
486 clockevent_ixp4xx.shift); 485 clockevent_ixp4xx.shift);
@@ -491,5 +490,4 @@ static int __init ixp4xx_clockevent_init(void)
491 clockevent_ixp4xx.cpumask = cpumask_of(0); 490 clockevent_ixp4xx.cpumask = cpumask_of(0);
492 491
493 clockevents_register_device(&clockevent_ixp4xx); 492 clockevents_register_device(&clockevent_ixp4xx);
494 return 0;
495} 493}