Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/uhci.c

    rff34e5a ra9f91cd  
    6060}
    6161/*----------------------------------------------------------------------------*/
    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  */
    6862static int usb_iface_get_address(
    6963    ddf_fun_t *fun, devman_handle_t handle, usb_address_t *address)
     
    112106};
    113107/*----------------------------------------------------------------------------*/
    114 /** Get root hub hw resources (I/O registers).
     108/** Gets root hub hw resources.
    115109 *
    116110 * @param[in] fun Root hub function.
     
    133127};
    134128/*----------------------------------------------------------------------------*/
    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 resources
    142  *  - disables UHCI legacy support
    143  *  - asks for interrupt
    144  *  - registers interrupt handler
    145  */
    146129int uhci_init(uhci_t *instance, ddf_dev_t *device)
    147130{
     
    174157            "Failed(%d) to disable legacy USB: %s.\n", ret, str_error(ret));
    175158
    176         bool interrupts = false;
     159#if 0
    177160        ret = pci_enable_interrupts(device);
    178161        if (ret != EOK) {
     
    180163                    "Failed(%d) to enable interrupts, fall back to polling.\n",
    181164                    ret);
    182         } else {
    183                 usb_log_debug("Hw interrupts enabled.\n");
    184                 interrupts = true;
    185165        }
     166#endif
    186167
    187168        instance->hc_fun = ddf_fun_create(device, fun_exposed, "uhci-hc");
    188169        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);
    194174        CHECK_RET_DEST_FUN_RETURN(ret, "Failed(%d) to init uhci-hcd.\n", ret);
    195175        instance->hc_fun->ops = &uhci_hc_ops;
     
    237217#undef CHECK_RET_FINI_RETURN
    238218}
     219
    239220/**
    240221 * @}
Note: See TracChangeset for help on using the changeset viewer.