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

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

diff -u --recursive --new-file v2.3.29/linux/arch/alpha/kernel/time.c linux/arch/alpha/kernel/time.c
@@ -40,7 +40,7 @@
 #include <linux/timex.h>
 
 #include "proto.h"
-#include "irq_impl.h"
+#include <asm/hw_irq.h>
 
 extern rwlock_t xtime_lock;
 extern volatile unsigned long lost_ticks;	/* kernel/sched.c */
@@ -174,7 +174,7 @@
 
 #ifdef CONFIG_RTC
 void
-rtc_init_pit (void)
+rtc_init_pit(void)
 {
 	unsigned char control;
 
@@ -192,6 +192,25 @@
 	outb(0xb6, 0x43);	/* pit counter 2: speaker */
 	outb(0x31, 0x42);
 	outb(0x13, 0x42);
+}
+
+void
+rtc_kill_pit(void)
+{
+	unsigned char control;
+
+	cli();
+
+	/* Reset periodic interrupt frequency.  */
+	CMOS_WRITE(0x26, RTC_FREQ_SELECT);
+
+	/* Turn on periodic interrupts.  */
+	control = CMOS_READ(RTC_CONTROL);
+	control |= RTC_PIE;
+	CMOS_WRITE(control, RTC_CONTROL);	
+	CMOS_READ(RTC_INTR_FLAGS);
+
+	sti();
 }
 #endif
 

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