Changeset 63431db in mainline
- Timestamp:
- 2018-01-07T01:15:24Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5e2b1ae6
- Parents:
- 56257ba
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/hc.c
r56257ba r63431db 215 215 goto err_cmd; 216 216 217 if ((err = xhci_rh_init(&hc->rh, hc , device)))217 if ((err = xhci_rh_init(&hc->rh, hc))) 218 218 goto err_bus; 219 219 -
uspace/drv/bus/usb/xhci/rh.c
r56257ba r63431db 61 61 XHCI_REG_MASK(XHCI_PORT_CEC); 62 62 63 int xhci_rh_init(xhci_rh_t *rh, xhci_hc_t *hc , ddf_dev_t *device)63 int xhci_rh_init(xhci_rh_t *rh, xhci_hc_t *hc) 64 64 { 65 65 assert(rh); … … 69 69 rh->max_ports = XHCI_REG_RD(hc->cap_regs, XHCI_CAP_MAX_PORTS); 70 70 rh->devices_by_port = (xhci_device_t **) calloc(rh->max_ports, sizeof(xhci_device_t *)); 71 rh->hc_device = device;72 71 73 72 const int err = bus_device_init(&rh->device.base, &rh->hc->bus.base); … … 88 87 int err; 89 88 assert(rh); 90 assert(rh->hc_device);91 89 92 90 assert(rh->devices_by_port[port_id - 1] == NULL); … … 353 351 int xhci_rh_fini(xhci_rh_t *rh) 354 352 { 355 /* TODO: Implement me! */ 356 usb_log_debug2("Called xhci_rh_fini()."); 357 353 assert(rh); 358 354 free(rh->devices_by_port); 359 360 355 return EOK; 361 356 } -
uspace/drv/bus/usb/xhci/rh.h
r56257ba r63431db 67 67 xhci_device_t device; 68 68 69 /* We need this to attach children to */70 ddf_dev_t *hc_device;71 72 69 /** Interrupt transfer waiting for an actual interrupt to occur */ 73 70 usb_transfer_batch_t *unfinished_interrupt_transfer; … … 80 77 } xhci_rh_t; 81 78 82 int xhci_rh_init(xhci_rh_t *, xhci_hc_t * , ddf_dev_t *);79 int xhci_rh_init(xhci_rh_t *, xhci_hc_t *); 83 80 int xhci_rh_fini(xhci_rh_t *); 84 81 const xhci_port_speed_t *xhci_rh_get_port_speed(xhci_rh_t *, uint8_t);
Note:
See TracChangeset
for help on using the changeset viewer.