Changes in uspace/drv/bus/usb/uhci/hc.h [5a6cc679:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.h
r5a6cc679 rb7fd2a0 43 43 #include <ddi.h> 44 44 #include <usb/host/hcd.h> 45 #include <usb/host/usb2_bus.h>46 45 #include <usb/host/usb_transfer_batch.h> 47 46 … … 100 99 /** Main UHCI driver structure */ 101 100 typedef struct hc { 102 /* Common hc_device header */103 hc_device_t base;104 105 101 uhci_rh_t rh; 106 bus_t bus;107 usb2_bus_helper_t bus_helper;108 109 102 /** Addresses of I/O registers */ 110 103 uhci_regs_t *registers; … … 124 117 /** Pointer table to the above lists, helps during scheduling */ 125 118 transfer_list_t *transfers[2][4]; 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; 119 /** Indicator of hw interrupts availability */ 120 bool hw_interrupts; 134 121 135 122 /** Number of hw failures detected. */ … … 137 124 } hc_t; 138 125 139 typedef struct uhci_endpoint { 140 endpoint_t base;126 extern errno_t hc_init(hc_t *, const hw_res_list_parsed_t *, bool); 127 extern void hc_fini(hc_t *); 141 128 142 bool toggle; 143 } uhci_endpoint_t; 129 extern errno_t uhci_hc_gen_irq_code(irq_code_t *, const hw_res_list_parsed_t *, int *); 144 130 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 errno_t hc_add(hc_device_t *, const hw_res_list_parsed_t *); 160 extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *); 161 extern errno_t hc_start(hc_device_t *); 162 extern errno_t hc_setup_roothub(hc_device_t *); 163 extern errno_t hc_gone(hc_device_t *); 131 extern void uhci_hc_interrupt(hcd_t *, uint32_t); 132 extern errno_t uhci_hc_status(hcd_t *, uint32_t *); 133 extern errno_t uhci_hc_schedule(hcd_t *, usb_transfer_batch_t *); 164 134 165 135 #endif
Note:
See TracChangeset
for help on using the changeset viewer.