1. 11 4月, 2017 3 次提交
    • R
      usb: dwc3: core: make dwc3_set_mode() work properly · 41ce1456
      Roger Quadros 提交于
      We can't have both Host and Peripheral roles active at the same time
      because of one detail on DWC3: it shares the same memory area for both
      Host and Peripheral registers.
      
      When swapping roles we must reinitialize the new role every
      time. Let's make sure this works for our debugfs interface.
      Signed-off-by: NRoger Quadros <rogerq@ti.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      41ce1456
    • R
      usb: dwc3: core: add current_dr_role member · 6b3261a2
      Roger Quadros 提交于
      We're going to use this member to track which role we're currently
      playing, that way we can more easily implement dual-role swap in
      upcoming patches.
      Signed-off-by: NRoger Quadros <rogerq@ti.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      6b3261a2
    • B
      usb: dwc3: refactor gadget endpoint count calculation · 47d3946e
      Bryan O'Donoghue 提交于
      - DWC_USB3_NUM indicates the number of Device mode single directional
        endpoints, including OUT and IN endpoint 0.
      
      - DWC_USB3_NUM_IN_EPS indicates the maximum number of Device mode IN
        endpoints active at any time, including control endpoint 0.
      
      It's possible to configure RTL such that DWC_USB3_NUM_EPS is equal to
      DWC_USB3_NUM_IN_EPS.
      
      dwc3-core calculates the number of OUT endpoints as DWC_USB3_NUM minus
      DWC_USB3_NUM_IN_EPS. If RTL has been configured with DWC_USB3_NUM_IN_EPS
      equal to DWC_USB3_NUM then dwc3-core will calculate the number of OUT
      endpoints as zero.
      
      For example a from dwc3_core_num_eps() shows:
      [    1.565000]  /usb0@f01d0000: found 8 IN and 0 OUT endpoints
      
      This patch refactors the endpoint calculation down to one variable
      dwc->num_eps taking care to maintain the current mapping of endpoints for
      fixed FPGA configurations as described in Table 4-7 of version 2.60a of the
      DWC USB3 databook.
      
      The endpoint mapping will then be EP-OUT, EP-IN etc, up to DWC_USB3_NUM.
      If DWC_USB3_NUM is odd then OUT will take the extra endpoint.
      Suggested-by: NFelipe Balbi <balbi@kernel.org>
      Signed-off-by: NBryan O'Donoghue <pure.logic@nexus-software.ie>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      47d3946e
  2. 27 3月, 2017 1 次提交
  3. 18 11月, 2016 6 次提交
  4. 08 11月, 2016 1 次提交
  5. 03 11月, 2016 6 次提交
  6. 31 10月, 2016 1 次提交
  7. 07 9月, 2016 1 次提交
    • T
      usb: dwc3: Fix dr_mode validation · 9d6173e1
      Thinh Nguyen 提交于
      This patch follows the similar fix in dwc2. See
      commit 5268ed9d ("usb: dwc2: Fix dr_mode validation")
      
      Currently, the dr_mode is only checked against the module configuration.
      It also needs to be checked against the hardware capablities.
      
      The driver now checks if both the module configuration and hardware are
      capable of the dr_mode value. If not, then it will issue a warning and
      fall back to a supported value. If it is unable to fall back to a
      suitable value, then the probe will fail.
      
      Behavior summary:
      
            module          :  actual
       HW   config  dr_mode :  dr_mode
      ---------------------------------
       host  host   any     :  host
       host  dev    any     :  INVALID
       host  otg    any     :  host
      
       dev   host   any     :  INVALID
       dev   dev    any     :  dev
       dev   otg    any     :  dev
      
       otg   host   any     :  host
       otg   dev    any     :  dev
       otg   otg    any     :  dr_mode
      Signed-off-by: NThinh Nguyen <thinhn@synopsys.com>
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      9d6173e1
  8. 25 8月, 2016 5 次提交
  9. 22 8月, 2016 1 次提交
  10. 21 6月, 2016 3 次提交
  11. 20 6月, 2016 6 次提交
  12. 19 4月, 2016 2 次提交
  13. 18 4月, 2016 2 次提交
  14. 14 4月, 2016 2 次提交