Changeset 53332b5b in mainline for uspace/drv/bus/usb/ehci/main.c
- Timestamp:
- 2012-12-21T11:01:09Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ef03d7
- Parents:
- a720ff6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/main.c
ra720ff6 r53332b5b 40 40 41 41 #include <usb_iface.h> 42 #include <usb/ddfiface.h>43 42 #include <usb/debug.h> 44 #include <usb/host/ hcd.h>43 #include <usb/host/ddf_helpers.h> 45 44 46 45 #include "res.h" … … 57 56 .name = NAME, 58 57 .driver_ops = &ehci_driver_ops 59 };60 static ddf_dev_ops_t hc_ops = {61 .interfaces[USBHC_DEV_IFACE] = &hcd_iface,62 58 }; 63 59 … … 92 88 "Failed to disable legacy USB: %s.\n", str_error(ret)); 93 89 94 ddf_fun_t *hc_fun = ddf_fun_create(device, fun_exposed, "ehci_hc"); 95 if (hc_fun == NULL) { 96 usb_log_error("Failed to create EHCI function.\n"); 97 return ENOMEM; 98 } 99 hcd_t *ehci_hc = ddf_fun_data_alloc(hc_fun, sizeof(hcd_t)); 100 if (ehci_hc == NULL) { 101 usb_log_error("Failed to alloc generic HC driver.\n"); 102 return ENOMEM; 103 } 104 /* High Speed, no bandwidth */ 105 hcd_init(ehci_hc, USB_SPEED_HIGH, 0, NULL); 106 ddf_fun_set_ops(hc_fun, &hc_ops); 107 108 ret = ddf_fun_bind(hc_fun); 90 /* TODO High Speed, no bandwidth */ 91 ret = hcd_ddf_setup_device(device, NULL); 109 92 CHECK_RET_RETURN(ret, 110 "Failed to bind EHCI function: %s.\n", 111 str_error(ret)); 112 ret = ddf_fun_add_to_category(hc_fun, USB_HC_CATEGORY); 113 CHECK_RET_RETURN(ret, 114 "Failed to add EHCI to HC class: %s.\n", 115 str_error(ret)); 93 "Failed to init generci hcd driver: %s\n", str_error(ret)); 116 94 117 95 usb_log_info("Controlling new EHCI device `%s' (handle %" PRIun ").\n",
Note:
See TracChangeset
for help on using the changeset viewer.