Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
ehci.h File Reference
#include <linux/usb/ehci_def.h>

Go to the source code of this file.

Data Structures

struct  ehci_stats
 
struct  ehci_hcd
 
struct  ehci_qtd
 
union  ehci_shadow
 
struct  ehci_qh_hw
 
struct  ehci_qh
 
struct  ehci_iso_packet
 
struct  ehci_iso_sched
 
struct  ehci_iso_stream
 
struct  ehci_itd
 
struct  ehci_sitd
 
struct  ehci_fstn
 

Macros

#define __hc32   __le32
 
#define __hc16   __le16
 
#define EHCI_MAX_ROOT_PORTS   15 /* see HCS_N_PORTS */
 
#define EHCI_HRTIMER_NO_EVENT   99
 
#define DEFAULT_I_TDPS   1024 /* some HCs can do less */
 
#define OHCI_CTRL_HCFS   (3 << 6)
 
#define OHCI_USB_OPER   (2 << 6)
 
#define OHCI_USB_SUSPEND   (3 << 6)
 
#define OHCI_HCCTRL_OFFSET   0x4
 
#define OHCI_HCCTRL_LEN   0x4
 
#define COUNT(x)   do {} while (0)
 
#define QTD_NEXT(ehci, dma)   cpu_to_hc32(ehci, (u32)dma)
 
#define QTD_TOGGLE   (1 << 31) /* data toggle */
 
#define QTD_LENGTH(tok)   (((tok)>>16) & 0x7fff)
 
#define QTD_IOC   (1 << 15) /* interrupt on complete */
 
#define QTD_CERR(tok)   (((tok)>>10) & 0x3)
 
#define QTD_PID(tok)   (((tok)>>8) & 0x3)
 
#define QTD_STS_ACTIVE   (1 << 7) /* HC may execute this */
 
#define QTD_STS_HALT   (1 << 6) /* halted on error */
 
#define QTD_STS_DBE   (1 << 5) /* data buffer error (in HC) */
 
#define QTD_STS_BABBLE   (1 << 4) /* device was babbling (qtd halted) */
 
#define QTD_STS_XACT   (1 << 3) /* device gave illegal response */
 
#define QTD_STS_MMF   (1 << 2) /* incomplete split transaction */
 
#define QTD_STS_STS   (1 << 1) /* split transaction state */
 
#define QTD_STS_PING   (1 << 0) /* issue PING? */
 
#define ACTIVE_BIT(ehci)   cpu_to_hc32(ehci, QTD_STS_ACTIVE)
 
#define HALT_BIT(ehci)   cpu_to_hc32(ehci, QTD_STS_HALT)
 
#define STATUS_BIT(ehci)   cpu_to_hc32(ehci, QTD_STS_STS)
 
#define QTD_MASK(ehci)   cpu_to_hc32 (ehci, ~0x1f)
 
#define IS_SHORT_READ(token)   (QTD_LENGTH (token) != 0 && QTD_PID (token) == 1)
 
#define Q_NEXT_TYPE(ehci, dma)   ((dma) & cpu_to_hc32(ehci, 3 << 1))
 
#define Q_TYPE_ITD   (0 << 1)
 
#define Q_TYPE_QH   (1 << 1)
 
#define Q_TYPE_SITD   (2 << 1)
 
#define Q_TYPE_FSTN   (3 << 1)
 
#define QH_NEXT(ehci, dma)   (cpu_to_hc32(ehci, (((u32)dma)&~0x01f)|Q_TYPE_QH))
 
#define EHCI_LIST_END(ehci)   cpu_to_hc32(ehci, 1) /* "null pointer" to hw */
 
#define QH_CONTROL_EP   (1 << 27) /* FS/LS control endpoint */
 
#define QH_HEAD   (1 << 15) /* Head of async reclamation list */
 
#define QH_TOGGLE_CTL   (1 << 14) /* Data toggle control */
 
#define QH_HIGH_SPEED   (2 << 12) /* Endpoint speed */
 
#define QH_LOW_SPEED   (1 << 12)
 
#define QH_FULL_SPEED   (0 << 12)
 
#define QH_INACTIVATE   (1 << 7) /* Inactivate on next transaction */
 
#define QH_SMASK   0x000000ff
 
#define QH_CMASK   0x0000ff00
 
#define QH_HUBADDR   0x007f0000
 
#define QH_HUBPORT   0x3f800000
 
#define QH_MULT   0xc0000000
 
#define QH_STATE_LINKED   1 /* HC sees this */
 
#define QH_STATE_UNLINK   2 /* HC may still see this */
 
#define QH_STATE_IDLE   3 /* HC doesn't see this */
 
#define QH_STATE_UNLINK_WAIT   4 /* LINKED and on unlink q */
 
#define QH_STATE_COMPLETING   5 /* don't touch token.HALT */
 
#define QH_XACTERR_MAX   32 /* XactErr retry limit */
 
#define NO_FRAME   ((unsigned short)~0) /* pick new start */
 
#define EHCI_ISOC_ACTIVE   (1<<31) /* activate transfer this slot */
 
#define EHCI_ISOC_BUF_ERR   (1<<30) /* Data buffer error */
 
#define EHCI_ISOC_BABBLE   (1<<29) /* babble detected */
 
#define EHCI_ISOC_XACTERR   (1<<28) /* XactErr - transaction error */
 
#define EHCI_ITD_LENGTH(tok)   (((tok)>>16) & 0x0fff)
 
#define EHCI_ITD_IOC   (1 << 15) /* interrupt on complete */
 
#define ITD_ACTIVE(ehci)   cpu_to_hc32(ehci, EHCI_ISOC_ACTIVE)
 
#define SITD_IOC   (1 << 31) /* interrupt on completion */
 
#define SITD_PAGE   (1 << 30) /* buffer 0/1 */
 
#define SITD_LENGTH(x)   (0x3ff & ((x)>>16))
 
#define SITD_STS_ACTIVE   (1 << 7) /* HC may execute this */
 
#define SITD_STS_ERR   (1 << 6) /* error from TT */
 
#define SITD_STS_DBE   (1 << 5) /* data buffer error (in HC) */
 
#define SITD_STS_BABBLE   (1 << 4) /* device was babbling */
 
#define SITD_STS_XACT   (1 << 3) /* illegal IN response */
 
#define SITD_STS_MMF   (1 << 2) /* incomplete split transaction */
 
#define SITD_STS_STS   (1 << 1) /* split transaction state */
 
#define SITD_ACTIVE(ehci)   cpu_to_hc32(ehci, SITD_STS_ACTIVE)
 
#define ehci_prepare_ports_for_controller_suspend(ehci, do_wakeup)   ehci_adjust_port_wakeup_flags(ehci, true, do_wakeup);
 
#define ehci_prepare_ports_for_controller_resume(ehci)   ehci_adjust_port_wakeup_flags(ehci, false, false);
 
#define ehci_is_TDI(e)   (0)
 
#define ehci_port_speed(ehci, portsc)   USB_PORT_STAT_HIGH_SPEED
 
#define ehci_has_fsl_portno_bug(e)   (0)
 
#define ehci_big_endian_mmio(e)   0
 
#define ehci_big_endian_capbase(e)   0
 
#define STUB_DEBUG_FILES
 

Enumerations

enum  ehci_rh_state { EHCI_RH_HALTED, EHCI_RH_SUSPENDED, EHCI_RH_RUNNING, EHCI_RH_STOPPING }
 
enum  ehci_hrtimer_event {
  EHCI_HRTIMER_POLL_ASS, EHCI_HRTIMER_POLL_PSS, EHCI_HRTIMER_POLL_DEAD, EHCI_HRTIMER_UNLINK_INTR,
  EHCI_HRTIMER_FREE_ITDS, EHCI_HRTIMER_ASYNC_UNLINKS, EHCI_HRTIMER_IAA_WATCHDOG, EHCI_HRTIMER_DISABLE_PERIODIC,
  EHCI_HRTIMER_DISABLE_ASYNC, EHCI_HRTIMER_IO_WATCHDOG, EHCI_HRTIMER_NUM_EVENTS
}
 

Functions

struct ehci_qtd __attribute__ ((aligned(32)))
 

Variables

__hc32 hw_next
 
__hc32 hw_alt_next
 
__hc32 hw_token
 
__hc32 hw_buf [5]
 
__hc32 hw_buf_hi [5]
 
dma_addr_t qtd_dma
 
struct list_head qtd_list
 
struct urb * urb
 
size_t length
 
union ehci_shadow __attribute__
 
__hc32 hw_info1
 
__hc32 hw_info2
 
__hc32 hw_current
 
__hc32 hw_qtd_next
 
__hc32 hw_transaction [8]
 
__hc32 hw_bufp [7]
 
__hc32 hw_bufp_hi [7]
 
dma_addr_t itd_dma
 
union ehci_shadow itd_next
 
struct ehci_iso_streamstream
 
struct list_head itd_list
 
unsigned frame
 
unsigned pg
 
unsigned index [8]
 
__hc32 hw_fullspeed_ep
 
__hc32 hw_uframe
 
__hc32 hw_results
 
__hc32 hw_backpointer
 
dma_addr_t sitd_dma
 
union ehci_shadow sitd_next
 
struct list_head sitd_list
 
__hc32 hw_prev
 
dma_addr_t fstn_dma
 
union ehci_shadow fstn_next
 

Macro Definition Documentation

#define __hc16   __le16

Definition at line 37 of file ehci.h.

#define __hc32   __le32

Definition at line 36 of file ehci.h.

#define ACTIVE_BIT (   ehci)    cpu_to_hc32(ehci, QTD_STS_ACTIVE)

Definition at line 304 of file ehci.h.

#define COUNT (   x)    do {} while (0)

Definition at line 219 of file ehci.h.

#define DEFAULT_I_TDPS   1024 /* some HCs can do less */

Definition at line 134 of file ehci.h.

#define ehci_big_endian_capbase (   e)    0

Definition at line 647 of file ehci.h.

#define ehci_big_endian_mmio (   e)    0

Definition at line 646 of file ehci.h.

#define ehci_has_fsl_portno_bug (   e)    (0)

Definition at line 625 of file ehci.h.

#define EHCI_HRTIMER_NO_EVENT   99

Definition at line 94 of file ehci.h.

#define ehci_is_TDI (   e)    (0)

Definition at line 612 of file ehci.h.

#define EHCI_ISOC_ACTIVE   (1<<31) /* activate transfer this slot */

Definition at line 508 of file ehci.h.

#define EHCI_ISOC_BABBLE   (1<<29) /* babble detected */

Definition at line 510 of file ehci.h.

#define EHCI_ISOC_BUF_ERR   (1<<30) /* Data buffer error */

Definition at line 509 of file ehci.h.

#define EHCI_ISOC_XACTERR   (1<<28) /* XactErr - transaction error */

Definition at line 511 of file ehci.h.

#define EHCI_ITD_IOC   (1 << 15) /* interrupt on complete */

Definition at line 513 of file ehci.h.

#define EHCI_ITD_LENGTH (   tok)    (((tok)>>16) & 0x0fff)

Definition at line 512 of file ehci.h.

#define EHCI_LIST_END (   ehci)    cpu_to_hc32(ehci, 1) /* "null pointer" to hw */

Definition at line 314 of file ehci.h.

#define EHCI_MAX_ROOT_PORTS   15 /* see HCS_N_PORTS */

Definition at line 63 of file ehci.h.

#define ehci_port_speed (   ehci,
  portsc 
)    USB_PORT_STAT_HIGH_SPEED

Definition at line 614 of file ehci.h.

#define ehci_prepare_ports_for_controller_resume (   ehci)    ehci_adjust_port_wakeup_flags(ehci, false, false);

Definition at line 576 of file ehci.h.

#define ehci_prepare_ports_for_controller_suspend (   ehci,
  do_wakeup 
)    ehci_adjust_port_wakeup_flags(ehci, true, do_wakeup);

Definition at line 573 of file ehci.h.

#define HALT_BIT (   ehci)    cpu_to_hc32(ehci, QTD_STS_HALT)

Definition at line 305 of file ehci.h.

#define IS_SHORT_READ (   token)    (QTD_LENGTH (token) != 0 && QTD_PID (token) == 1)

Definition at line 290 of file ehci.h.

#define ITD_ACTIVE (   ehci)    cpu_to_hc32(ehci, EHCI_ISOC_ACTIVE)

Definition at line 515 of file ehci.h.

#define NO_FRAME   ((unsigned short)~0) /* pick new start */

Definition at line 400 of file ehci.h.

#define OHCI_CTRL_HCFS   (3 << 6)

Definition at line 202 of file ehci.h.

#define OHCI_HCCTRL_LEN   0x4

Definition at line 207 of file ehci.h.

#define OHCI_HCCTRL_OFFSET   0x4

Definition at line 206 of file ehci.h.

#define OHCI_USB_OPER   (2 << 6)

Definition at line 203 of file ehci.h.

#define OHCI_USB_SUSPEND   (3 << 6)

Definition at line 204 of file ehci.h.

#define Q_NEXT_TYPE (   ehci,
  dma 
)    ((dma) & cpu_to_hc32(ehci, 3 << 1))

Definition at line 295 of file ehci.h.

#define Q_TYPE_FSTN   (3 << 1)

Definition at line 308 of file ehci.h.

#define Q_TYPE_ITD   (0 << 1)

Definition at line 305 of file ehci.h.

#define Q_TYPE_QH   (1 << 1)

Definition at line 306 of file ehci.h.

#define Q_TYPE_SITD   (2 << 1)

Definition at line 307 of file ehci.h.

#define QH_CMASK   0x0000ff00

Definition at line 380 of file ehci.h.

#define QH_CONTROL_EP   (1 << 27) /* FS/LS control endpoint */

Definition at line 371 of file ehci.h.

#define QH_FULL_SPEED   (0 << 12)

Definition at line 376 of file ehci.h.

#define QH_HEAD   (1 << 15) /* Head of async reclamation list */

Definition at line 372 of file ehci.h.

#define QH_HIGH_SPEED   (2 << 12) /* Endpoint speed */

Definition at line 374 of file ehci.h.

#define QH_HUBADDR   0x007f0000

Definition at line 381 of file ehci.h.

#define QH_HUBPORT   0x3f800000

Definition at line 382 of file ehci.h.

#define QH_INACTIVATE   (1 << 7) /* Inactivate on next transaction */

Definition at line 377 of file ehci.h.

#define QH_LOW_SPEED   (1 << 12)

Definition at line 375 of file ehci.h.

#define QH_MULT   0xc0000000

Definition at line 383 of file ehci.h.

#define QH_NEXT (   ehci,
  dma 
)    (cpu_to_hc32(ehci, (((u32)dma)&~0x01f)|Q_TYPE_QH))

Definition at line 311 of file ehci.h.

#define QH_SMASK   0x000000ff

Definition at line 379 of file ehci.h.

#define QH_STATE_COMPLETING   5 /* don't touch token.HALT */

Definition at line 388 of file ehci.h.

#define QH_STATE_IDLE   3 /* HC doesn't see this */

Definition at line 386 of file ehci.h.

#define QH_STATE_LINKED   1 /* HC sees this */

Definition at line 384 of file ehci.h.

#define QH_STATE_UNLINK   2 /* HC may still see this */

Definition at line 385 of file ehci.h.

#define QH_STATE_UNLINK_WAIT   4 /* LINKED and on unlink q */

Definition at line 387 of file ehci.h.

#define QH_TOGGLE_CTL   (1 << 14) /* Data toggle control */

Definition at line 373 of file ehci.h.

#define QH_XACTERR_MAX   32 /* XactErr retry limit */

Definition at line 391 of file ehci.h.

#define QTD_CERR (   tok)    (((tok)>>10) & 0x3)

Definition at line 293 of file ehci.h.

#define QTD_IOC   (1 << 15) /* interrupt on complete */

Definition at line 292 of file ehci.h.

#define QTD_LENGTH (   tok)    (((tok)>>16) & 0x7fff)

Definition at line 291 of file ehci.h.

#define QTD_MASK (   ehci)    cpu_to_hc32 (ehci, ~0x1f)

Definition at line 288 of file ehci.h.

#define QTD_NEXT (   ehci,
  dma 
)    cpu_to_hc32(ehci, (u32)dma)

Definition at line 244 of file ehci.h.

#define QTD_PID (   tok)    (((tok)>>8) & 0x3)

Definition at line 294 of file ehci.h.

#define QTD_STS_ACTIVE   (1 << 7) /* HC may execute this */

Definition at line 295 of file ehci.h.

#define QTD_STS_BABBLE   (1 << 4) /* device was babbling (qtd halted) */

Definition at line 298 of file ehci.h.

#define QTD_STS_DBE   (1 << 5) /* data buffer error (in HC) */

Definition at line 297 of file ehci.h.

#define QTD_STS_HALT   (1 << 6) /* halted on error */

Definition at line 296 of file ehci.h.

#define QTD_STS_MMF   (1 << 2) /* incomplete split transaction */

Definition at line 300 of file ehci.h.

#define QTD_STS_PING   (1 << 0) /* issue PING? */

Definition at line 302 of file ehci.h.

#define QTD_STS_STS   (1 << 1) /* split transaction state */

Definition at line 301 of file ehci.h.

#define QTD_STS_XACT   (1 << 3) /* device gave illegal response */

Definition at line 299 of file ehci.h.

#define QTD_TOGGLE   (1 << 31) /* data toggle */

Definition at line 290 of file ehci.h.

#define SITD_ACTIVE (   ehci)    cpu_to_hc32(ehci, SITD_STS_ACTIVE)

Definition at line 565 of file ehci.h.

#define SITD_IOC   (1 << 31) /* interrupt on completion */

Definition at line 554 of file ehci.h.

#define SITD_LENGTH (   x)    (0x3ff & ((x)>>16))

Definition at line 556 of file ehci.h.

#define SITD_PAGE   (1 << 30) /* buffer 0/1 */

Definition at line 555 of file ehci.h.

#define SITD_STS_ACTIVE   (1 << 7) /* HC may execute this */

Definition at line 557 of file ehci.h.

#define SITD_STS_BABBLE   (1 << 4) /* device was babbling */

Definition at line 560 of file ehci.h.

#define SITD_STS_DBE   (1 << 5) /* data buffer error (in HC) */

Definition at line 559 of file ehci.h.

#define SITD_STS_ERR   (1 << 6) /* error from TT */

Definition at line 558 of file ehci.h.

#define SITD_STS_MMF   (1 << 2) /* incomplete split transaction */

Definition at line 562 of file ehci.h.

#define SITD_STS_STS   (1 << 1) /* split transaction state */

Definition at line 563 of file ehci.h.

#define SITD_STS_XACT   (1 << 3) /* illegal IN response */

Definition at line 561 of file ehci.h.

#define STATUS_BIT (   ehci)    cpu_to_hc32(ehci, QTD_STS_STS)

Definition at line 306 of file ehci.h.

#define STUB_DEBUG_FILES

Definition at line 782 of file ehci.h.

Enumeration Type Documentation

Enumerator:
EHCI_HRTIMER_POLL_ASS 
EHCI_HRTIMER_POLL_PSS 
EHCI_HRTIMER_POLL_DEAD 
EHCI_HRTIMER_UNLINK_INTR 
EHCI_HRTIMER_FREE_ITDS 
EHCI_HRTIMER_ASYNC_UNLINKS 
EHCI_HRTIMER_IAA_WATCHDOG 
EHCI_HRTIMER_DISABLE_PERIODIC 
EHCI_HRTIMER_DISABLE_ASYNC 
EHCI_HRTIMER_IO_WATCHDOG 
EHCI_HRTIMER_NUM_EVENTS 

Definition at line 81 of file ehci.h.

Enumerator:
EHCI_RH_HALTED 
EHCI_RH_SUSPENDED 
EHCI_RH_RUNNING 
EHCI_RH_STOPPING 

Definition at line 69 of file ehci.h.

Function Documentation

Variable Documentation

unsigned frame

Definition at line 529 of file ehci.h.

dma_addr_t fstn_dma

Definition at line 572 of file ehci.h.

union ehci_shadow fstn_next

Definition at line 573 of file ehci.h.

__le32 hw_alt_next

Definition at line 288 of file ehci.h.

__hc32 hw_backpointer

Definition at line 568 of file ehci.h.

__le32 hw_buf

Definition at line 308 of file ehci.h.

__le32 hw_buf_hi

Definition at line 309 of file ehci.h.

__hc32 hw_bufp[7]

Definition at line 517 of file ehci.h.

__hc32 hw_bufp_hi[7]

Definition at line 518 of file ehci.h.

__hc32 hw_current

Definition at line 384 of file ehci.h.

__hc32 hw_fullspeed_ep

Definition at line 551 of file ehci.h.

__hc32 hw_info1

Definition at line 370 of file ehci.h.

__hc32 hw_info2

Definition at line 378 of file ehci.h.

__le32 hw_next

Definition at line 287 of file ehci.h.

__hc32 hw_prev

Definition at line 569 of file ehci.h.

__hc32 hw_qtd_next

Definition at line 387 of file ehci.h.

__hc32 hw_results

Definition at line 553 of file ehci.h.

__le32 hw_token

Definition at line 289 of file ehci.h.

__hc32 hw_transaction[8]

Definition at line 507 of file ehci.h.

__hc32 hw_uframe

Definition at line 552 of file ehci.h.

unsigned index

Definition at line 531 of file ehci.h.

dma_addr_t itd_dma

Definition at line 521 of file ehci.h.

struct list_head itd_list

Definition at line 526 of file ehci.h.

union ehci_shadow itd_next

Definition at line 522 of file ehci.h.

size_t length

Definition at line 315 of file ehci.h.

unsigned pg

Definition at line 530 of file ehci.h.

dma_addr_t qtd_dma

Definition at line 312 of file ehci.h.

struct list_head qtd_list

Definition at line 313 of file ehci.h.

dma_addr_t sitd_dma

Definition at line 572 of file ehci.h.

struct list_head sitd_list

Definition at line 577 of file ehci.h.

union ehci_shadow sitd_next

Definition at line 573 of file ehci.h.

s32 stream

Definition at line 525 of file ehci.h.

struct urb * urb

Definition at line 314 of file ehci.h.