FreeBSD kernel usb device Code
ohcireg.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PCI_CBMEM   0x10 /* configuration base memory */
 
#define PCI_INTERFACE_OHCI   0x10
 
#define OHCI_REVISION   0x00 /* OHCI revision */
 
#define OHCI_REV_LO(rev)   ((rev) & 0xf)
 
#define OHCI_REV_HI(rev)   (((rev)>>4) & 0xf)
 
#define OHCI_REV_LEGACY(rev)   ((rev) & 0x100)
 
#define OHCI_CONTROL   0x04
 
#define OHCI_CBSR_MASK   0x00000003 /* Control/Bulk Service Ratio */
 
#define OHCI_RATIO_1_1   0x00000000
 
#define OHCI_RATIO_1_2   0x00000001
 
#define OHCI_RATIO_1_3   0x00000002
 
#define OHCI_RATIO_1_4   0x00000003
 
#define OHCI_PLE   0x00000004 /* Periodic List Enable */
 
#define OHCI_IE   0x00000008 /* Isochronous Enable */
 
#define OHCI_CLE   0x00000010 /* Control List Enable */
 
#define OHCI_BLE   0x00000020 /* Bulk List Enable */
 
#define OHCI_HCFS_MASK
 
#define OHCI_HCFS_RESET   0x00000000
 
#define OHCI_HCFS_RESUME   0x00000040
 
#define OHCI_HCFS_OPERATIONAL   0x00000080
 
#define OHCI_HCFS_SUSPEND   0x000000c0
 
#define OHCI_IR   0x00000100 /* Interrupt Routing */
 
#define OHCI_RWC   0x00000200 /* Remote Wakeup Connected */
 
#define OHCI_RWE   0x00000400 /* Remote Wakeup Enabled */
 
#define OHCI_COMMAND_STATUS   0x08
 
#define OHCI_HCR   0x00000001 /* Host Controller Reset */
 
#define OHCI_CLF   0x00000002 /* Control List Filled */
 
#define OHCI_BLF   0x00000004 /* Bulk List Filled */
 
#define OHCI_OCR   0x00000008 /* Ownership Change Request */
 
#define OHCI_SOC_MASK   0x00030000 /* Scheduling Overrun Count */
 
#define OHCI_INTERRUPT_STATUS   0x0c
 
#define OHCI_SO   0x00000001 /* Scheduling Overrun */
 
#define OHCI_WDH   0x00000002 /* Writeback Done Head */
 
#define OHCI_SF   0x00000004 /* Start of Frame */
 
#define OHCI_RD   0x00000008 /* Resume Detected */
 
#define OHCI_UE   0x00000010 /* Unrecoverable Error */
 
#define OHCI_FNO   0x00000020 /* Frame Number Overflow */
 
#define OHCI_RHSC   0x00000040 /* Root Hub Status Change */
 
#define OHCI_OC   0x40000000 /* Ownership Change */
 
#define OHCI_MIE   0x80000000 /* Master Interrupt Enable */
 
#define OHCI_INTERRUPT_ENABLE   0x10
 
#define OHCI_INTERRUPT_DISABLE   0x14
 
#define OHCI_HCCA   0x18
 
#define OHCI_PERIOD_CURRENT_ED   0x1c
 
#define OHCI_CONTROL_HEAD_ED   0x20
 
#define OHCI_CONTROL_CURRENT_ED   0x24
 
#define OHCI_BULK_HEAD_ED   0x28
 
#define OHCI_BULK_CURRENT_ED   0x2c
 
#define OHCI_DONE_HEAD   0x30
 
#define OHCI_FM_INTERVAL   0x34
 
#define OHCI_GET_IVAL(s)   ((s) & 0x3fff)
 
#define OHCI_GET_FSMPS(s)   (((s) >> 16) & 0x7fff)
 
#define OHCI_FIT   0x80000000
 
#define OHCI_FM_REMAINING   0x38
 
#define OHCI_FM_NUMBER   0x3c
 
#define OHCI_PERIODIC_START   0x40
 
#define OHCI_LS_THRESHOLD   0x44
 
#define OHCI_RH_DESCRIPTOR_A   0x48
 
#define OHCI_GET_NDP(s)   ((s) & 0xff)
 
#define OHCI_PSM   0x0100 /* Power Switching Mode */
 
#define OHCI_NPS   0x0200 /* No Power Switching */
 
#define OHCI_DT   0x0400 /* Device Type */
 
#define OHCI_OCPM   0x0800 /* Overcurrent Protection Mode */
 
#define OHCI_NOCP   0x1000 /* No Overcurrent Protection */
 
#define OHCI_GET_POTPGT(s)   ((s) >> 24)
 
#define OHCI_RH_DESCRIPTOR_B   0x4c
 
#define OHCI_RH_STATUS   0x50
 
#define OHCI_LPS   0x00000001 /* Local Power Status */
 
#define OHCI_OCI   0x00000002 /* OverCurrent Indicator */
 
#define OHCI_DRWE   0x00008000 /* Device Remote Wakeup Enable */
 
#define OHCI_LPSC   0x00010000 /* Local Power Status Change */
 
#define OHCI_CCIC
 
#define OHCI_CRWE   0x80000000 /* Clear Remote Wakeup Enable */
 
#define OHCI_RH_PORT_STATUS(n)   (0x50 + ((n)*4)) /* 1 based indexing */
 
#define OHCI_LES   (OHCI_PLE | OHCI_IE | OHCI_CLE | OHCI_BLE)
 
#define OHCI_ALL_INTRS
 
#define OHCI_NORMAL_INTRS   (OHCI_WDH | OHCI_RD | OHCI_UE | OHCI_RHSC)
 
#define OHCI_FSMPS(i)   (((i-210)*6/7) << 16)
 
#define OHCI_PERIODIC(i)   ((i)*9/10)
 

Macro Definition Documentation

◆ OHCI_ALL_INTRS

#define OHCI_ALL_INTRS
Value:
OHCI_RD | OHCI_UE | OHCI_FNO | \
OHCI_RHSC | OHCI_OC)
#define OHCI_WDH
Definition: ohcireg.h:72
#define OHCI_UE
Definition: ohcireg.h:75
#define OHCI_OC
Definition: ohcireg.h:78
#define OHCI_SO
Definition: ohcireg.h:71
#define OHCI_SF
Definition: ohcireg.h:73
#define OHCI_FNO
Definition: ohcireg.h:76

Definition at line 116 of file ohcireg.h.

◆ OHCI_BLE

#define OHCI_BLE   0x00000020 /* Bulk List Enable */

Definition at line 55 of file ohcireg.h.

◆ OHCI_BLF

#define OHCI_BLF   0x00000004 /* Bulk List Filled */

Definition at line 67 of file ohcireg.h.

◆ OHCI_BULK_CURRENT_ED

#define OHCI_BULK_CURRENT_ED   0x2c

Definition at line 87 of file ohcireg.h.

◆ OHCI_BULK_HEAD_ED

#define OHCI_BULK_HEAD_ED   0x28

Definition at line 86 of file ohcireg.h.

◆ OHCI_CBSR_MASK

#define OHCI_CBSR_MASK   0x00000003 /* Control/Bulk Service Ratio */

Definition at line 47 of file ohcireg.h.

◆ OHCI_CCIC

#define OHCI_CCIC
Value:
0x00020000 /* OverCurrent Indicator
* Change */

Definition at line 111 of file ohcireg.h.

◆ OHCI_CLE

#define OHCI_CLE   0x00000010 /* Control List Enable */

Definition at line 54 of file ohcireg.h.

◆ OHCI_CLF

#define OHCI_CLF   0x00000002 /* Control List Filled */

Definition at line 66 of file ohcireg.h.

◆ OHCI_COMMAND_STATUS

#define OHCI_COMMAND_STATUS   0x08

Definition at line 64 of file ohcireg.h.

◆ OHCI_CONTROL

#define OHCI_CONTROL   0x04

Definition at line 46 of file ohcireg.h.

◆ OHCI_CONTROL_CURRENT_ED

#define OHCI_CONTROL_CURRENT_ED   0x24

Definition at line 85 of file ohcireg.h.

◆ OHCI_CONTROL_HEAD_ED

#define OHCI_CONTROL_HEAD_ED   0x20

Definition at line 84 of file ohcireg.h.

◆ OHCI_CRWE

#define OHCI_CRWE   0x80000000 /* Clear Remote Wakeup Enable */

Definition at line 112 of file ohcireg.h.

◆ OHCI_DONE_HEAD

#define OHCI_DONE_HEAD   0x30

Definition at line 88 of file ohcireg.h.

◆ OHCI_DRWE

#define OHCI_DRWE   0x00008000 /* Device Remote Wakeup Enable */

Definition at line 109 of file ohcireg.h.

◆ OHCI_DT

#define OHCI_DT   0x0400 /* Device Type */

Definition at line 101 of file ohcireg.h.

◆ OHCI_FIT

#define OHCI_FIT   0x80000000

Definition at line 92 of file ohcireg.h.

◆ OHCI_FM_INTERVAL

#define OHCI_FM_INTERVAL   0x34

Definition at line 89 of file ohcireg.h.

◆ OHCI_FM_NUMBER

#define OHCI_FM_NUMBER   0x3c

Definition at line 94 of file ohcireg.h.

◆ OHCI_FM_REMAINING

#define OHCI_FM_REMAINING   0x38

Definition at line 93 of file ohcireg.h.

◆ OHCI_FNO

#define OHCI_FNO   0x00000020 /* Frame Number Overflow */

Definition at line 76 of file ohcireg.h.

◆ OHCI_FSMPS

#define OHCI_FSMPS (   i)    (((i-210)*6/7) << 16)

Definition at line 121 of file ohcireg.h.

◆ OHCI_GET_FSMPS

#define OHCI_GET_FSMPS (   s)    (((s) >> 16) & 0x7fff)

Definition at line 91 of file ohcireg.h.

◆ OHCI_GET_IVAL

#define OHCI_GET_IVAL (   s)    ((s) & 0x3fff)

Definition at line 90 of file ohcireg.h.

◆ OHCI_GET_NDP

#define OHCI_GET_NDP (   s)    ((s) & 0xff)

Definition at line 98 of file ohcireg.h.

◆ OHCI_GET_POTPGT

#define OHCI_GET_POTPGT (   s)    ((s) >> 24)

Definition at line 104 of file ohcireg.h.

◆ OHCI_HCCA

#define OHCI_HCCA   0x18

Definition at line 82 of file ohcireg.h.

◆ OHCI_HCFS_MASK

#define OHCI_HCFS_MASK
Value:
0x000000c0 /* HostControllerFunctionalStat
* e */

Definition at line 56 of file ohcireg.h.

◆ OHCI_HCFS_OPERATIONAL

#define OHCI_HCFS_OPERATIONAL   0x00000080

Definition at line 59 of file ohcireg.h.

◆ OHCI_HCFS_RESET

#define OHCI_HCFS_RESET   0x00000000

Definition at line 57 of file ohcireg.h.

◆ OHCI_HCFS_RESUME

#define OHCI_HCFS_RESUME   0x00000040

Definition at line 58 of file ohcireg.h.

◆ OHCI_HCFS_SUSPEND

#define OHCI_HCFS_SUSPEND   0x000000c0

Definition at line 60 of file ohcireg.h.

◆ OHCI_HCR

#define OHCI_HCR   0x00000001 /* Host Controller Reset */

Definition at line 65 of file ohcireg.h.

◆ OHCI_IE

#define OHCI_IE   0x00000008 /* Isochronous Enable */

Definition at line 53 of file ohcireg.h.

◆ OHCI_INTERRUPT_DISABLE

#define OHCI_INTERRUPT_DISABLE   0x14

Definition at line 81 of file ohcireg.h.

◆ OHCI_INTERRUPT_ENABLE

#define OHCI_INTERRUPT_ENABLE   0x10

Definition at line 80 of file ohcireg.h.

◆ OHCI_INTERRUPT_STATUS

#define OHCI_INTERRUPT_STATUS   0x0c

Definition at line 70 of file ohcireg.h.

◆ OHCI_IR

#define OHCI_IR   0x00000100 /* Interrupt Routing */

Definition at line 61 of file ohcireg.h.

◆ OHCI_LES

#define OHCI_LES   (OHCI_PLE | OHCI_IE | OHCI_CLE | OHCI_BLE)

Definition at line 115 of file ohcireg.h.

◆ OHCI_LPS

#define OHCI_LPS   0x00000001 /* Local Power Status */

Definition at line 107 of file ohcireg.h.

◆ OHCI_LPSC

#define OHCI_LPSC   0x00010000 /* Local Power Status Change */

Definition at line 110 of file ohcireg.h.

◆ OHCI_LS_THRESHOLD

#define OHCI_LS_THRESHOLD   0x44

Definition at line 96 of file ohcireg.h.

◆ OHCI_MIE

#define OHCI_MIE   0x80000000 /* Master Interrupt Enable */

Definition at line 79 of file ohcireg.h.

◆ OHCI_NOCP

#define OHCI_NOCP   0x1000 /* No Overcurrent Protection */

Definition at line 103 of file ohcireg.h.

◆ OHCI_NORMAL_INTRS

#define OHCI_NORMAL_INTRS   (OHCI_WDH | OHCI_RD | OHCI_UE | OHCI_RHSC)

Definition at line 119 of file ohcireg.h.

◆ OHCI_NPS

#define OHCI_NPS   0x0200 /* No Power Switching */

Definition at line 100 of file ohcireg.h.

◆ OHCI_OC

#define OHCI_OC   0x40000000 /* Ownership Change */

Definition at line 78 of file ohcireg.h.

◆ OHCI_OCI

#define OHCI_OCI   0x00000002 /* OverCurrent Indicator */

Definition at line 108 of file ohcireg.h.

◆ OHCI_OCPM

#define OHCI_OCPM   0x0800 /* Overcurrent Protection Mode */

Definition at line 102 of file ohcireg.h.

◆ OHCI_OCR

#define OHCI_OCR   0x00000008 /* Ownership Change Request */

Definition at line 68 of file ohcireg.h.

◆ OHCI_PERIOD_CURRENT_ED

#define OHCI_PERIOD_CURRENT_ED   0x1c

Definition at line 83 of file ohcireg.h.

◆ OHCI_PERIODIC

#define OHCI_PERIODIC (   i)    ((i)*9/10)

Definition at line 122 of file ohcireg.h.

◆ OHCI_PERIODIC_START

#define OHCI_PERIODIC_START   0x40

Definition at line 95 of file ohcireg.h.

◆ OHCI_PLE

#define OHCI_PLE   0x00000004 /* Periodic List Enable */

Definition at line 52 of file ohcireg.h.

◆ OHCI_PSM

#define OHCI_PSM   0x0100 /* Power Switching Mode */

Definition at line 99 of file ohcireg.h.

◆ OHCI_RATIO_1_1

#define OHCI_RATIO_1_1   0x00000000

Definition at line 48 of file ohcireg.h.

◆ OHCI_RATIO_1_2

#define OHCI_RATIO_1_2   0x00000001

Definition at line 49 of file ohcireg.h.

◆ OHCI_RATIO_1_3

#define OHCI_RATIO_1_3   0x00000002

Definition at line 50 of file ohcireg.h.

◆ OHCI_RATIO_1_4

#define OHCI_RATIO_1_4   0x00000003

Definition at line 51 of file ohcireg.h.

◆ OHCI_RD

#define OHCI_RD   0x00000008 /* Resume Detected */

Definition at line 74 of file ohcireg.h.

◆ OHCI_REV_HI

#define OHCI_REV_HI (   rev)    (((rev)>>4) & 0xf)

Definition at line 44 of file ohcireg.h.

◆ OHCI_REV_LEGACY

#define OHCI_REV_LEGACY (   rev)    ((rev) & 0x100)

Definition at line 45 of file ohcireg.h.

◆ OHCI_REV_LO

#define OHCI_REV_LO (   rev)    ((rev) & 0xf)

Definition at line 43 of file ohcireg.h.

◆ OHCI_REVISION

#define OHCI_REVISION   0x00 /* OHCI revision */

Definition at line 42 of file ohcireg.h.

◆ OHCI_RH_DESCRIPTOR_A

#define OHCI_RH_DESCRIPTOR_A   0x48

Definition at line 97 of file ohcireg.h.

◆ OHCI_RH_DESCRIPTOR_B

#define OHCI_RH_DESCRIPTOR_B   0x4c

Definition at line 105 of file ohcireg.h.

◆ OHCI_RH_PORT_STATUS

#define OHCI_RH_PORT_STATUS (   n)    (0x50 + ((n)*4)) /* 1 based indexing */

Definition at line 113 of file ohcireg.h.

◆ OHCI_RH_STATUS

#define OHCI_RH_STATUS   0x50

Definition at line 106 of file ohcireg.h.

◆ OHCI_RHSC

#define OHCI_RHSC   0x00000040 /* Root Hub Status Change */

Definition at line 77 of file ohcireg.h.

◆ OHCI_RWC

#define OHCI_RWC   0x00000200 /* Remote Wakeup Connected */

Definition at line 62 of file ohcireg.h.

◆ OHCI_RWE

#define OHCI_RWE   0x00000400 /* Remote Wakeup Enabled */

Definition at line 63 of file ohcireg.h.

◆ OHCI_SF

#define OHCI_SF   0x00000004 /* Start of Frame */

Definition at line 73 of file ohcireg.h.

◆ OHCI_SO

#define OHCI_SO   0x00000001 /* Scheduling Overrun */

Definition at line 71 of file ohcireg.h.

◆ OHCI_SOC_MASK

#define OHCI_SOC_MASK   0x00030000 /* Scheduling Overrun Count */

Definition at line 69 of file ohcireg.h.

◆ OHCI_UE

#define OHCI_UE   0x00000010 /* Unrecoverable Error */

Definition at line 75 of file ohcireg.h.

◆ OHCI_WDH

#define OHCI_WDH   0x00000002 /* Writeback Done Head */

Definition at line 72 of file ohcireg.h.

◆ PCI_CBMEM

#define PCI_CBMEM   0x10 /* configuration base memory */

Definition at line 38 of file ohcireg.h.

◆ PCI_INTERFACE_OHCI

#define PCI_INTERFACE_OHCI   0x10

Definition at line 39 of file ohcireg.h.