Changeset b01995b in mainline for uspace/drv/uhci-hcd/uhci.c


Ignore:
Timestamp:
2011-03-21T23:42:08Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
11dd29b, 62f4212
Parents:
31b568e (diff), 87644b4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Fixes selecting a new USB address when max address has been reached.

Whitespace and code-style fixes, renames

File:
1 edited

Legend:

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

    r31b568e rb01995b  
    5454{
    5555        assert(dev);
    56         uhci_hc_t *hc = &((uhci_t*)dev->driver_data)->hc;
     56        hc_t *hc = &((uhci_t*)dev->driver_data)->hc;
    5757        uint16_t status = IPC_GET_ARG1(*call);
    5858        assert(hc);
    59         uhci_hc_interrupt(hc, status);
     59        hc_interrupt(hc, status);
    6060}
    6161/*----------------------------------------------------------------------------*/
     
    7070{
    7171        assert(fun);
    72         usb_device_keeper_t *manager = &((uhci_t*)fun->dev->driver_data)->hc.device_manager;
     72        usb_device_keeper_t *manager = &((uhci_t*)fun->dev->driver_data)->hc.manager;
    7373
    7474        usb_address_t addr = usb_device_keeper_find(manager, handle);
     
    107107};
    108108/*----------------------------------------------------------------------------*/
    109 static ddf_dev_ops_t uhci_hc_ops = {
     109static ddf_dev_ops_t hc_ops = {
    110110        .interfaces[USB_DEV_IFACE] = &usb_iface,
    111         .interfaces[USBHC_DEV_IFACE] = &uhci_hc_iface, /* see iface.h/c */
     111        .interfaces[USBHC_DEV_IFACE] = &hc_iface, /* see iface.h/c */
    112112};
    113113/*----------------------------------------------------------------------------*/
     
    120120{
    121121        assert(fun);
    122         return &((uhci_rh_t*)fun->driver_data)->resource_list;
     122        return &((rh_t*)fun->driver_data)->resource_list;
    123123}
    124124/*----------------------------------------------------------------------------*/
     
    128128};
    129129/*----------------------------------------------------------------------------*/
    130 static ddf_dev_ops_t uhci_rh_ops = {
     130static ddf_dev_ops_t rh_ops = {
    131131        .interfaces[USB_DEV_IFACE] = &usb_iface,
    132132        .interfaces[HW_RES_DEV_IFACE] = &hw_res_iface
     
    190190            "Failed(%d) to create HC function.\n", ret);
    191191
    192         ret = uhci_hc_init(&instance->hc, instance->hc_fun,
     192        ret = hc_init(&instance->hc, instance->hc_fun,
    193193            (void*)io_reg_base, io_reg_size, interrupts);
    194194        CHECK_RET_DEST_FUN_RETURN(ret, "Failed(%d) to init uhci-hcd.\n", ret);
    195         instance->hc_fun->ops = &uhci_hc_ops;
     195        instance->hc_fun->ops = &hc_ops;
    196196        instance->hc_fun->driver_data = &instance->hc;
    197197        ret = ddf_fun_bind(instance->hc_fun);
     
    208208        if (instance->rh_fun) \
    209209                ddf_fun_destroy(instance->rh_fun); \
    210         uhci_hc_fini(&instance->hc); \
     210        hc_fini(&instance->hc); \
    211211        return ret; \
    212212}
     
    223223            "Failed(%d) to create root hub function.\n", ret);
    224224
    225         ret = uhci_rh_init(&instance->rh, instance->rh_fun,
     225        ret = rh_init(&instance->rh, instance->rh_fun,
    226226            (uintptr_t)instance->hc.registers + 0x10, 4);
    227227        CHECK_RET_FINI_RETURN(ret,
    228228            "Failed(%d) to setup UHCI root hub.\n", ret);
    229229
    230         instance->rh_fun->ops = &uhci_rh_ops;
     230        instance->rh_fun->ops = &rh_ops;
    231231        instance->rh_fun->driver_data = &instance->rh;
    232232        ret = ddf_fun_bind(instance->rh_fun);
Note: See TracChangeset for help on using the changeset viewer.