Changeset 867b375 in mainline for uspace/drv/bus/usb/xhci/main.c
- Timestamp:
- 2017-10-15T02:04:10Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 20eaa82
- Parents:
- d7869d7e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/main.c
rd7869d7e r867b375 42 42 43 43 #include "hc.h" 44 #include "rh.h" 44 45 #include "endpoint.h" 45 46 … … 50 51 static int hcd_claim(hcd_t *, ddf_dev_t *); 51 52 static int hcd_start(hcd_t *, bool); 53 static int hcd_setup_root_hub(hcd_t *, ddf_dev_t *); 52 54 static int hcd_status(hcd_t *, uint32_t *); 53 55 static void hcd_interrupt(hcd_t *, uint32_t); 54 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 *); 55 58 static void hc_driver_fini(hcd_t *); 56 59 … … 62 65 .claim = hcd_claim, 63 66 .start = hcd_start, 67 .setup_root_hub = hcd_setup_root_hub, 64 68 .fini = hc_driver_fini, 65 69 .ops = { … … 67 71 .irq_hook = hcd_interrupt, 68 72 .status_hook = hcd_status, 73 .address_device = hcd_address_device, 69 74 } 70 75 }; … … 116 121 } 117 122 123 static int hcd_setup_root_hub(hcd_t *hcd, ddf_dev_t *dev) 124 { 125 xhci_hc_t *hc = hcd_get_driver_data(hcd); 126 assert(hc); 127 128 hc->rh.hcd_rh = hcd_roothub_create(hcd, dev, USB_SPEED_SUPER); 129 return hc->rh.hcd_rh ? EOK : ENOMEM; 130 } 131 118 132 static int hcd_schedule(hcd_t *hcd, usb_transfer_batch_t *batch) 119 133 { … … 139 153 140 154 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); 141 163 } 142 164
Note:
See TracChangeset
for help on using the changeset viewer.