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