Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: "Willem Boschman" <wiz@xs4all.nl>
To: axp-list@redhat.com
Cc: jochen@uni-duesseldorf.de, rth@cygnus.com
Subject: Re: reporting 2.2 kernel bugs
Date: Thu, 7 Jan 1999 21:19:13 +0100	[thread overview]
Message-ID: <199901071959.UAA25824@smtp1.xs4all.nl> (raw)
In-Reply-To: <99010610294002.07421@bacchus.pc1.uni-duesseldorf.de>

[-- Attachment #1: Attachment information. --]
[-- Type: text/plain, Size: 476 bytes --]

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  alpha-patch-2.2.0
     Date:  7 Jan 1999, 20:54
     Size:  5664 bytes.
     Type:  Unknown

[-- Attachment #2: alpha-patch-2.2.0 --]
[-- Type: Application/Octet-stream, Size: 5664 bytes --]

--- linux-2.1.110/arch/alpha/kernel/time.c	Tue Dec 29 12:08:51 1998
+++ linux/arch/alpha/kernel/time.c	Tue Dec 29 14:03:17 1998
@@ -25,7 +25,7 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/delay.h>
-#include <linux/ioport.h>
+/* #include <linux/ioport.h> */
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -37,6 +37,8 @@
 #include "proto.h"
 #include "irq.h"
 
+extern struct hwrpb_struct *hwrpb;
+
 static int set_rtc_mmss(unsigned long);
 
 
@@ -153,91 +155,6 @@
 	  )*60 + sec; /* finally seconds */
 }
 
-/*
- * Initialize Programmable Interval Timers with standard values.  Some
- * drivers depend on them being initialized (e.g., joystick driver).
- */
-
-/* It is (normally) only counter 0 that presents config problems, so
-   provide this support function to do the rest of the job.  */
-
-void inline
-init_pit_rest(void)
-{
-#if 0
-	/* Leave refresh timer alone---nobody should depend on a
-	   particular value anyway. */
-	outb(0x54, 0x43);	/* counter 1: refresh timer */
-	outb(0x18, 0x41);
-#endif
-
-	outb(0xb6, 0x43);	/* counter 2: speaker */
-	outb(0x31, 0x42);
-	outb(0x13, 0x42);
-}
-
-#ifdef CONFIG_RTC
-static inline void
-rtc_init_pit (void)
-{
-	unsigned char control;
-
-	/* Setup interval timer if /dev/rtc is being used */
-	outb(0x34, 0x43);		/* binary, mode 2, LSB/MSB, ch 0 */
-	outb(LATCH & 0xff, 0x40);	/* LSB */
-	outb(LATCH >> 8, 0x40);		/* MSB */
-	request_region(0x40, 0x20, "timer"); /* reserve pit */
-
-	/* Turn off RTC interrupts before /dev/rtc is initialized */
-	control = CMOS_READ(RTC_CONTROL);
-        control &= ~(RTC_PIE | RTC_AIE | RTC_UIE);
-        CMOS_WRITE(control, RTC_CONTROL);
-        CMOS_READ(RTC_INTR_FLAGS);
-
-	init_pit_rest();
-}
-#endif
-
-void
-generic_init_pit (void)
-{
-	unsigned char x;
-
-        /* Reset periodic interrupt frequency.  */
-	x = CMOS_READ(RTC_FREQ_SELECT) & 0x3f;
-	if (x != 0x26 && x != 0x19 && x != 0x06) {
-		printk("Setting RTC_FREQ to 1024 Hz (%x)\n", x);
-		CMOS_WRITE(0x26, RTC_FREQ_SELECT);
-	}
-
-	/* Turn on periodic interrupts.  */
-	x = CMOS_READ(RTC_CONTROL);
-	if (!(x & RTC_PIE)) {
-		printk("Turning on RTC interrupts.\n");
-		x |= RTC_PIE;
-		x &= ~(RTC_AIE | RTC_UIE);
-		CMOS_WRITE(x, RTC_CONTROL);
-	}
-	CMOS_READ(RTC_INTR_FLAGS);
-
-	request_region(RTC_PORT(0), 0x10, "timer"); /* reserve rtc */
-
-	/* Turn off the PIT.  */
-	outb(0x36, 0x43);	/* counter 0: system timer */
-	outb(0x00, 0x40);
-	outb(0x00, 0x40);
-
-	init_pit_rest();
-}
-
-/* This probably isn't Right, but it is what the old code did.  */
-#if defined(CONFIG_RTC)
-# define init_pit	rtc_init_pit
-#else
-# define init_pit	alpha_mv.init_pit
-#endif
-
-
 void
 time_init(void)
 {
@@ -246,7 +163,7 @@
 	unsigned long cycle_freq;
 
 	/* Initialize the timers.  */
-	init_pit();
+	/* init_pit(); */
 
 	/*
 	 * The Linux interpretation of the CMOS clock register contents:
--- linux-2.1.110/arch/alpha/kernel/setup.c	Sun Dec  6 12:37:48 1998
+++ linux/arch/alpha/kernel/setup.c	Sun Dec  6 12:38:46 1998
@@ -20,6 +20,7 @@
 #include <linux/tty.h>
 #include <linux/delay.h>
 #include <linux/config.h>	/* CONFIG_ALPHA_LCA etc */
+#include <linux/ioport.h>
 #include <linux/mc146818rtc.h>
 #include <linux/console.h>
 #include <linux/errno.h>
@@ -90,6 +91,90 @@
 	orig_video_points: 16
 };
 
+
+/*
+ * Initialize Programmable Interval Timers with standard values.  Some
+ * drivers depend on them being initialized (e.g., joystick driver).
+ */
+
+/* It is (normally) only counter 0 that presents config problems, so
+   provide this support function to do the rest of the job.  */
+
+void inline
+init_pit_rest(void)
+{
+	unsigned char x;
+
+#if 0
+	/* Leave refresh timer alone---nobody should depend on a
+	   particular value anyway. */
+	outb(0x54, 0x43);	/* counter 1: refresh timer */
+	outb(0x18, 0x41);
+#endif
+
+	outb(0xb6, 0x43);	/* counter 2: speaker */
+	outb(0x31, 0x42);
+	outb(0x13, 0x42);
+
+	/* Reset periodic interrupt frequency.  */
+	x = CMOS_READ(RTC_FREQ_SELECT) & 0x3f;
+	if (x != 0x26 && x != 0x19 && x != 0x06) {
+		printk("Setting RTC_FREQ to 1024 Hz (%x)\n", x);
+		CMOS_WRITE(0x26, RTC_FREQ_SELECT);
+	}
+
+	/* Turn on periodic interrupts.  */
+	x = CMOS_READ(RTC_CONTROL);
+	if (!(x & RTC_PIE)) {
+		printk("Turning on RTC interrupts.\n");
+		x |= RTC_PIE;
+		x &= ~(RTC_AIE | RTC_UIE);
+		CMOS_WRITE(x, RTC_CONTROL);
+	}
+	CMOS_READ(RTC_INTR_FLAGS);
+}
+
+#ifdef CONFIG_RTC
+static inline void
+rtc_init_pit (void)
+{
+	unsigned char control;
+
+	/* Setup interval timer if /dev/rtc is being used */
+	outb(0x34, 0x43);		/* binary, mode 2, LSB/MSB, ch 0 */
+	outb(LATCH & 0xff, 0x40);	/* LSB */
+	outb(LATCH >> 8, 0x40);		/* MSB */
+	request_region(0x40, 0x20, "timer"); /* reserve pit */
+
+	/* Turn off RTC interrupts before /dev/rtc is initialized */
+	control = CMOS_READ(RTC_CONTROL);
+	control &= ~(RTC_PIE | RTC_AIE | RTC_UIE);
+	CMOS_WRITE(control, RTC_CONTROL);
+	CMOS_READ(RTC_INTR_FLAGS);
+
+	init_pit_rest();
+}
+#endif
+
+void
+generic_init_pit (void)
+{
+	outb(0x36, 0x43);	/* counter 0: system timer */
+	outb(0x00, 0x40);
+	outb(0x00, 0x40);
+	request_region(RTC_PORT(0), 0x10, "timer"); /* reserve rtc */
+
+	init_pit_rest();
+}
+
+/* This probably isn't Right, but it is what the old code did.  */
+#if defined(CONFIG_RTC)
+# define init_pit	rtc_init_pit
+#else
+# define init_pit	alpha_mv.init_pit
+#endif
+
+
 /*
  * Declare all of the machine vectors.
  */
@@ -274,6 +359,9 @@
 	   DMA windows and the like.  */
 	if (alpha_mv.init_arch)
 		alpha_mv.init_arch(memory_start_p, memory_end_p);
+
+	/* Initialize the timers.  */
+	init_pit();
 
 	/* 
 	 * Give us a default console.  TGA users will see nothing until

  reply	other threads:[~1999-01-07 20:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.3.96.990105193430.535A-100000@bhalpha1.nibh.go.jp >
1999-01-05 15:24 ` reporting 2.2 kernel bugs Frank C. Brants
1999-01-05 16:32   ` Jochen Kuepper
1999-01-06  5:31     ` Richard Henderson
1999-01-06  9:18       ` Jochen Kuepper
1999-01-07 20:19         ` Willem Boschman [this message]
1999-01-07 20:19         ` Willem Boschman
1999-01-07 20:22           ` Richard Henderson
     [not found]             ` <199901080616.HAA26171@mycroft.r5c.nl>
1999-01-08  6:54               ` alpha timer patch [Re: reporting 2.2 kernel bugs] Richard Henderson
1999-01-08  6:54                 ` Richard Henderson
1999-01-08 20:56                 ` Willem Boschman
1999-01-08 14:12       ` time.c +... patch Jochen Kuepper
1999-01-10  1:59       ` reporting 2.2 kernel bugs Quant-X Alpha Linux Support
1999-01-05 19:23   ` Stephen Williams
1999-01-05 19:40     ` B. James Phillippe
1999-01-05 10:39 Tom Holroyd
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox