Changeset e6b9182 in mainline for uspace/drv/bus/usb/xhci
- Timestamp:
- 2017-10-13T08:49:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 741bcdeb
- Parents:
- 0a5833d7
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/bus.c
r0a5833d7 re6b9182 171 171 172 172 /* Endpoint ops, optional (have generic fallback) */ 173 static intendpoint_get_toggle(endpoint_t *ep)174 { 175 // TODO: Implement me! 176 return ENOTSUP; 177 } 178 179 static void endpoint_set_toggle(endpoint_t *ep, unsignedtoggle)173 static bool endpoint_get_toggle(endpoint_t *ep) 174 { 175 // TODO: Implement me! 176 return ENOTSUP; 177 } 178 179 static void endpoint_set_toggle(endpoint_t *ep, bool toggle) 180 180 { 181 181 // TODO: Implement me! … … 227 227 }; 228 228 229 int xhci_bus_init(xhci_bus_t *bus , hcd_t *hcd)230 { 231 assert(bus); 232 233 bus_init(&bus->base , hcd);229 int xhci_bus_init(xhci_bus_t *bus) 230 { 231 assert(bus); 232 233 bus_init(&bus->base); 234 234 235 235 if (!hash_table_create(&bus->endpoints, 0, 0, &endpoint_ht_ops)) { -
uspace/drv/bus/usb/xhci/bus.h
r0a5833d7 re6b9182 52 52 */ 53 53 54 hash_table_t endpoints;54 hash_table_t endpoints; 55 55 } xhci_bus_t; 56 56 57 int xhci_bus_init(xhci_bus_t * , hcd_t *);57 int xhci_bus_init(xhci_bus_t *); 58 58 void xhci_bus_fini(xhci_bus_t *); 59 59 -
uspace/drv/bus/usb/xhci/hc.c
r0a5833d7 re6b9182 216 216 goto err_cmd; 217 217 218 return EOK; 219 218 if ((err = xhci_bus_init(&hc->bus))) 219 goto err_rh; 220 221 222 return EOK; 223 224 err_rh: 225 xhci_rh_fini(&hc->rh); 220 226 err_cmd: 221 227 xhci_fini_commands(hc); … … 610 616 void hc_fini(xhci_hc_t *hc) 611 617 { 618 xhci_bus_fini(&hc->bus); 612 619 xhci_trb_ring_fini(&hc->command_ring); 613 620 xhci_event_ring_fini(&hc->event_ring); -
uspace/drv/bus/usb/xhci/main.c
r0a5833d7 re6b9182 81 81 goto err; 82 82 83 if ((err = xhci_bus_init(&hc->bus, hcd)))84 goto err;85 86 83 if ((err = hc_init_memory(hc))) 87 84 goto err; … … 151 148 hc_fini(hc); 152 149 153 // FIXME: Probably move init/fini of XHCI bus into HC.154 xhci_bus_fini(&hc->bus);155 156 150 free(hc); 157 151 }
Note:
See TracChangeset
for help on using the changeset viewer.
