Ignore:
File:
1 edited

Legend:

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

    r60b3bea 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) |
    147 (1 << USB_HUB_FEATURE_PORT_SUSPEND) |
    148 (1 << USB_HUB_FEATURE_PORT_OVER_CURRENT) |
    149 (1 << USB_HUB_FEATURE_PORT_POWER) |
    150 (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) |
    151 (1 << USB_HUB_FEATURE_C_PORT_ENABLE) |
    152 (1 << USB_HUB_FEATURE_C_PORT_SUSPEND) |
    153 (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) |
    154 (1 << USB_HUB_FEATURE_C_PORT_RESET);
     165    (1 << USB_HUB_FEATURE_PORT_SUSPEND) |
     166    (1 << USB_HUB_FEATURE_PORT_OVER_CURRENT) |
     167    (1 << USB_HUB_FEATURE_PORT_POWER) |
     168    (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) |
     169    (1 << USB_HUB_FEATURE_C_PORT_ENABLE) |
     170    (1 << USB_HUB_FEATURE_C_PORT_SUSPEND) |
     171    (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) |
     172    (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) |
    163 (1 << USB_HUB_FEATURE_C_PORT_ENABLE) |
    164 (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) |
    165 (1 << USB_HUB_FEATURE_C_PORT_RESET) |
    166 (1 << USB_HUB_FEATURE_C_PORT_SUSPEND);
    167 
     180static const uint32_t port_status_change_mask = RHPS_CHANGE_WC_MASK;
     181/*    (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) |
     182    (1 << USB_HUB_FEATURE_C_PORT_ENABLE) |
     183    (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) |
     184    (1 << USB_HUB_FEATURE_C_PORT_RESET) |
     185    (1 << USB_HUB_FEATURE_C_PORT_SUSPEND);
     186*/
    168187
    169188static int create_serialized_hub_descriptor(rh_t *instance);
Note: See TracChangeset for help on using the changeset viewer.