17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5bb2d7d5eSSeth Goldberg * Common Development and Distribution License (the "License"). 6bb2d7d5eSSeth Goldberg * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*15bfc6b7SSeth Goldberg * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _SYS_I8042_H 277c478bd9Sstevel@tonic-gate #define _SYS_I8042_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #ifdef __cplusplus 307c478bd9Sstevel@tonic-gate extern "C" { 317c478bd9Sstevel@tonic-gate #endif 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate /* 347c478bd9Sstevel@tonic-gate * Here's the interface to the virtual registers on the device. 357c478bd9Sstevel@tonic-gate * 367c478bd9Sstevel@tonic-gate * Normal interrupt-driven I/O: 377c478bd9Sstevel@tonic-gate * 387c478bd9Sstevel@tonic-gate * I8042_INT_INPUT_AVAIL 397c478bd9Sstevel@tonic-gate * Interrupt mode input bytes available? Zero = No. 407c478bd9Sstevel@tonic-gate * I8042_INT_INPUT_DATA 417c478bd9Sstevel@tonic-gate * Fetch interrupt mode input byte. 427c478bd9Sstevel@tonic-gate * I8042_INT_OUTPUT_DATA 437c478bd9Sstevel@tonic-gate * Interrupt mode output byte. 447c478bd9Sstevel@tonic-gate * 457c478bd9Sstevel@tonic-gate * Polled I/O, used by (e.g.) kmdb, when normal system services are 467c478bd9Sstevel@tonic-gate * unavailable: 477c478bd9Sstevel@tonic-gate * 487c478bd9Sstevel@tonic-gate * I8042_POLL_INPUT_AVAIL 497c478bd9Sstevel@tonic-gate * Polled mode input bytes available? Zero = No. 507c478bd9Sstevel@tonic-gate * I8042_POLL_INPUT_DATA 517c478bd9Sstevel@tonic-gate * Polled mode input byte. 527c478bd9Sstevel@tonic-gate * I8042_POLL_OUTPUT_DATA 537c478bd9Sstevel@tonic-gate * Polled mode output byte. 547c478bd9Sstevel@tonic-gate */ 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate #define I8042_INT_INPUT_AVAIL 0x00 577c478bd9Sstevel@tonic-gate #define I8042_INT_INPUT_DATA 0x01 587c478bd9Sstevel@tonic-gate #define I8042_INT_OUTPUT_DATA 0x03 59*15bfc6b7SSeth Goldberg #define I8042_LOCK 0x05 /* See comment below */ 607c478bd9Sstevel@tonic-gate #define I8042_POLL_INPUT_AVAIL 0x10 617c478bd9Sstevel@tonic-gate #define I8042_POLL_INPUT_DATA 0x11 627c478bd9Sstevel@tonic-gate #define I8042_POLL_OUTPUT_DATA 0x13 63*15bfc6b7SSeth Goldberg #define I8042_UNLOCK 0x15 /* See comment below */ 64bb2d7d5eSSeth Goldberg 65bb2d7d5eSSeth Goldberg /* 66*15bfc6b7SSeth Goldberg * The I8042_LOCK and I8042_UNLOCK virtual 67*15bfc6b7SSeth Goldberg * registers are meant to be used by child drivers that require exclusive 68*15bfc6b7SSeth Goldberg * access to the 8042 registers for an atomic transaction (e.g. keyboard 69*15bfc6b7SSeth Goldberg * enable, mouse reset) that consists of multiple single-byte commands 70*15bfc6b7SSeth Goldberg * and (possibly) their arguments. 71bb2d7d5eSSeth Goldberg */ 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gate /* Softint priority used */ 747c478bd9Sstevel@tonic-gate #define I8042_SOFTINT_PRI 4 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate #ifdef __cplusplus 777c478bd9Sstevel@tonic-gate } 787c478bd9Sstevel@tonic-gate #endif 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate #endif /* _SYS_I8042_H */ 81