Changes in uspace/drv/bus/usb/ehci/main.c [1dc4a5e:dcffe95] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/main.c
r1dc4a5e rdcffe95 42 42 #include <usb/ddfiface.h> 43 43 #include <usb/debug.h> 44 #include <usb/host/hcd.h> 44 45 45 #include "pci.h" 46 #include "ehci.h" 46 #include "res.h" 47 47 48 static int ehci_add_device(ddf_dev_t *device); 48 #define NAME "ehci" 49 50 static int ehci_dev_add(ddf_dev_t *device); 49 51 /*----------------------------------------------------------------------------*/ 50 52 static driver_ops_t ehci_driver_ops = { 51 . add_device = ehci_add_device,53 .dev_add = ehci_dev_add, 52 54 }; 53 55 /*----------------------------------------------------------------------------*/ … … 57 59 }; 58 60 static ddf_dev_ops_t hc_ops = { 59 .interfaces[USBHC_DEV_IFACE] = & ehci_hc_iface,61 .interfaces[USBHC_DEV_IFACE] = &hcd_iface, 60 62 }; 61 63 … … 66 68 * @return Error code. 67 69 */ 68 static int ehci_ add_device(ddf_dev_t *device)70 static int ehci_dev_add(ddf_dev_t *device) 69 71 { 70 72 assert(device); … … 79 81 int irq = 0; 80 82 81 int ret = pci_get_my_registers(device, ®_base, ®_size, &irq);83 int ret = get_my_registers(device, ®_base, ®_size, &irq); 82 84 CHECK_RET_RETURN(ret, 83 85 "Failed to get memory addresses for %" PRIun ": %s.\n", … … 86 88 reg_base, reg_size, irq); 87 89 88 ret = pci_disable_legacy(device, reg_base, reg_size, irq);90 ret = disable_legacy(device, reg_base, reg_size); 89 91 CHECK_RET_RETURN(ret, 90 92 "Failed to disable legacy USB: %s.\n", str_error(ret)); … … 95 97 return ENOMEM; 96 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); 97 106 hc_fun->ops = &hc_ops; 98 107
Note:
See TracChangeset
for help on using the changeset viewer.