Changeset d369b3b in mainline for uspace/drv/bus/usb/uhci/hc.c
- Timestamp:
- 2018-01-25T02:05:57Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 296d22fc
- Parents:
- b357377
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-25 01:52:13)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-25 02:05:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.c
rb357377 rd369b3b 329 329 hc_t * const hc = bus_to_hc(endpoint_get_bus(ep)); 330 330 331 const int err = usb2_bus_ ops.endpoint_register(ep);331 const int err = usb2_bus_endpoint_register(&hc->bus_helper, ep); 332 332 if (err) 333 333 return err; … … 350 350 { 351 351 hc_t * const hc = bus_to_hc(endpoint_get_bus(ep)); 352 usb2_bus_ ops.endpoint_unregister(ep);352 usb2_bus_endpoint_unregister(&hc->bus_helper, ep); 353 353 354 354 // Check for the roothub, as it does not schedule into lists … … 406 406 } 407 407 408 static int device_enumerate(device_t *dev) 409 { 410 hc_t * const hc = bus_to_hc(dev->bus); 411 return usb2_bus_device_enumerate(&hc->bus_helper, dev); 412 } 413 408 414 static int hc_status(bus_t *, uint32_t *); 409 415 static int hc_schedule(usb_transfer_batch_t *); 410 416 411 417 static const bus_ops_t uhci_bus_ops = { 412 .parent = &usb2_bus_ops,413 414 418 .interrupt = hc_interrupt, 415 419 .status = hc_status, 420 421 .device_enumerate = device_enumerate, 416 422 417 423 .endpoint_create = endpoint_create, … … 438 444 assert(instance); 439 445 440 usb2_bus_ init(&instance->bus, &bandwidth_accounting_usb11);441 442 bus_ t *bus = (bus_t *) &instance->bus;443 bus->ops = &uhci_bus_ops;444 445 hc_device_setup(&instance->base, bus);446 usb2_bus_helper_init(&instance->bus_helper, &bandwidth_accounting_usb11); 447 448 bus_init(&instance->bus, sizeof(device_t)); 449 instance->bus.ops = &uhci_bus_ops; 450 451 hc_device_setup(&instance->base, &instance->bus); 446 452 447 453 /* Init USB frame list page */
Note:
See TracChangeset
for help on using the changeset viewer.