Beispiel #1
0
int probe_qp(void)
{
	/* Get access to the ports */
	if (ioperm(0x2fa, 3, 1)) {perror("ioperm"); return 0;}
	if (ioperm(0x3fa, 3, 1)) {perror("ioperm"); return 0;}
	if (ioperm(0x390, 3, 1)) {perror("ioperm"); return 0;}
	if (ioperm(0x391, 3, 1)) {perror("ioperm"); return 0;}
	outb(0x55, 0x2fa);                    /* Any value except 9, ff or 36*/
	outb(0xaa, 0x3fa);                    /* Inverse of 55 */
	outb(0x36, 0x3fa);                    /* Address the chip */
	outb(0xe4, 0x3fa);                    /* 390/4; 390 = config address*/
	outb(0x1b, 0x2fa);                    /* Inverse of e4 */
	if (read_710(0x0f) != 0xe4)             /* Config address found? */
		return 0;                             /* No: no 82C710 here */
	qp_data = read_710(0x0d)*4;             /* Get mouse I/O address */
	qp_status = qp_data+1;
	outb(0x0f, 0x390);
	outb(0x0f, 0x391);                    /* Close config mode */
	/* We don't need the ports anymore */
	if (ioperm(0x2fa, 3, 0)) {perror("ioperm"); return 0;}
	if (ioperm(0x3fa, 3, 0)) {perror("ioperm"); return 0;}
	if (ioperm(0x390, 3, 0)) {perror("ioperm"); return 0;}
	if (ioperm(0x391, 3, 0)) {perror("ioperm"); return 0;}
        return 1;
}
Beispiel #2
0
static int probe_qp(void)
{
	outb_p(0x55, 0x2fa);			/* Any value except 9, ff or 36 */
	outb_p(0xaa, 0x3fa);			/* Inverse of 55 */
	outb_p(0x36, 0x3fa);			/* Address the chip */
	outb_p(0xe4, 0x3fa);			/* 390/4; 390 = config address */
	outb_p(0x1b, 0x2fa);			/* Inverse of e4 */
	if (read_710(0x0f) != 0xe4)		/* Config address found? */
	  return 0;				/* No: no 82C710 here */
	qp_data = read_710(0x0d)*4;		/* Get mouse I/O address */
	qp_status = qp_data+1;
	outb_p(0x0f, 0x390);
	outb_p(0x0f, 0x391);			/* Close config mode */
	return 1;
}
Beispiel #3
0
int   probe_qp(void)
{
  outb_p(0x55, 0x2fa);			 
  outb_p(0xaa, 0x3fa);			 
  outb_p(0x36, 0x3fa);			 
  outb_p(0xe4, 0x3fa);			 
  outb_p(0x1b, 0x2fa);			 
  if (read_710(0x0f) != 0xe4)		 
    return 0;				 
  qp_data = read_710(0x0d)*4;		 
  qp_status = qp_data+1;
  outb_p(0x0f, 0x390);
  outb_p(0x0f, 0x391);			 
  return 1;
}