26#ifndef _ULTIBO_DWCOTG_H
27#define _ULTIBO_DWCOTG_H
37#define DWCOTG_USBHOST_DESCRIPTION "DWCOTG USB Host"
39#define DWC_MAX_CHANNELS 16
41#define DWC_SCHEDULER_MAILSLOT_SIZE SIZE_1K
43#define DWC_SCHEDULER_THREAD_STACK_SIZE SIZE_32K
44#define DWC_SCHEDULER_THREAD_PRIORITY THREAD_PRIORITY_HIGHEST
46#define DWC_SCHEDULER_THREAD_NAME "DWC Transfer Scheduler"
48#define DWC_COMPLETION_THREAD_STACK_SIZE SIZE_32K
49#define DWC_COMPLETION_THREAD_PRIORITY THREAD_PRIORITY_HIGHEST
51#define DWC_COMPLETION_THREAD_NAME "DWC Transfer Completion"
53#define DWC_RESUBMIT_THREAD_STACK_SIZE SIZE_32K
54#define DWC_RESUBMIT_THREAD_PRIORITY THREAD_PRIORITY_CRITICAL
56#define DWC_RESUBMIT_THREAD_NAME "DWC Transfer Resubmit"
59#define DWC_USB_PID_DATA0 0
60#define DWC_USB_PID_DATA1 2
61#define DWC_USB_PID_DATA2 1
62#define DWC_USB_PID_SETUP 3
63#define DWC_USB_PID_MDATA 3
66#define DWC_RECEIVE_WORDS 1024
67#define DWC_TRANSMIT_WORDS 1024
68#define DWC_PERIODIC_TRANSMIT_WORDS 1024
71#define DWC_STATUS_SUCCESS 0
72#define DWC_STATUS_STALLED 1
73#define DWC_STATUS_FAILED 2
74#define DWC_STATUS_TRANSFER_RESUBMIT 3
75#define DWC_STATUS_TRANSFER_RESTART 4
76#define DWC_STATUS_TRANSACTION_RESTART 5
77#define DWC_STATUS_HOST_PORT_CHANGE 6
78#define DWC_STATUS_ROOT_HUB_REQUEST 7
79#define DWC_STATUS_INVALID 8
80#define DWC_STATUS_CANCELLED 9
83#define DWC_SPLIT_ERROR_RETRIES 3
84#define DWC_COMPLETE_SPLIT_RETRIES 10
88#define DWC_OTG_CTRL_HST_SET_HNP_EN (1 << 10)
92#define DWC_AHB_INTERRUPT_ENABLE (1 << 0)
95#define BCM_DWC_AHB_AXI_BURST_MASK (3 << 1)
97#define BCM_DWC_AHB_AXI_WAIT (1 << 4)
99#define DWC_AHB_DMA_ENABLE (1 << 5)
101#define DWC_AHB_MASTER_IDLE (1 << 31)
104#define DWC_USB_CFG_TOUTCAL_MASK (7 << 0)
105#define DWC_USB_CFG_TOUTCAL_LIMIT (7 << 0)
106#define DWC_USB_CFG_PHYIF16 (1 << 3)
107#define DWC_USB_CFG_ULPI_UTMI_SEL (1 << 4)
108#define DWC_USB_CFG_FS_INTF (1 << 5)
109#define DWC_USB_CFG_PHY_SEL (1 << 6)
110#define DWC_USB_CFG_DDR_SEL (1 << 7)
111#define DWC_USB_CFG_SRP_CAPABLE (1 << 8)
112#define DWC_USB_CFG_HNP_CAPABLE (1 << 9)
113#define DWC_USB_CFG_USB_TRDTIM_MASK (0xF << 10)
114#define DWC_USB_CFG_RESERVED14 (1 << 14)
115#define DWC_USB_CFG_PHY_LOW_PWR_CLK_SEL (1 << 15)
116#define DWC_USB_CFG_OTG_UTMI_FS_SEL (1 << 16)
117#define DWC_USB_CFG_ULPI_FSLS (1 << 17)
118#define DWC_USB_CFG_ULPI_AUTO_RES (1 << 18)
119#define DWC_USB_CFG_ULPI_CLK_SUS_M (1 << 19)
120#define DWC_USB_CFG_ULPI_EXT_VBUS_DRV (1 << 20)
121#define DWC_USB_CFG_ULPI_INT_VBUS_INDICATOR (1 << 21)
122#define DWC_USB_CFG_TERM_SEL_DL_PULSE (1 << 22)
123#define DWC_USB_CFG_INDICATOR_COMPLEMENT (1 << 23)
124#define DWC_USB_CFG_INDICATOR_PASS_THROUGH (1 << 24)
125#define DWC_USB_CFG_ULPI_INT_PROT_DIS (1 << 25)
126#define DWC_USB_CFG_IC_USB_CAP (1 << 26)
127#define DWC_USB_CFG_IC_TRAFFIC_PULL_REMOVE (1 << 27)
128#define DWC_USB_CFG_TX_END_DELAY (1 << 28)
129#define DWC_USB_CFG_FORCE_HOST_MODE (1 << 29)
130#define DWC_USB_CFG_FORCE_DEV_MODE (1 << 30)
131#define DWC_USB_CFG_RESERVED31 (1 << 31)
135#define DWC_SOFT_RESET (1 << 0)
141#define DWC_CORE_INTERRUPTS_SOF_INTR (1 << 3)
144#define DWC_CORE_INTERRUPTS_PORT_INTR (1 << 24)
147#define DWC_CORE_INTERRUPTS_HOST_CHANNEL_INTR (1 << 25)
149#define DWC_CORE_INTERRUPTS_DISCONNECT (1 << 29)
152#define DWC_VENDOR_ID_OTG2 0x4f542000
153#define DWC_VENDOR_ID_OTG3 0x4f543000
155#define DWC_VENDOR_ID_MASK 0xfffff000
158#define DWC_HWCFG2_OP_MODE_MASK (7 << 0)
159#define DWC_HWCFG2_OP_MODE_HNP_SRP_CAPABLE_OTG (0 << 0)
160#define DWC_HWCFG2_OP_MODE_SRP_ONLY_CAPABLE_OTG (1 << 0)
161#define DWC_HWCFG2_OP_MODE_NO_HNP_SRP_CAPABLE_OTG (2 << 0)
162#define DWC_HWCFG2_OP_MODE_SRP_CAPABLE_DEVICE (3 << 0)
163#define DWC_HWCFG2_OP_MODE_NO_SRP_CAPABLE_DEVICE (4 << 0)
164#define DWC_HWCFG2_OP_MODE_SRP_CAPABLE_HOST (5 << 0)
165#define DWC_HWCFG2_OP_MODE_NO_SRP_CAPABLE_HOST (6 << 0)
167#define DWC_HWCFG2_ARCHITECTURE_MASK (3 << 3)
168#define DWC_HWCFG2_ARCHITECTURE_SLAVE_ONLY (0 << 3)
169#define DWC_HWCFG2_ARCHITECTURE_EXT_DMA (1 << 3)
170#define DWC_HWCFG2_ARCHITECTURE_INT_DMA (2 << 3)
172#define DWC_HWCFG2_POINT2POINT (1 << 5)
174#define DWC_HWCFG2_HS_PHY_TYPE_MASK (3 << 6)
175#define DWC_HWCFG2_HS_PHY_TYPE_NOT_SUPPORTED (0 << 6)
176#define DWC_HWCFG2_HS_PHY_TYPE_UTMI (1 << 6)
177#define DWC_HWCFG2_HS_PHY_TYPE_ULPI (2 << 6)
178#define DWC_HWCFG2_HS_PHY_TYPE_UTMI_ULPI (3 << 6)
180#define DWC_HWCFG2_FS_PHY_TYPE_MASK (3 << 8)
181#define DWC_HWCFG2_FS_PHY_TYPE_NOT_SUPPORTED (0 << 8)
182#define DWC_HWCFG2_FS_PHY_TYPE_DEDICATED (1 << 8)
183#define DWC_HWCFG2_FS_PHY_TYPE_SHARED_UTMI (2 << 8)
184#define DWC_HWCFG2_FS_PHY_TYPE_SHARED_ULPI (3 << 8)
186#define DWC_HWCFG2_NUM_DEV_ENDPOINTS (0xF << 10)
187#define DWC_HWCFG2_NUM_HOST_CHANNELS (0xF << 14)
189#define DWC_HWCFG2_PERIODIC_ENDPOINT_SUPPORTED (1 << 18)
190#define DWC_HWCFG2_DYNAMIC_FIFO (1 << 19)
191#define DWC_HWCFG2_MULTI_PROC_INT (1 << 20)
192#define DWC_HWCFG2_RESERVED21 (1 << 21)
193#define DWC_HWCFG2_NON_PERIODIC_TX_QUEUE_DEPTH (3 << 22)
194#define DWC_HWCFG2_HOST_PERIODIC_TX_QUEUE_DEPTH (3 << 24)
195#define DWC_HWCFG2_DEV_TOKEN_QUEUE_DEPTH (0x1F << 26)
196#define DWC_HWCFG2_OTG_ENABLE_IC_USB (1 << 31)
199#define DWC_HCFG_FS_LS_PHY_CLK_SEL_MASK (3 << 0)
200#define DWC_HCFG_FS_LS_PHY_CLK_SEL_SHIFT 0
201#define DWC_HCFG_FS_LS_PHY_CLK_SEL_30_60_MHZ 0
202#define DWC_HCFG_FS_LS_PHY_CLK_SEL_48_MHZ 1
203#define DWC_HCFG_FS_LS_PHY_CLK_SEL_6_MHZ 2
205#define DWC_HCFG_FS_LS_SUPPORT_ONLY (1 << 2)
207#define DWC_HCFG_ENABLE_32KHZ (1 << 7)
209#define DWC_HCFG_RESUME_VALID_MASK (0xFF << 8)
210#define DWC_HCFG_RESUME_VALID_SHIFT 8
212#define DWC_HCFG_DESC_DMA (1 << 23)
214#define DWC_HCFG_FRAME_LIST_ENTRIES_MASK (3 << 24)
215#define DWC_HCFG_FRAME_LIST_ENTRIES_SHIFT 24
216#define DWC_HCFG_FRAME_LIST_ENTRIES_8 (0 << 24)
217#define DWC_HCFG_FRAME_LIST_ENTRIES_8_SIZE 8
218#define DWC_HCFG_FRAME_LIST_ENTRIES_16 (1 << 24)
219#define DWC_HCFG_FRAME_LIST_ENTRIES_16_SIZE 16
220#define DWC_HCFG_FRAME_LIST_ENTRIES_32 (3 << 24)
221#define DWC_HCFG_FRAME_LIST_ENTRIES_32_SIZE 32
222#define DWC_HCFG_FRAME_LIST_ENTRIES_64 (3 << 24)
223#define DWC_HCFG_FRAME_LIST_ENTRIES_64_SIZE 64
225#define DWC_HCFG_PERSCHED_ENA (1 << 26)
226#define DWC_HCFG_MODE_CH_TIM_EN (1 << 31)
229#define DWC_HFIR_FRAME_INTERVAL_MASK (0xFFFF << 0)
230#define DWC_HFIR_FRAME_INT_RELOAD_CTL (1 << 16)
231#define DWC_HFIR_RESERVED1 (0xFFFE << 17)
234#define DWC_HFNUM_FRAME_NUMBER_MASK 0xFFFF
241#define DWC_HOST_PORT_CTRLSTATUS_CONNECTED (1 << 0)
244#define DWC_HOST_PORT_CTRLSTATUS_CONNECTED_CHANGED (1 << 1)
246#define DWC_HOST_PORT_CTRLSTATUS_ENABLED (1 << 2)
249#define DWC_HOST_PORT_CTRLSTATUS_ENABLED_CHANGED (1 << 3)
251#define DWC_HOST_PORT_CTRLSTATUS_OVERCURRENT (1 << 4)
254#define DWC_HOST_PORT_CTRLSTATUS_OVERCURRENT_CHANGED (1 << 5)
256#define DWC_HOST_PORT_CTRLSTATUS_RESUME (1 << 6)
258#define DWC_HOST_PORT_CTRLSTATUS_SUSPENDED (1 << 7)
260#define DWC_HOST_PORT_CTRLSTATUS_RESET (1 << 8)
261#define DWC_HOST_PORT_CTRLSTATUS_RESERVED (1 << 9)
263#define DWC_HOST_PORT_CTRLSTATUS_LINE_STATUS (3 << 10)
265#define DWC_HOST_PORT_CTRLSTATUS_POWERED (1 << 12)
266#define DWC_HOST_PORT_CTRLSTATUS_TEST_CONTROL (0x0F << 13)
268#define DWC_HOST_PORT_CTRLSTATUS_SPEED (3 << 17)
269#define DWC_HOST_PORT_CTRLSTATUS_RESERVED2 (0x1FFF << 19)
276#define DWC_HOST_CHANNEL_CHARACTERISTICS_MAX_PACKET_SIZE (0x7FF << 0)
278#define DWC_HOST_CHANNEL_CHARACTERISTICS_ENDPOINT_NUMBER (0x0F << 11)
280#define DWC_HOST_CHANNEL_CHARACTERISTICS_ENDPOINT_DIRECTION (1 << 15)
281#define DWC_HOST_CHANNEL_CHARACTERISTICS_RESERVED (1 << 16)
283#define DWC_HOST_CHANNEL_CHARACTERISTICS_LOWSPEED (1 << 17)
285#define DWC_HOST_CHANNEL_CHARACTERISTICS_ENDPOINT_TYPE (3 << 18)
288#define DWC_HOST_CHANNEL_CHARACTERISTICS_PACKETS_PER_FRAME (3 << 20)
290#define DWC_HOST_CHANNEL_CHARACTERISTICS_DEVICE_ADDRESS (0x7F << 22)
293#define DWC_HOST_CHANNEL_CHARACTERISTICS_ODD_FRAME (1 << 29)
295#define DWC_HOST_CHANNEL_CHARACTERISTICS_CHANNEL_DISABLE (1 << 30)
298#define DWC_HOST_CHANNEL_CHARACTERISTICS_CHANNEL_ENABLE (1 << 31)
305#define DWC_HOST_CHANNEL_SPLIT_CONTROL_PORT_ADDRESS (0x7F << 0)
309#define DWC_HOST_CHANNEL_SPLIT_CONTROL_HUB_ADDRESS (0x7F << 7)
311#define DWC_HOST_CHANNEL_SPLIT_CONTROL_TRANSACTION_POSITION (3 << 14)
314#define DWC_HOST_CHANNEL_SPLIT_CONTROL_COMPLETE_SPLIT (1 << 16)
315#define DWC_HOST_CHANNEL_SPLIT_CONTROL_RESERVED (0x3FFF << 17)
317#define DWC_HOST_CHANNEL_SPLIT_CONTROL_SPLIT_ENABLE (1 << 31)
331#define DWC_HOST_CHANNEL_INTERRUPTS_TRANSFER_COMPLETED (1 << 0)
342#define DWC_HOST_CHANNEL_INTERRUPTS_CHANNEL_HALTED (1 << 1)
344#define DWC_HOST_CHANNEL_INTERRUPTS_AHB_ERROR (1 << 2)
346#define DWC_HOST_CHANNEL_INTERRUPTS_STALL_RESPONSE_RECEIVED (1 << 3)
351#define DWC_HOST_CHANNEL_INTERRUPTS_NAK_RESPONSE_RECEIVED (1 << 4)
353#define DWC_HOST_CHANNEL_INTERRUPTS_ACK_RESPONSE_RECEIVED (1 << 5)
355#define DWC_HOST_CHANNEL_INTERRUPTS_NYET_RESPONSE_RECEIVED (1 << 6)
357#define DWC_HOST_CHANNEL_INTERRUPTS_TRANSACTION_ERROR (1 << 7)
359#define DWC_HOST_CHANNEL_INTERRUPTS_BABBLE_ERROR (1 << 8)
361#define DWC_HOST_CHANNEL_INTERRUPTS_FRAME_OVERRUN (1 << 9)
363#define DWC_HOST_CHANNEL_INTERRUPTS_DATA_TOGGLE_ERROR (1 << 10)
364#define DWC_HOST_CHANNEL_INTERRUPTS_BUFFER_NOT_AVAILABLE (1 << 11)
365#define DWC_HOST_CHANNEL_INTERRUPTS_EXCESS_TRANSACTION_ERROR (1 << 12)
366#define DWC_HOST_CHANNEL_INTERRUPTS_FRAME_LIST_ROLLOVER (1 << 13)
367#define DWC_HOST_CHANNEL_INTERRUPTS_RESERVED (0x3FFFF << 14)
371#define DWC_HOST_CHANNEL_INTERRUPT_MASK_TRANSFER_COMPLETED DWC_HOST_CHANNEL_INTERRUPTS_TRANSFER_COMPLETED
372#define DWC_HOST_CHANNEL_INTERRUPT_MASK_CHANNEL_HALTED DWC_HOST_CHANNEL_INTERRUPTS_CHANNEL_HALTED
373#define DWC_HOST_CHANNEL_INTERRUPT_MASK_AHB_ERROR DWC_HOST_CHANNEL_INTERRUPTS_AHB_ERROR
374#define DWC_HOST_CHANNEL_INTERRUPT_MASK_STALL_RESPONSE_RECEIVED DWC_HOST_CHANNEL_INTERRUPTS_STALL_RESPONSE_RECEIVED
375#define DWC_HOST_CHANNEL_INTERRUPT_MASK_NAK_RESPONSE_RECEIVED DWC_HOST_CHANNEL_INTERRUPTS_NAK_RESPONSE_RECEIVED
376#define DWC_HOST_CHANNEL_INTERRUPT_MASK_ACK_RESPONSE_RECEIVED DWC_HOST_CHANNEL_INTERRUPTS_ACK_RESPONSE_RECEIVED
377#define DWC_HOST_CHANNEL_INTERRUPT_MASK_NYET_RESPONSE_RECEIVED DWC_HOST_CHANNEL_INTERRUPTS_NYET_RESPONSE_RECEIVED
378#define DWC_HOST_CHANNEL_INTERRUPT_MASK_TRANSACTION_ERROR DWC_HOST_CHANNEL_INTERRUPTS_TRANSACTION_ERROR
379#define DWC_HOST_CHANNEL_INTERRUPT_MASK_BABBLE_ERROR DWC_HOST_CHANNEL_INTERRUPTS_BABBLE_ERROR
380#define DWC_HOST_CHANNEL_INTERRUPT_MASK_FRAME_OVERRUN DWC_HOST_CHANNEL_INTERRUPTS_FRAME_OVERRUN
381#define DWC_HOST_CHANNEL_INTERRUPT_MASK_DATA_TOGGLE_ERROR DWC_HOST_CHANNEL_INTERRUPTS_DATA_TOGGLE_ERROR
382#define DWC_HOST_CHANNEL_INTERRUPT_MASK_BUFFER_NOT_AVAILABLE DWC_HOST_CHANNEL_INTERRUPTS_BUFFER_NOT_AVAILABLE
383#define DWC_HOST_CHANNEL_INTERRUPT_MASK_EXCESS_TRANSACTION_ERROR DWC_HOST_CHANNEL_INTERRUPTS_EXCESS_TRANSACTION_ERROR
384#define DWC_HOST_CHANNEL_INTERRUPT_MASK_FRAME_LIST_ROLLOVER DWC_HOST_CHANNEL_INTERRUPTS_FRAME_LIST_ROLLOVER
385#define DWC_HOST_CHANNEL_INTERRUPT_MASK_RESERVED DWC_HOST_CHANNEL_INTERRUPTS_RESERVED
397#define DWC_HOST_CHANNEL_TRANSFER_SIZE (0x7FFFF << 0)
402#define DWC_HOST_CHANNEL_TRANSFER_PACKET_COUNT (0x3FF << 19)
410#define DWC_HOST_CHANNEL_TRANSFER_PACKET_ID (0x03 << 29)
412#define DWC_HOST_CHANNEL_TRANSFER_DO_PING (1 << 31)
uint32_t STDCALL dwc_host_destroy(USB_HOST *host)
Stop, deregister and destroy a DWCOTG USB host created by this driver.
#define DWC_MAX_CHANNELS
Maximum number of DWC host channels.
Definition dwcotg.h:39
struct _DWC_REGISTERS DWC_REGISTERS
Definition dwcotg.h:476
struct _DWC_HOST_CHANNEL DWC_HOST_CHANNEL
Definition dwcotg.h:422
USB_HOST *STDCALL dwc_host_create(size_t address, uint32_t irq, uint32_t powerid)
Create and register a new DWCOTG host which can be accessed using the USB API.
struct _DWC_ROOTHUB_CONFIGURATION DWC_ROOTHUB_CONFIGURATION
Definition dwcotg.h:605
struct _DWC_USB_HOST DWC_USB_HOST
Definition dwcotg.h:615
#define STDCALL
Definition globaltypes.h:45
#define PACKED
Definition globaltypes.h:48
HANDLE SPIN_HANDLE
Definition globaltypes.h:104
HANDLE MAILSLOT_HANDLE
Definition globaltypes.h:115
HANDLE THREAD_HANDLE
Definition globaltypes.h:113
HANDLE SEMAPHORE_HANDLE
Definition globaltypes.h:107
HANDLE MUTEX_HANDLE
Definition globaltypes.h:105
uint32_t dmaaddress
Definition dwcotg.h:453
uint32_t characteristics
Definition dwcotg.h:429
uint32_t interruptmask
Definition dwcotg.h:443
uint32_t transfer
Definition dwcotg.h:446
uint32_t reserved0x0018
Definition dwcotg.h:455
uint32_t splitcontrol
Definition dwcotg.h:434
uint32_t reserved0x001c
Definition dwcotg.h:457
uint32_t interrupts
Definition dwcotg.h:440
uint32_t hostfifostatus
Definition dwcotg.h:569
uint32_t nonperiodictransmitfifostatus
Definition dwcotg.h:513
uint32_t hwcfg4
Definition dwcotg.h:539
uint32_t hostconfiguration
Definition dwcotg.h:561
uint32_t corelpmconfiguration
Definition dwcotg.h:541
DWC_HOST_CHANNEL hostchannels[DWC_MAX_CHANNELS]
Definition dwcotg.h:593
uint32_t reserved0x0700[((0x800 - 0x500) -(DWC_MAX_CHANNELS *sizeof(DWC_HOST_CHANNEL)))/sizeof(uint32_t)]
Definition dwcotg.h:595
uint32_t corereset
Definition dwcotg.h:491
uint32_t hwcfg3
Definition dwcotg.h:537
uint32_t coreinterruptmask
Definition dwcotg.h:498
uint32_t hwcfg2
Definition dwcotg.h:527
uint32_t reserved0x0800[(0xE00 - 0x800)/sizeof(uint32_t)]
Definition dwcotg.h:598
uint32_t powerclockcontrol
Definition dwcotg.h:600
uint32_t globalfifoconfig
Definition dwcotg.h:545
uint32_t hostperiodictransmitfifosize
Definition dwcotg.h:554
uint32_t reserved0x0104[191]
Definition dwcotg.h:556
uint32_t receivestatuspop
Definition dwcotg.h:502
uint32_t reserved0x0444[47]
Definition dwcotg.h:588
uint32_t coreusbconfiguration
Definition dwcotg.h:488
uint32_t otgcontrol
Definition dwcotg.h:481
uint32_t nonperiodictransmitfifosize
Definition dwcotg.h:511
uint32_t hostframeinterval
Definition dwcotg.h:563
uint32_t vendorid
Definition dwcotg.h:523
uint32_t i2ccontrol
Definition dwcotg.h:515
uint32_t hostchannelsinterrupt
Definition dwcotg.h:573
uint32_t adpcontrol
Definition dwcotg.h:547
uint32_t hostchannelsinterruptmask
Definition dwcotg.h:577
uint32_t hwcfg1
Definition dwcotg.h:525
uint32_t hostframenumber
Definition dwcotg.h:565
uint32_t userid
Definition dwcotg.h:521
uint32_t phyvendorcontrol
Definition dwcotg.h:517
uint32_t gpio
Definition dwcotg.h:519
uint32_t receivestatus
Definition dwcotg.h:500
uint32_t coreinterrupts
Definition dwcotg.h:495
uint32_t ahbconfiguration
Definition dwcotg.h:486
uint32_t reserved0x040c
Definition dwcotg.h:567
uint32_t otginterrupt
Definition dwcotg.h:483
uint32_t reserved0x0064[39]
Definition dwcotg.h:549
uint32_t hostframelist
Definition dwcotg.h:579
uint32_t globalpowerdown
Definition dwcotg.h:543
uint32_t receivefifosize
Definition dwcotg.h:506
uint32_t reserved0x0420[8]
Definition dwcotg.h:581
uint32_t hostportcontrolstatus
Definition dwcotg.h:586
USB_ENDPOINT_DESCRIPTOR endpointdescriptor
Definition dwcotg.h:610
USB_CONFIGURATION_DESCRIPTOR configurationdescriptor
Definition dwcotg.h:608
USB_INTERFACE_DESCRIPTOR interfacedescriptor
Definition dwcotg.h:609
USB_DEVICE_DESCRIPTOR * devicedescriptor
Device descriptor for the root hub.
Definition dwcotg.h:643
USB_HOST host
Definition dwcotg.h:619
uint32_t startofframecount
Number of requests queued to wait for start of frame.
Definition dwcotg.h:657
MUTEX_HANDLE channelfreelock
Lock for access to ChannelFreeMask.
Definition dwcotg.h:633
uint32_t transactionrestartcount
Number of times a transaction is restarted to continue or complete the transfer.
Definition dwcotg.h:676
USB_DEVICE_STATUS * devicestatus
Device status for the root hub.
Definition dwcotg.h:641
USB_STRING_DESCRIPTOR * hubstringtable[3]
String table for Language, Product and Manufacturer strings for the root hub.
Definition dwcotg.h:645
uint32_t irq
The IRQ assigned to this host.
Definition dwcotg.h:622
uint32_t completesplitcount
Number of complete split transactions.
Definition dwcotg.h:673
uint32_t completesplitrestartcount
Number of times a complete split transaction has been restarted at start split due to errors.
Definition dwcotg.h:674
uint32_t startsplitcount
Number of start split transactions.
Definition dwcotg.h:672
uint32_t babbleerrorcount
Number of babble errors received by the host controller.
Definition dwcotg.h:666
uint32_t lastframenumber
Frame Number at the last Start Of Frame interrupt.
Definition dwcotg.h:637
USB_HUB_DESCRIPTOR * hubdescriptor
Hub descriptor for the root hub.
Definition dwcotg.h:642
uint32_t nyetresponsecount
Number of NYET responses received by the host controller.
Definition dwcotg.h:661
MAILSLOT_HANDLE schedulermailslot
USB requests that have been submitted to the Host but not yet started on a channel.
Definition dwcotg.h:628
USB_STRING_DESCRIPTOR * hubmanufacturerstring
Manufacturer identifier string for the root hub.
Definition dwcotg.h:648
uint32_t transactionerrorcount
Number of transaction errors received by the host controller.
Definition dwcotg.h:665
THREAD_HANDLE schedulerthread
Thread ID of USB request scheduler thread.
Definition dwcotg.h:626
DWC_ROOTHUB_CONFIGURATION * hubconfiguration
Configuration, Interface and Endpoint descriptors for the root hub.
Definition dwcotg.h:644
uint32_t startofframemask
Bitmap of channels waiting for Start of Frame.
Definition dwcotg.h:635
uint32_t interruptcount
Number of interrupt requests received by the host controller.
Definition dwcotg.h:651
uint32_t stallresponsecount
Number of Stall responses received by the host controller.
Definition dwcotg.h:662
uint32_t portinterruptcount
Number of port interrupts received by the host controller.
Definition dwcotg.h:652
uint32_t framelistrollovercount
Number of frame list rollover errors received by the host controller.
Definition dwcotg.h:668
uint32_t startofframeinterruptcount
Number of start of frame interrupts received by the host controller.
Definition dwcotg.h:654
USB_STRING_DESCRIPTOR * hubproductstring
Product identifier string for the root hub.
Definition dwcotg.h:646
SPIN_HANDLE lock
Host lock (Differs from lock in Host portion) (Spin lock due to use by interrupt handler).
Definition dwcotg.h:621
USB_REQUEST * channelrequests[DWC_MAX_CHANNELS]
Current USB request pending on each hardware channel (or nil of no request is pending).
Definition dwcotg.h:631
USB_STRING_DESCRIPTOR * hublanguagestring
Language identifier string for the root hub.
Definition dwcotg.h:647
SEMAPHORE_HANDLE channelfreewait
Number of free channels in ChannelFreeMask.
Definition dwcotg.h:634
uint32_t channelfreemask
Bitmap of channel free (1) or used (0) status.
Definition dwcotg.h:632
USB_PORT_STATUS * portstatus
Host port status for the root hub (Obtained from port interrupt due to status change).
Definition dwcotg.h:640
uint32_t disconnectinterruptcount
Number of disconnect interrupts received by the host controller.
Definition dwcotg.h:655
uint32_t dmabufferreadcount
Number of IN requests that required a DMA buffer copy.
Definition dwcotg.h:658
uint32_t channelinterruptcount
Number of channel interrupts received by the host controller.
Definition dwcotg.h:653
uint32_t excesstransactioncount
Number of excess transaction errors received by the host controller.
Definition dwcotg.h:667
uint32_t dmabufferwritecount
Number of OUT requests that required a DMA buffer copy.
Definition dwcotg.h:659
uint32_t nopacketstransferredcount
Number of times no packets were transferred but no error occured when a channel halted.
Definition dwcotg.h:678
uint32_t nakresponsecount
Number of NAK responses received by the host controller.
Definition dwcotg.h:660
uint32_t requestcancelcount
Number of requests Cancelled by the host controller.
Definition dwcotg.h:663
USB_HUB_STATUS * hubstatus
Hub status for the root hub.
Definition dwcotg.h:639
SPIN_HANDLE startofframelock
Lock for access to StartOfFrameMask (Spin lock due to use by interrupt handler).
Definition dwcotg.h:636
THREAD_HANDLE completionthread
Thread ID of USB request completion thread.
Definition dwcotg.h:627
uint32_t resubmitcount
Number of requests resubmitted for later retry.
Definition dwcotg.h:656
void * dmabuffers[DWC_MAX_CHANNELS]
DMA buffers allocated for each hardware channel (4 byte aligned / 1 per channel).
Definition dwcotg.h:630
DWC_REGISTERS * registers
Memory mapped registers of the Synopsys DesignWare Hi-Speed USB 2.0 OTG Controller.
Definition dwcotg.h:624
uint32_t frameoverruncount
Number of frame overrun errors received by the host controller.
Definition dwcotg.h:670
uint32_t ahberrorcount
Number of AHB errors received by the host controller.
Definition dwcotg.h:664
uint32_t datatoggleerrorcount
Number of data toggle errors received by the host controller.
Definition dwcotg.h:669
uint32_t powerid
The Power ID required to power on this host.
Definition dwcotg.h:623
uint32_t transferrestartcount
Number of times a transfer is restarted to continue or retry the transfer.
Definition dwcotg.h:675
USB_REQUEST * hubstatuschange
Status change request to the root hub interrupt endpoint (nil if no request is pending).
Definition dwcotg.h:649
uint32_t shortattemptcount
Number of short attempts where transfer size was less than the request size.
Definition dwcotg.h:671
uint32_t nochannelcompletedcount
Number of times the channel completed interrupt bit was not set when a request completed.
Definition dwcotg.h:677
uint32_t channelcount
The number of channels available on this host.
Definition dwcotg.h:625
struct _USB_PORT_STATUS USB_PORT_STATUS
Definition usb.h:1086
struct _USB_CONFIGURATION_DESCRIPTOR USB_CONFIGURATION_DESCRIPTOR
Definition usb.h:796
struct _USB_ENDPOINT_DESCRIPTOR USB_ENDPOINT_DESCRIPTOR
Definition usb.h:825
struct _USB_HUB_DESCRIPTOR USB_HUB_DESCRIPTOR
Definition usb.h:1071
struct _USB_HUB_STATUS USB_HUB_STATUS
Definition usb.h:1094
struct _USB_DEVICE_STATUS USB_DEVICE_STATUS
Definition usb.h:850
struct _USB_DEVICE_DESCRIPTOR USB_DEVICE_DESCRIPTOR
Definition usb.h:776
struct _USB_REQUEST USB_REQUEST
Forward declared to satisfy USBHost.
Definition usb.h:974
struct _USB_STRING_DESCRIPTOR USB_STRING_DESCRIPTOR
Definition usb.h:837
struct _USB_INTERFACE_DESCRIPTOR USB_INTERFACE_DESCRIPTOR
Definition usb.h:810
struct _USB_HOST USB_HOST
Forward declared to satisfy USBDevice.
Definition usb.h:857