Changes in uspace/drv/uhci-hcd/hc.h [6ce42e85:302a4b6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/hc.h
r6ce42e85 r302a4b6 48 48 #include "transfer_list.h" 49 49 50 /** UHCI I/O registers layout */ 50 51 typedef struct uhci_regs { 52 /** Command register, controls HC behaviour */ 51 53 uint16_t usbcmd; 52 54 #define UHCI_CMD_MAX_PACKET (1 << 7) … … 59 61 #define UHCI_CMD_RUN_STOP (1 << 0) 60 62 63 /** Status register, 1 means interrupt is asserted (if enabled) */ 61 64 uint16_t usbsts; 62 65 #define UHCI_STATUS_HALTED (1 << 5) … … 66 69 #define UHCI_STATUS_ERROR_INTERRUPT (1 << 1) 67 70 #define UHCI_STATUS_INTERRUPT (1 << 0) 71 #define UHCI_STATUS_NM_INTERRUPTS \ 72 (UHCI_STATUS_PROCESS_ERROR | UHCI_STATUS_SYSTEM_ERROR) 68 73 74 /** Interrupt enabled registers */ 69 75 uint16_t usbintr; 70 76 #define UHCI_INTR_SHORT_PACKET (1 << 3) … … 73 79 #define UHCI_INTR_CRC (1 << 0) 74 80 81 /** Register stores frame number used in SOF packet */ 75 82 uint16_t frnum; 83 84 /** Pointer(physical) to the Frame List */ 76 85 uint32_t flbaseadd; 86 87 /** SOF modification to match external timers */ 77 88 uint8_t sofmod; 78 89 } regs_t; 79 90 80 91 #define UHCI_FRAME_LIST_COUNT 1024 81 #define UHCI_ CLEANER_TIMEOUT 1000092 #define UHCI_INT_EMULATOR_TIMEOUT 10000 82 93 #define UHCI_DEBUGER_TIMEOUT 5000000 83 94 #define UHCI_ALLOWED_HW_FAIL 5 95 #define UHCI_NEEDED_IRQ_COMMANDS 5 84 96 97 /* Main HC driver structure */ 85 98 typedef struct hc { 99 /** USB bus driver, devices and addresses */ 86 100 usb_device_keeper_t manager; 101 /** USB bus driver, endpoints */ 87 102 usb_endpoint_manager_t ep_manager; 88 103 104 /** Addresses of I/O registers */ 89 105 regs_t *registers; 90 106 107 /** Frame List contains 1024 link pointers */ 91 108 link_pointer_t *frame_list; 92 109 110 /** List and queue of interrupt transfers */ 111 transfer_list_t transfers_interrupt; 112 /** List and queue of low speed control transfers */ 113 transfer_list_t transfers_control_slow; 114 /** List and queue of full speed bulk transfers */ 93 115 transfer_list_t transfers_bulk_full; 116 /** List and queue of full speed control transfers */ 94 117 transfer_list_t transfers_control_full; 95 transfer_list_t transfers_control_slow;96 transfer_list_t transfers_interrupt;97 118 119 /** Pointer table to the above lists, helps during scheduling */ 98 120 transfer_list_t *transfers[2][4]; 99 121 122 /** Code to be executed in kernel interrupt handler */ 100 123 irq_code_t interrupt_code; 101 124 102 fid_t cleaner; 103 fid_t debug_checker; 125 /** Commands that form interrupt code */ 126 irq_cmd_t interrupt_commands[UHCI_NEEDED_IRQ_COMMANDS]; 127 128 /** Fibril periodically checking status register*/ 129 fid_t interrupt_emulator; 130 131 /** Indicator of hw interrupts availability */ 104 132 bool hw_interrupts; 133 134 /** Number of hw failures detected. */ 105 135 unsigned hw_failures; 106 107 ddf_fun_t *ddf_instance;108 136 } hc_t; 109 137
Note:
See TracChangeset
for help on using the changeset viewer.