Changes in uspace/drv/bus/usb/ehci/main.c [58563585:20eaa82] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/main.c
r58563585 r20eaa82 48 48 #include "res.h" 49 49 #include "hc.h" 50 #include "ehci_endpoint.h"51 50 52 51 #define NAME "ehci" 53 52 54 static int ehci_driver_init(hcd_t *, const hw_res_list_parsed_t *, bool); 53 static int ehci_driver_init(hcd_t *, const hw_res_list_parsed_t *); 54 static int ehci_driver_claim(hcd_t *, ddf_dev_t *); 55 static int ehci_driver_start(hcd_t *, bool); 55 56 static void ehci_driver_fini(hcd_t *); 56 57 57 58 static const ddf_hc_driver_t ehci_hc_driver = { 58 . claim = disable_legacy,59 . hc_speed = USB_SPEED_HIGH,59 .name = "EHCI-PCI", 60 .init = ehci_driver_init, 60 61 .irq_code_gen = ehci_hc_gen_irq_code, 61 .init = ehci_driver_init, 62 .claim = ehci_driver_claim, 63 .start = ehci_driver_start, 64 .setup_root_hub = hcd_setup_virtual_root_hub, 62 65 .fini = ehci_driver_fini, 63 .name = "EHCI-PCI",64 66 .ops = { 65 67 .schedule = ehci_hc_schedule, 66 .ep_add_hook = ehci_endpoint_init,67 .ep_remove_hook = ehci_endpoint_fini,68 68 .irq_hook = ehci_hc_interrupt, 69 69 .status_hook = ehci_hc_status, … … 72 72 73 73 74 static int ehci_driver_init(hcd_t *hcd, const hw_res_list_parsed_t *res, 75 bool irq) 74 static int ehci_driver_init(hcd_t *hcd, const hw_res_list_parsed_t *res) 76 75 { 77 76 assert(hcd); … … 82 81 return ENOMEM; 83 82 84 const int ret = hc_init(instance, res , irq);83 const int ret = hc_init(instance, res); 85 84 if (ret == EOK) { 86 hcd_set_implementation(hcd, instance, &ehci_hc_driver.ops );85 hcd_set_implementation(hcd, instance, &ehci_hc_driver.ops, &instance->bus.base.base); 87 86 } else { 88 87 free(instance); 89 88 } 90 89 return ret; 90 } 91 92 static int ehci_driver_claim(hcd_t *hcd, ddf_dev_t *dev) 93 { 94 hc_t *instance = hcd_get_driver_data(hcd); 95 assert(instance); 96 97 return disable_legacy(instance, dev); 98 } 99 100 static int ehci_driver_start(hcd_t *hcd, bool irq) { 101 hc_t *instance = hcd_get_driver_data(hcd); 102 assert(instance); 103 104 return hc_start(instance, irq); 91 105 } 92 106 … … 99 113 100 114 free(hc); 101 hcd_set_implementation(hcd, NULL, NULL );115 hcd_set_implementation(hcd, NULL, NULL, NULL); 102 116 } 103 117
Note:
See TracChangeset
for help on using the changeset viewer.