Changeset 3bb6b35 in mainline for uspace/drv/ohci/root_hub.c


Ignore:
Timestamp:
2011-04-03T21:50:40Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
040ab02
Parents:
195890b
Message:

ohci root hub set power switching mode

File:
1 edited

Legend:

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

    r195890b r3bb6b35  
    108108
    109109static const uint32_t hub_clear_feature_valid_mask =
    110         (1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER) +
     110        (1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER) |
    111111(1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT);
    112112
     
    122122
    123123static const uint32_t port_set_feature_valid_mask =
    124         (1 << USB_HUB_FEATURE_PORT_ENABLE) +
    125 (1 << USB_HUB_FEATURE_PORT_SUSPEND) +
    126 (1 << USB_HUB_FEATURE_PORT_RESET) +
     124        (1 << USB_HUB_FEATURE_PORT_ENABLE) |
     125(1 << USB_HUB_FEATURE_PORT_SUSPEND) |
     126(1 << USB_HUB_FEATURE_PORT_RESET) |
    127127(1 << USB_HUB_FEATURE_PORT_POWER);
    128128
    129129static const uint32_t port_clear_feature_valid_mask =
    130         (1 << USB_HUB_FEATURE_PORT_CONNECTION) +
    131 (1 << USB_HUB_FEATURE_PORT_SUSPEND) +
    132 (1 << USB_HUB_FEATURE_PORT_OVER_CURRENT) +
    133 (1 << USB_HUB_FEATURE_PORT_POWER) +
    134 (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) +
    135 (1 << USB_HUB_FEATURE_C_PORT_ENABLE) +
    136 (1 << USB_HUB_FEATURE_C_PORT_SUSPEND) +
    137 (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) +
     130        (1 << USB_HUB_FEATURE_PORT_CONNECTION) |
     131(1 << USB_HUB_FEATURE_PORT_SUSPEND) |
     132(1 << USB_HUB_FEATURE_PORT_OVER_CURRENT) |
     133(1 << USB_HUB_FEATURE_PORT_POWER) |
     134(1 << USB_HUB_FEATURE_C_PORT_CONNECTION) |
     135(1 << USB_HUB_FEATURE_C_PORT_ENABLE) |
     136(1 << USB_HUB_FEATURE_C_PORT_SUSPEND) |
     137(1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) |
    138138(1 << USB_HUB_FEATURE_C_PORT_RESET);
    139139//note that USB_HUB_FEATURE_PORT_POWER bit is translated into
     
    165165
    166166static int process_hub_feature_set_request(rh_t *instance, uint16_t feature);
    167 
    168167
    169168static int process_hub_feature_clear_request(rh_t *instance,
     
    204203        instance->port_count = instance->registers->rh_desc_a & 0xff;
    205204        rh_init_descriptors(instance);
    206         /// \TODO set port power mode
    207 
     205        // set port power mode to no-power-switching
     206        instance->registers->rh_desc_a =
     207                instance->registers->rh_desc_a | (1<<9);
    208208
    209209        usb_log_info("OHCI root hub with %d ports.\n", instance->port_count);
Note: See TracChangeset for help on using the changeset viewer.