8 #ifndef _USB_DWC_REGS_H_
9 #define _USB_DWC_REGS_H_
18 #define DWC_NUM_CHANNELS 8
43 uint32_t otg_interrupt;
53 #define DWC_AHB_INTERRUPT_ENABLE (1 << 0)
68 #define BCM_DWC_AHB_AXI_WAIT (1 << 4)
74 #define DWC_AHB_DMA_ENABLE (1 << 5)
77 uint32_t core_usb_configuration;
90 #define DWC_AHB_MASTER_IDLE (1 << 31)
97 #define DWC_SOFT_RESET (1 << 0)
119 uint32_t morestuff : 20;
137 uint32_t evenmorestuff : 6;
151 uint32_t receive_status;
154 uint32_t receive_status_pop;
182 uint32_t nonperiodic_tx_fifo_status;
185 uint32_t i2c_control;
188 uint32_t phy_vendor_control;
232 uint32_t core_lpm_configuration;
235 uint32_t global_powerDn;
238 uint32_t global_fifo_config;
241 uint32_t adp_control;
244 uint32_t reserved_0x64[39];
274 uint32_t host_configuration;
277 uint32_t host_frame_interval;
280 uint32_t host_frame_number;
283 uint32_t host_reserved_0x40c;
286 uint32_t host_fifo_status;
309 uint32_t host_frame_list;
312 uint32_t host_reserved_0x420[8];
396 uint32_t reserved : 1;
414 uint32_t test_control : 4;
426 uint32_t reserved2 : 13;
429 } host_port_ctrlstatus;
431 uint32_t host_reserved_0x444[47];
477 uint32_t reserved : 1;
584 uint32_t reserved : 14;
728 uint32_t buffer_not_available : 1;
729 uint32_t excess_transaction_error : 1;
730 uint32_t frame_list_rollover : 1;
731 uint32_t reserved : 18;
855 uint32_t host_reserved_after_channels[(0x800 - 0x500 -
863 uint32_t reserved_0x800[(0xe00 - 0x800) /
sizeof(uint32_t)];
871 static inline void _dwc_check_regs(
void)
873 STATIC_ASSERT(offsetof(
struct dwc_regs, vendor_id) == 0x40);
874 STATIC_ASSERT(offsetof(
struct dwc_regs, host_periodic_tx_fifo_size) == 0x100);
875 STATIC_ASSERT(offsetof(
struct dwc_regs, host_configuration) == 0x400);
876 STATIC_ASSERT(offsetof(
struct dwc_regs, host_port_ctrlstatus) == 0x440);
877 STATIC_ASSERT(offsetof(
struct dwc_regs, reserved_0x800) == 0x800);
uint32_t channel_halted
Definition: usb_dwc_regs.h:667
uint32_t do_ping
Definition: usb_dwc_regs.h:825
Definition: usb_dwc_regs.h:326
uint32_t reset
Definition: usb_dwc_regs.h:394
uint32_t endpoint_direction
Definition: usb_dwc_regs.h:475
union dwc_host_channel_interrupts interrupt_mask
Definition: usb_dwc_regs.h:742
uint32_t low_speed
Definition: usb_dwc_regs.h:484
uint32_t channel_disable
Definition: usb_dwc_regs.h:522
Definition: usb_dwc_regs.h:441
Definition: usb_dwc_regs.h:109
uint32_t speed
Definition: usb_dwc_regs.h:424
uint32_t hub_address
Definition: usb_dwc_regs.h:566
uint32_t host_channels_interrupt
Definition: usb_dwc_regs.h:296
uint32_t ahb_configuration
Definition: usb_dwc_regs.h:50
Definition: usb_dwc_regs.h:37
uint32_t suspended
Definition: usb_dwc_regs.h:387
uint32_t host_channel_intr
Definition: usb_dwc_regs.h:135
uint32_t transfer_completed
Definition: usb_dwc_regs.h:632
#define DWC_NUM_CHANNELS
Definition: usb_dwc_regs.h:18
uint32_t size
Definition: usb_dwc_regs.h:778
uint32_t connected
Definition: usb_dwc_regs.h:335
uint32_t transaction_error
Definition: usb_dwc_regs.h:709
uint32_t dma_address
Definition: usb_dwc_regs.h:849
union dwc_core_interrupts core_interrupt_mask
Definition: usb_dwc_regs.h:148
uint32_t connected_changed
Definition: usb_dwc_regs.h:343
uint32_t stall_response_received
Definition: usb_dwc_regs.h:679
uint32_t port_address
Definition: usb_dwc_regs.h:555
uint32_t endpoint_type
Definition: usb_dwc_regs.h:490
Definition: usb_dwc_regs.h:455
uint32_t ack_response_received
Definition: usb_dwc_regs.h:698
uint32_t enabled
Definition: usb_dwc_regs.h:353
Definition: usb_dwc_regs.h:548
uint32_t core_reset
Definition: usb_dwc_regs.h:85
uint32_t nonperiodic_tx_fifo_size
Definition: usb_dwc_regs.h:179
uint32_t device_address
Definition: usb_dwc_regs.h:506
uint32_t data_toggle_error
Definition: usb_dwc_regs.h:726
uint32_t rx_fifo_size
Definition: usb_dwc_regs.h:165
Definition: usb_dwc_regs.h:607
uint32_t nak_response_received
Definition: usb_dwc_regs.h:692
uint32_t host_channels_interrupt_mask
Definition: usb_dwc_regs.h:306
uint32_t split_enable
Definition: usb_dwc_regs.h:589
uint32_t powered
Definition: usb_dwc_regs.h:412
uint32_t resume
Definition: usb_dwc_regs.h:382
uint32_t packets_per_frame
Definition: usb_dwc_regs.h:499
uint32_t line_status
Definition: usb_dwc_regs.h:403
double power(double base, int exp)
Definition: trig.c:22
uint32_t packet_id
Definition: usb_dwc_regs.h:820
uint32_t overcurrent_changed
Definition: usb_dwc_regs.h:377
uint32_t odd_frame
Definition: usb_dwc_regs.h:515
uint32_t frame_overrun
Definition: usb_dwc_regs.h:719
uint32_t ahb_error
Definition: usb_dwc_regs.h:673
uint32_t transaction_position
Definition: usb_dwc_regs.h:571
uint32_t babble_error
Definition: usb_dwc_regs.h:714
Definition: usb_dwc_regs.h:750
uint32_t overcurrent
Definition: usb_dwc_regs.h:369
uint32_t hwcfg3
Definition: usb_dwc_regs.h:226
uint32_t enabled_changed
Definition: usb_dwc_regs.h:361
uint32_t port_intr
Definition: usb_dwc_regs.h:127
uint32_t complete_split
Definition: usb_dwc_regs.h:582
uint32_t endpoint_number
Definition: usb_dwc_regs.h:469
uint32_t sof_intr
Definition: usb_dwc_regs.h:117
uint32_t host_periodic_tx_fifo_size
Definition: usb_dwc_regs.h:258
uint32_t packet_count
Definition: usb_dwc_regs.h:794
uint32_t channel_enable
Definition: usb_dwc_regs.h:531
uint32_t nyet_response_received
Definition: usb_dwc_regs.h:703
uint32_t max_packet_size
Definition: usb_dwc_regs.h:463