Changes in uspace/drv/uhci-hcd/uhci.c [ff34e5a:a9f91cd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci.c
rff34e5a ra9f91cd 60 60 } 61 61 /*----------------------------------------------------------------------------*/ 62 /** Get address of the device identified by handle.63 *64 * @param[in] dev DDF instance of the device to use.65 * @param[in] iid (Unused).66 * @param[in] call Pointer to the call that represents interrupt.67 */68 62 static int usb_iface_get_address( 69 63 ddf_fun_t *fun, devman_handle_t handle, usb_address_t *address) … … 112 106 }; 113 107 /*----------------------------------------------------------------------------*/ 114 /** Get root hub hw resources (I/O registers).108 /** Gets root hub hw resources. 115 109 * 116 110 * @param[in] fun Root hub function. … … 133 127 }; 134 128 /*----------------------------------------------------------------------------*/ 135 /** Initialize hc and rh ddf structures and their respective drivers.136 *137 * @param[in] instance UHCI structure to use.138 * @param[in] device DDF instance of the device to use.139 *140 * This function does all the preparatory work for hc and rh drivers:141 * - gets device hw resources142 * - disables UHCI legacy support143 * - asks for interrupt144 * - registers interrupt handler145 */146 129 int uhci_init(uhci_t *instance, ddf_dev_t *device) 147 130 { … … 174 157 "Failed(%d) to disable legacy USB: %s.\n", ret, str_error(ret)); 175 158 176 bool interrupts = false; 159 #if 0 177 160 ret = pci_enable_interrupts(device); 178 161 if (ret != EOK) { … … 180 163 "Failed(%d) to enable interrupts, fall back to polling.\n", 181 164 ret); 182 } else {183 usb_log_debug("Hw interrupts enabled.\n");184 interrupts = true;185 165 } 166 #endif 186 167 187 168 instance->hc_fun = ddf_fun_create(device, fun_exposed, "uhci-hc"); 188 169 ret = (instance->hc_fun == NULL) ? ENOMEM : EOK; 189 CHECK_RET_DEST_FUN_RETURN(ret, 190 "Failed(%d) to create HC function.\n", ret); 191 192 ret = uhci_hc_init(&instance->hc, instance->hc_fun, 193 (void*)io_reg_base, io_reg_size, interrupts); 170 CHECK_RET_DEST_FUN_RETURN(ret, "Failed(%d) to create HC function.\n", ret); 171 172 ret = uhci_hc_init( 173 &instance->hc, instance->hc_fun, (void*)io_reg_base, io_reg_size); 194 174 CHECK_RET_DEST_FUN_RETURN(ret, "Failed(%d) to init uhci-hcd.\n", ret); 195 175 instance->hc_fun->ops = &uhci_hc_ops; … … 237 217 #undef CHECK_RET_FINI_RETURN 238 218 } 219 239 220 /** 240 221 * @}
Note:
See TracChangeset
for help on using the changeset viewer.