patch-2.3.13 linux/arch/alpha/kernel/time.c

Next file: linux/arch/alpha/kernel/traps.c
Previous file: linux/arch/alpha/kernel/sys_ruffian.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.12/linux/arch/alpha/kernel/time.c linux/arch/alpha/kernel/time.c
@@ -47,6 +47,12 @@
 
 static int set_rtc_mmss(unsigned long);
 
+#ifdef CONFIG_RTC
+struct resource timer_resource = { "pit", 0x40, 0x40+0x20 };
+#else
+struct resource timer_resource = { "rtc", 0, 0 };
+#endif
+
 
 /*
  * Shift amount by which scaled_ticks_per_cycle is scaled.  Shifting
@@ -184,7 +190,7 @@
 	CMOS_WRITE(control, RTC_CONTROL);
 	(void) CMOS_READ(RTC_INTR_FLAGS);
 
-	request_region(0x40, 0x20, "timer"); /* reserve pit */
+	request_resource(&ioport_resource, &timer_resource);
 
 	/* Setup interval timer.  */
 	outb(0x34, 0x43);		/* binary, mode 2, LSB/MSB, ch 0 */
@@ -219,7 +225,9 @@
 	}
 	(void) CMOS_READ(RTC_INTR_FLAGS);
 
-	request_region(RTC_PORT(0), 0x10, "timer"); /* reserve rtc */
+	timer_resource.start = RTC_PORT(0);
+	timer_resource.end = RTC_PORT(0) + 0x10;
+	request_resource(&ioport_resource, &timer_resource);
 
 	outb(0x36, 0x43);	/* pit counter 0: system timer */
 	outb(0x00, 0x40);
@@ -323,7 +331,7 @@
 
 	/* setup timer */ 
 	irq_handler = timer_interrupt;
-	if (request_irq(TIMER_IRQ, irq_handler, 0, "timer", NULL))
+	if (request_irq(TIMER_IRQ, irq_handler, 0, timer_resource.name, NULL))
 		panic("Could not allocate timer IRQ!");
 }
 

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