Changeset 20eaa82 in mainline for uspace/drv/bus/usb/xhci/main.c
- Timestamp:
- 2017-10-15T13:44:39Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2770b66
- Parents:
- 867b375
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/main.c
r867b375 r20eaa82 55 55 static void hcd_interrupt(hcd_t *, uint32_t); 56 56 static int hcd_schedule(hcd_t *, usb_transfer_batch_t *); 57 static int hcd_address_device(hcd_t *, usb_speed_t, usb_tt_address_t, usb_address_t *);58 57 static void hc_driver_fini(hcd_t *); 59 58 60 59 static const ddf_hc_driver_t xhci_ddf_hc_driver = { 61 .hc_speed = USB_SPEED_SUPER,62 60 .name = "XHCI-PCI", 63 61 .init = hc_driver_init, … … 71 69 .irq_hook = hcd_interrupt, 72 70 .status_hook = hcd_status, 73 .address_device = hcd_address_device,74 71 } 75 72 }; … … 90 87 91 88 hcd_set_implementation(hcd, hc, &xhci_ddf_hc_driver.ops, &hc->bus.base); 89 hc->hcd = hcd; 92 90 93 91 return EOK; … … 126 124 assert(hc); 127 125 128 hc->rh.hc d_rh = hcd_roothub_create(hcd, dev, USB_SPEED_SUPER);129 return hc->rh.hcd_rh ? EOK : ENOMEM;126 hc->rh.hc_device = dev; 127 return device_init(&hc->rh.device); 130 128 } 131 129 … … 153 151 154 152 hc_interrupt(hc, status); 155 }156 157 static int hcd_address_device(hcd_t *hcd, usb_speed_t speed, usb_tt_address_t tt, usb_address_t *address)158 {159 xhci_hc_t *hc = hcd_get_driver_data(hcd);160 assert(hc);161 162 return xhci_rh_address_device(&hc->rh, speed, tt, address);163 153 } 164 154
Note:
See TracChangeset
for help on using the changeset viewer.