patch-1.3.38 linux/arch/alpha/kernel/setup.c
Next file: linux/arch/alpha/lib/io.c
Previous file: linux/arch/alpha/kernel/ptrace.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Tue Nov 7 09:18:34 1995
- Orig file:
v1.3.37/linux/arch/alpha/kernel/setup.c
- Orig date:
Mon Sep 18 14:53:48 1995
diff -u --recursive --new-file v1.3.37/linux/arch/alpha/kernel/setup.c linux/arch/alpha/kernel/setup.c
@@ -66,6 +66,24 @@
16 /* orig-video-points */
};
+/*
+ * Initialize Programmable Interval Timers with standard values. Some
+ * drivers depend on them being initialized (e.g., joystick driver).
+ */
+static void init_pit (void)
+{
+ outb(0x54, 0x43); /* counter 1: refresh timer */
+ outb(0x18, 0x41);
+
+ outb(0x36, 0x43); /* counter 0: system timer */
+ outb(0x00, 0x40);
+ outb(0x00, 0x40);
+
+ outb(0xb6, 0x43); /* counter 2: speaker */
+ outb(0x31, 0x42);
+ outb(0x13, 0x42);
+}
+
static unsigned long find_end_memory(void)
{
int i;
@@ -91,6 +109,8 @@
unsigned long * memory_start_p, unsigned long * memory_end_p)
{
extern int _end;
+
+ init_pit();
hwrpb = (struct hwrpb_struct*)(IDENT_ADDR + INIT_HWRPB->phys_addr);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this