Changes in uspace/drv/bus/usb/uhci/hc.h [68e5406:d369b3b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.h
r68e5406 rd369b3b 43 43 #include <ddi.h> 44 44 #include <usb/host/hcd.h> 45 #include <usb/host/usb2_bus.h> 45 46 #include <usb/host/usb_transfer_batch.h> 46 47 … … 99 100 /** Main UHCI driver structure */ 100 101 typedef struct hc { 102 /* Common hc_device header */ 103 hc_device_t base; 104 101 105 uhci_rh_t rh; 106 bus_t bus; 107 usb2_bus_helper_t bus_helper; 108 102 109 /** Addresses of I/O registers */ 103 110 uhci_regs_t *registers; … … 117 124 /** Pointer table to the above lists, helps during scheduling */ 118 125 transfer_list_t *transfers[2][4]; 119 /** Indicator of hw interrupts availability */ 120 bool hw_interrupts; 126 127 /** 128 * Guard for the pending list. Can be locked under EP guard, but not 129 * vice versa. 130 */ 131 fibril_mutex_t guard; 132 /** List of endpoints with a transfer scheduled */ 133 list_t pending_endpoints; 121 134 122 135 /** Number of hw failures detected. */ … … 124 137 } hc_t; 125 138 126 extern int hc_init(hc_t *, const hw_res_list_parsed_t *, bool); 127 extern void hc_fini(hc_t *);139 typedef struct uhci_endpoint { 140 endpoint_t base; 128 141 129 extern int uhci_hc_gen_irq_code(irq_code_t *, const hw_res_list_parsed_t *, int *); 142 bool toggle; 143 } uhci_endpoint_t; 130 144 131 extern void uhci_hc_interrupt(hcd_t *, uint32_t); 132 extern int uhci_hc_status(hcd_t *, uint32_t *); 133 extern int uhci_hc_schedule(hcd_t *, usb_transfer_batch_t *); 145 static inline hc_t *hcd_to_hc(hc_device_t *hcd) 146 { 147 assert(hcd); 148 return (hc_t *) hcd; 149 } 150 151 static inline hc_t *bus_to_hc(bus_t *bus) 152 { 153 assert(bus); 154 return member_to_inst(bus, hc_t, bus); 155 } 156 157 int hc_unschedule_batch(usb_transfer_batch_t *); 158 159 extern int hc_add(hc_device_t *, const hw_res_list_parsed_t *); 160 extern int hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *); 161 extern int hc_start(hc_device_t *); 162 extern int hc_setup_roothub(hc_device_t *); 163 extern int hc_gone(hc_device_t *); 134 164 135 165 #endif
Note:
See TracChangeset
for help on using the changeset viewer.