/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_USB_EHCI_POLLED_H
#define _SYS_USB_EHCI_POLLED_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Enchanced Host Controller Driver (EHCI)
*
* The EHCI driver is a software driver which interfaces to the Universal
* Serial Bus layer (USBA) and the Host Controller (HC). The interface to
* the Host Controller is defined by the EHCI Host Controller Interface.
*
* This header file describes the data structures required for the EHCI
* Driver to work in POLLED mode which will be either OBP mode for Sparc
* architecture or PC PROM mode for X86 architecture
*/
/*
* These two flags are used to determine if this structure is already
* in use.
*/
/*
* These two flags are used to determine if this structure is already in
* use. We should only save off the controller state information once,
* restore it once. These flags are used for the ehci_polled_flags below.
*/
/*
* State structure for the POLLED switch off
*/
typedef struct ehci_polled {
/*
* Pointer to the ehcip structure for the device that is to be
* used as input in polled mode.
*/
/*
* Pipe handle for the pipe that is to be used as input device
* in POLLED mode.
*/
/* Dummy endpoint descriptor */
/* Interrupt Endpoint descriptor */
/*
* The buffer that the usb scancodes are copied into.
*/
/*
* This flag is used to determine if the state of the controller
* has already been saved (enter) or doesn't need to be restored
* yet (exit).
*/
/*
* List of QTD inserted into polled mode periodic schedule list.
*/
/*
* ehci_hcdi_polled_input_enter() may be called
* multiple times before the ehci_hcdi_polled_input_exit() is called.
* For example, the system may:
* - go down to kmdb (ehci_hcdi_polled_input_enter())
* - down to the ok prompt, $q (ehci_hcdi_polled_input_enter())
* - back to kmdb, "go" (ehci_hcdi_polled_input_exit())
* - back to the OS, :c at kmdb (ehci_hcdi_polled_input_exit())
*
* polled_entry keeps track of how many times
* ehci_polled_input_enter/ehci_polled_input_exit have been
* called so that the host controller isn't switched back to OS mode
* prematurely.
*/
/*
* Save the pointer usb device structure and the endpoint number
* during the polled initilization.
*/
/*
* Time waits for the different EHCI specific polled operations.
* These timeout values are specified in terms of microseconds.
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_EHCI_POLLED_H */