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 5*bb2d7d5eSSeth Goldberg * Common Development and Distribution License (the "License"). 6*bb2d7d5eSSeth 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*bb2d7d5eSSeth Goldberg * Copyright 2008 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*bb2d7d5eSSeth Goldberg #define I8042_INT_CMD_PLUS_PARAM 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*bb2d7d5eSSeth Goldberg #define I8042_POLL_CMD_PLUS_PARAM 0x15 /* See comment below */ 64*bb2d7d5eSSeth Goldberg 65*bb2d7d5eSSeth Goldberg /* 66*bb2d7d5eSSeth Goldberg * The I8042_INT_CMD_PLUS_PARAM and I8042_POLL_CMD_PLUS_PARAM virtual 67*bb2d7d5eSSeth Goldberg * registers are meant to be used with i8042_rep_put8() [via 68*bb2d7d5eSSeth Goldberg * ddi_rep_put8 in child drivers], which is designed to allow commands 69*bb2d7d5eSSeth Goldberg * that have responses (or that have responses plus an option byte) to 70*bb2d7d5eSSeth Goldberg * execute atomically with respect to commands from other children 71*bb2d7d5eSSeth Goldberg * (some 8042 implementations get confused when other child devices 72*bb2d7d5eSSeth Goldberg * intersperse their own commands while a command to a different 73*bb2d7d5eSSeth Goldberg * 8042-connected device is in flight). 74*bb2d7d5eSSeth Goldberg */ 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate /* Softint priority used */ 777c478bd9Sstevel@tonic-gate #define I8042_SOFTINT_PRI 4 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate #ifdef __cplusplus 807c478bd9Sstevel@tonic-gate } 817c478bd9Sstevel@tonic-gate #endif 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate #endif /* _SYS_I8042_H */ 84