patch-2.4.22 linux-2.4.22/arch/mips/vr41xx/common/time.c

Next file: linux-2.4.22/arch/mips/vr41xx/common/vrc4173.c
Previous file: linux-2.4.22/arch/mips/vr41xx/common/serial.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/mips/vr41xx/common/time.c linux-2.4.22/arch/mips/vr41xx/common/time.c
@@ -48,8 +48,7 @@
 #include <asm/mipsregs.h>
 #include <asm/param.h>
 #include <asm/time.h>
-
-#define MIPS_COUNTER_TIMER_IRQ	7
+#include <asm/vr41xx/vr41xx.h>
 
 #define VR4111_ETIMELREG	KSEG1ADDR(0x0b0000c0)
 #define VR4122_ETIMELREG	KSEG1ADDR(0x0f000100)
@@ -63,7 +62,7 @@
 
 void vr41xx_time_init(void)
 {
-	switch (mips_cpu.cputype) {
+	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
 		vr41xx_rtc_base = VR4111_ETIMELREG;
@@ -87,8 +86,8 @@
 {
 	u32 count;
 
-	setup_irq(MIPS_COUNTER_TIMER_IRQ, irq);
+	setup_irq(MIPS_COUNTER_IRQ, irq);
 
-	count = read_32bit_cp0_register(CP0_COUNT);
-	write_32bit_cp0_register (CP0_COMPARE, count + (mips_counter_frequency / HZ));
+	count = read_c0_count();
+	write_c0_compare(count + (mips_counter_frequency / HZ));
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)