Changeset 0ef03d7 in mainline
- Timestamp:
- 2012-12-21T11:19:18Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- daf59d1
- Parents:
- 53332b5b
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/main.c
r53332b5b r0ef03d7 88 88 "Failed to disable legacy USB: %s.\n", str_error(ret)); 89 89 90 /* TODOHigh Speed, no bandwidth */91 ret = hcd_ddf_setup_device(device, NULL );90 /* High Speed, no bandwidth */ 91 ret = hcd_ddf_setup_device(device, NULL, USB_SPEED_HIGH, 0, NULL); 92 92 CHECK_RET_RETURN(ret, 93 93 "Failed to init generci hcd driver: %s\n", str_error(ret)); -
uspace/drv/bus/usb/ohci/ohci.c
r53332b5b r0ef03d7 132 132 133 133 /* Initialize generic HCD driver */ 134 ret = hcd_ddf_setup_device(device, NULL); 134 ret = hcd_ddf_setup_device(device, NULL, USB_SPEED_FULL, 135 BANDWIDTH_AVAILABLE_USB11, bandwidth_count_usb11); 135 136 if (ret != EOK) { 136 137 unregister_interrupt_handler(device, irq); -
uspace/drv/bus/usb/uhci/uhci.c
r53332b5b r0ef03d7 137 137 138 138 ddf_fun_t *hc_fun = NULL; 139 ret = hcd_ddf_setup_device(device, &hc_fun); 139 ret = hcd_ddf_setup_device(device, &hc_fun, USB_SPEED_FULL, 140 BANDWIDTH_AVAILABLE_USB11, bandwidth_count_usb11); 140 141 CHECK_RET_RETURN(ret, "Failed to setup UHCI HCD.\n"); 141 142 -
uspace/lib/usbhost/include/usb/host/ddf_helpers.h
r53332b5b r0ef03d7 43 43 usb_address_t address, usb_speed_t speed, const char *name, 44 44 const match_id_list_t *mids); 45 int hcd_ddf_setup_device(ddf_dev_t *device, ddf_fun_t **fun); 45 int hcd_ddf_setup_device(ddf_dev_t *device, ddf_fun_t **hc_fun, 46 usb_speed_t max_speed, size_t bw, bw_count_func_t bw_count); 46 47 int hcd_ddf_setup_hub(hcd_t *instance, usb_address_t *address, ddf_dev_t *dev); 47 48 -
uspace/lib/usbhost/src/ddf_helpers.c
r53332b5b r0ef03d7 176 176 assert(device); 177 177 178 const usb_speed_t speed = instance->dev_manager.max_speed; 179 178 180 int ret = usb_device_manager_request_address(&instance->dev_manager, 179 address, false, USB_SPEED_FULL);181 address, false, speed); 180 182 if (ret != EOK) { 181 183 usb_log_error("Failed to get root hub address: %s\n", … … 197 199 ret = usb_endpoint_manager_add_ep( 198 200 &instance->ep_manager, *address, 0, 199 USB_DIRECTION_BOTH, USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64,201 USB_DIRECTION_BOTH, USB_TRANSFER_CONTROL, speed, 64, 200 202 0, NULL, NULL); 201 203 CHECK_RET_UNREG_RETURN(ret, … … 209 211 210 212 ret = hcd_ddf_add_device( 211 instance, device, *address, USB_SPEED_FULL, "rh", &mid_list);213 instance, device, *address, speed, "rh", &mid_list); 212 214 CHECK_RET_UNREG_RETURN(ret, 213 215 "Failed to add hcd device: %s.\n", str_error(ret)); … … 227 229 * - registers interrupt handler 228 230 */ 229 int hcd_ddf_setup_device(ddf_dev_t *device, ddf_fun_t **hc_fun) 231 int hcd_ddf_setup_device(ddf_dev_t *device, ddf_fun_t **hc_fun, 232 usb_speed_t max_speed, size_t bw, bw_count_func_t bw_count) 230 233 { 231 234 if (device == NULL) … … 257 260 "Failed to allocate HCD structure: %s.\n", str_error(ret)); 258 261 259 hcd_init(hcd, USB_SPEED_FULL, BANDWIDTH_AVAILABLE_USB11, 260 bandwidth_count_usb11); 262 hcd_init(hcd, max_speed, bw, bw_count); 261 263 262 264 ret = ddf_fun_bind(instance->hc_fun);
Note:
See TracChangeset
for help on using the changeset viewer.