Changeset 0748854 in mainline for uspace/drv/ohci/root_hub.c


Ignore:
Timestamp:
2011-04-09T23:30:55Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
46e078a
Parents:
77223f8 (diff), f11c288 (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:

Merge development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/root_hub.c

    r77223f8 r0748854  
    115115
    116116static const uint32_t hub_set_feature_valid_mask =
    117         (1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT);
     117        (1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT) |
     118(1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER);
    118119
    119120
     
    209210        instance->registers = regs;
    210211        instance->device = dev;
    211         instance->port_count = instance->registers->rh_desc_a & 0xff;
     212        instance->port_count =
     213            (instance->registers->rh_desc_a >> RHDA_NDS_SHIFT) & RHDA_NDS_MASK;
    212214        rh_init_descriptors(instance);
    213215        // set port power mode to no-power-switching
     
    586588        if (!((1 << feature) & hub_set_feature_valid_mask))
    587589                return EINVAL;
     590        if(feature == USB_HUB_FEATURE_C_HUB_LOCAL_POWER)
     591                feature = USB_HUB_FEATURE_C_HUB_LOCAL_POWER << 16;
    588592        instance->registers->rh_status =
    589593                (instance->registers->rh_status | (1 << feature))
Note: See TracChangeset for help on using the changeset viewer.