X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Fgt64120%2Fcommon%2Ftime.c;fp=arch%2Fmips%2Fgt64120%2Fcommon%2Ftime.c;h=c47eeb768192394ba3dc1205deb1fea3fd97f0c8;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=2287b59536e5e68ee104cebe11e3c47cb928f97c;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/arch/mips/gt64120/common/time.c b/arch/mips/gt64120/common/time.c index 2287b5953..c47eeb768 100644 --- a/arch/mips/gt64120/common/time.c +++ b/arch/mips/gt64120/common/time.c @@ -8,10 +8,9 @@ */ #include #include -#include #include #include -#include +#include #include /* @@ -20,7 +19,7 @@ * differently than other MIPS interrupts. */ -static void gt64120_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t gt64120_irq(int irq, void *dev_id) { unsigned int irq_src, int_high_src, irq_src_mask, int_high_src_mask; int handled = 0; @@ -35,14 +34,16 @@ static void gt64120_irq(int irq, void *dev_id, struct pt_regs *regs) if (irq_src & 0x00000800) { /* Check for timer interrupt */ handled = 1; irq_src &= ~0x00000800; - do_timer(regs); + do_timer(1); #ifndef CONFIG_SMP - update_process_times(user_mode(regs)); + update_process_times(user_mode(get_irq_regs())); #endif } GT_WRITE(GT_INTRCAUSE_OFS, 0); GT_WRITE(GT_HINTRCAUSE_OFS, 0); + + return IRQ_HANDLED; } /* @@ -63,14 +64,14 @@ static void gt64120_irq(int irq, void *dev_id, struct pt_regs *regs) * as *irq (=irq0 in ../kernel/time.c). We will do our own timer interrupt * handling. */ -void gt64120_time_init(void) +void __init plat_timer_setup(struct irqaction *irq) { static struct irqaction timer; /* Disable timer first */ GT_WRITE(GT_TC_CONTROL_OFS, 0); /* Load timer value for 100 Hz */ - GT_WRITE(GT_TC3_OFS, Sys_clock / 100); + GT_WRITE(GT_TC3_OFS, Sys_clock / HZ); /* * Create the IRQ structure entry for the timer. Since we're too early @@ -78,7 +79,7 @@ void gt64120_time_init(void) * the values to the correct interrupt line. */ timer.handler = gt64120_irq; - timer.flags = SA_SHIRQ | SA_INTERRUPT; + timer.flags = IRQF_SHARED | IRQF_DISABLED; timer.name = "timer"; timer.dev_id = NULL; timer.next = NULL;