Changeset 3476be8 in mainline


Ignore:
Timestamp:
2011-05-13T14:15:24Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4fe3b6d, 8fcaeed
Parents:
aca3489
Message:

definition of status masks uses definitions in ohci_regs
old code still commented - untested

File:
1 edited

Legend:

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

    raca3489 r3476be8  
    4141#include "usb/classes/classes.h"
    4242#include "usb/devdrv.h"
     43#include "ohci_regs.h"
     44
    4345#include <usb/request.h>
    4446#include <usb/classes/hub.h>
     
    109111 */
    110112static const uint32_t hub_clear_feature_valid_mask =
    111     (1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER) |
    112     (1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT);
     113    RHS_OCIC_FLAG |
     114    RHS_CLEAR_PORT_POWER;
    113115
    114116/**
     
    116118 */
    117119static const uint32_t hub_clear_feature_by_writing_one_mask =
    118     1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER;
     120   RHS_CLEAR_PORT_POWER;
     121   // 1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER;
    119122
    120123/**
     
    122125 */
    123126static const uint32_t hub_set_feature_valid_mask =
    124     (1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT) |
    125     (1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER);
     127    RHS_LPSC_FLAG |
     128    RHS_OCIC_FLAG;
     129    //(1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT) |
     130    //(1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER);
    126131
    127132/**
     
    129134 */
    130135static const uint32_t hub_set_feature_direct_mask =
    131     (1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT);
     136    RHS_SET_PORT_POWER;
     137    //(1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT);
    132138
    133139/**
     
    135141 */
    136142static const uint32_t port_set_feature_valid_mask =
    137     (1 << USB_HUB_FEATURE_PORT_ENABLE) |
    138     (1 << USB_HUB_FEATURE_PORT_SUSPEND) |
    139     (1 << USB_HUB_FEATURE_PORT_RESET) |
    140     (1 << USB_HUB_FEATURE_PORT_POWER);
     143    RHPS_SET_PORT_ENABLE |
     144    RHPS_SET_PORT_SUSPEND |
     145    RHPS_SET_PORT_RESET |
     146    RHPS_SET_PORT_POWER;
    141147
    142148/**
     
    144150 */
    145151static const uint32_t port_clear_feature_valid_mask =
     152    RHPS_CCS_FLAG |
     153    RHPS_SET_PORT_SUSPEND |
     154    RHPS_POCI_FLAG |
     155    RHPS_SET_PORT_POWER |
     156    RHPS_CSC_FLAG |
     157    RHPS_PESC_FLAG |
     158    RHPS_PSSC_FLAG |
     159    RHPS_OCIC_FLAG |
     160    RHPS_PRSC_FLAG;
     161
     162/*
     163
    146164    (1 << USB_HUB_FEATURE_PORT_CONNECTION) |
    147165    (1 << USB_HUB_FEATURE_PORT_SUSPEND) |
     
    153171    (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) |
    154172    (1 << USB_HUB_FEATURE_C_PORT_RESET);
     173 */
    155174//note that USB_HUB_FEATURE_PORT_POWER bit is translated into
    156 //USB_HUB_FEATURE_PORT_LOW_SPEED
     175//USB_HUB_FEATURE_PORT_LOW_SPEED for port set feature request
    157176
    158177/**
    159178 * bitmask with port status changes
    160179 */
    161 static const uint32_t port_status_change_mask =
    162     (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) |
     180static const uint32_t port_status_change_mask = RHPS_CHANGE_WC_MASK;
     181/*    (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) |
    163182    (1 << USB_HUB_FEATURE_C_PORT_ENABLE) |
    164183    (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) |
    165184    (1 << USB_HUB_FEATURE_C_PORT_RESET) |
    166185    (1 << USB_HUB_FEATURE_C_PORT_SUSPEND);
    167 
     186*/
    168187
    169188static int create_serialized_hub_descriptor(rh_t *instance);
Note: See TracChangeset for help on using the changeset viewer.