Changes in uspace/drv/uhci-hcd/uhci.c [62ed5bc:fbefd0e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci.c
r62ed5bc rfbefd0e 54 54 { 55 55 assert(dev); 56 hc_t *hc = &((uhci_t*)dev->driver_data)->hc;56 uhci_hc_t *hc = &((uhci_t*)dev->driver_data)->hc; 57 57 uint16_t status = IPC_GET_ARG1(*call); 58 58 assert(hc); 59 hc_interrupt(hc, status);59 uhci_hc_interrupt(hc, status); 60 60 } 61 61 /*----------------------------------------------------------------------------*/ … … 70 70 { 71 71 assert(fun); 72 usb_device_keeper_t *manager = &((uhci_t*)fun->dev->driver_data)->hc. manager;72 usb_device_keeper_t *manager = &((uhci_t*)fun->dev->driver_data)->hc.device_manager; 73 73 74 74 usb_address_t addr = usb_device_keeper_find(manager, handle); … … 107 107 }; 108 108 /*----------------------------------------------------------------------------*/ 109 static ddf_dev_ops_t hc_ops = {109 static ddf_dev_ops_t uhci_hc_ops = { 110 110 .interfaces[USB_DEV_IFACE] = &usb_iface, 111 .interfaces[USBHC_DEV_IFACE] = & hc_iface, /* see iface.h/c */111 .interfaces[USBHC_DEV_IFACE] = &uhci_hc_iface, /* see iface.h/c */ 112 112 }; 113 113 /*----------------------------------------------------------------------------*/ … … 120 120 { 121 121 assert(fun); 122 return &(( rh_t*)fun->driver_data)->resource_list;122 return &((uhci_rh_t*)fun->driver_data)->resource_list; 123 123 } 124 124 /*----------------------------------------------------------------------------*/ … … 128 128 }; 129 129 /*----------------------------------------------------------------------------*/ 130 static ddf_dev_ops_t rh_ops = {130 static ddf_dev_ops_t uhci_rh_ops = { 131 131 .interfaces[USB_DEV_IFACE] = &usb_iface, 132 132 .interfaces[HW_RES_DEV_IFACE] = &hw_res_iface … … 190 190 "Failed(%d) to create HC function.\n", ret); 191 191 192 ret = hc_init(&instance->hc, instance->hc_fun,192 ret = uhci_hc_init(&instance->hc, instance->hc_fun, 193 193 (void*)io_reg_base, io_reg_size, interrupts); 194 194 CHECK_RET_DEST_FUN_RETURN(ret, "Failed(%d) to init uhci-hcd.\n", ret); 195 instance->hc_fun->ops = & hc_ops;195 instance->hc_fun->ops = &uhci_hc_ops; 196 196 instance->hc_fun->driver_data = &instance->hc; 197 197 ret = ddf_fun_bind(instance->hc_fun); … … 208 208 if (instance->rh_fun) \ 209 209 ddf_fun_destroy(instance->rh_fun); \ 210 hc_fini(&instance->hc); \210 uhci_hc_fini(&instance->hc); \ 211 211 return ret; \ 212 212 } … … 223 223 "Failed(%d) to create root hub function.\n", ret); 224 224 225 ret = rh_init(&instance->rh, instance->rh_fun,225 ret = uhci_rh_init(&instance->rh, instance->rh_fun, 226 226 (uintptr_t)instance->hc.registers + 0x10, 4); 227 227 CHECK_RET_FINI_RETURN(ret, 228 228 "Failed(%d) to setup UHCI root hub.\n", ret); 229 229 230 instance->rh_fun->ops = & rh_ops;230 instance->rh_fun->ops = &uhci_rh_ops; 231 231 instance->rh_fun->driver_data = &instance->rh; 232 232 ret = ddf_fun_bind(instance->rh_fun);
Note:
See TracChangeset
for help on using the changeset viewer.