From: troyer@saifr00.cfsat.honeywell.com (Dean Troyer)
Subject: PS/2 pointing device initialization patch
Organization: Honeywell Air Transport Systems Division
Date: Mon, 5 Oct 92 17:38:49 GMT

OK, the PS/2 mouse patch I posted last week had some problems for some
machines (it DID work on my Compaq, tho).  After disassembling my BIOS
and comparing the Mach code, here's a much simpler & better way to get
the PS/2 mouse initialized & such.

Again, this works for me, and at least two others, so it's been Well Tested :)

Get rid of my earlier patch & apply this against virgin 0.98 setup.S and
psaux.c files.

dt

----------begin----------
*** linux/kernel/chr_drv/psaux.c@	Sun Aug 30 09:00:44 1992
--- linux/kernel/chr_drv/psaux.c	Sat Oct  3 10:27:59 1992
***************
*** 6,11 ****
--- 6,15 ----
   * Supports pointing devices attached to a PS/2 type
   * Keyboard and Auxiliary Device Controller.
   *
+  * Modified by Dean Troyer (troyer@saifr00.cfsat.Honeywell.COM) 03Oct92
+  *   to perform (some of) the hardware initialization formerly done in
+  *   setup.S by the BIOS
+  *
   */
  
  #include <linux/timer.h>
***************
*** 89,94 ****
--- 93,102 ----
  	poll_status();
  	outb_p(0xa7,AUX_COMMAND);      	/* Disable Aux device */
  	poll_status();
+ 	outb_p(0xd4,AUX_COMMAND);
+ 	poll_status();
+ 	outb_p(0xf5,AUX_OUTPUT_PORT);	/* disable port */
+ 	poll_status();
  	outb_p(0x60,AUX_COMMAND);
  	poll_status();
  	outb_p(0x65,AUX_OUTPUT_PORT);
***************
*** 114,119 ****
--- 122,131 ----
  	queue->head = queue->tail = 0;  /* Flush input queue */
  	if (request_irq(AUX_IRQ, aux_interrupt))
  		return -EBUSY;
+ 	outb_p(0xd4,AUX_COMMAND);
+ 	poll_status();
+ 	outb_p(0xf4,AUX_OUTPUT_PORT);	/* enable port */
+ 	poll_status();
  	outb_p(0x60,AUX_COMMAND);	/* Write command */
  	poll_status();
  	outb_p(0x47,AUX_OUTPUT_PORT);	/* Enable AUX and keyb interrupts */
*** linux/boot/setup.S@	Thu Sep 17 10:58:50 1992
--- linux/boot/setup.S	Sat Oct  3 10:32:17 1992
***************
*** 11,16 ****
--- 11,19 ----
  ! system to read them from there before the area is overwritten
  ! for buffer-blocks.
  !
+ ! Move PS/2 aux init code to psaux.c
+ ! (troyer@saifr00.cfsat.Honeywell.COM) 03Oct92
+ !
  
  ! NOTE! These had better be the same as in bootsect.s!
  #include <linux/config.h>
***************
*** 134,162 ****
  	int	0x11		! int 0x11: equipment determination
  	test	al,#0x04	! check if pointing device installed
  	jz	no_psmouse
- 	mov	ax,#0xc201	! reset pointing device
- 	int	0x15
- 	jc	no_psmouse
- 	mov	bh,#0x03	! 3 bytes/packet
- 	mov	ax,#0xc205	! initialize pointing device
- 	int	0x15
- 	jc	no_psmouse
- 	mov	ax,#0xc203	! set resolution
- 	mov	bh,#0x03	! 8 counts/mm
- 	int	0x15
- 	jc	no_psmouse
- 	mov	ax,#0xc206	! set scaling
- 	mov	bh,0x02		! 2:1 scaling
- 	int	0x15
- 	jc	no_psmouse
- 	mov	ax,#0xc202	! set sample rate
- 	mov	bh,#0x05	! 100 reports per second
- 	int	0x15
- 	jc	no_psmouse
- 	mov	bh,#0x01
- 	mov	ax,#0xc200	! enable pointing device
- 	int	0x15
- 	jc	no_psmouse
  	mov	[0x1ff],#0xaa	! device present
  no_psmouse:
  
--- 137,142 ----
----------end----------


Dean Troyer                               troyer@saifr00.cfsat.Honeywell.COM
Honeywell Commercial Flight Systems       72240.3152@compuserve.com
Phoenix AZ
(602) 436-3613
-- 
Dean Troyer                               troyer@saifr00.cfsat.Honeywell.COM
Honeywell Commercial Flight Systems       72240.3152@compuserve.com
Phoenix AZ
(602) 436-3613
Newsgroups: comp.os.linux