1. 23 12月, 2015 4 次提交
    • J
      usb: dwc2: Move reset into dwc2_get_hwparams() · 263b7fb5
      John Youn 提交于
      The reset is required to get reset values of the hardware parameters but
      the force mode is not. Move the base reset into dwc2_get_hwparams() and
      do the reset and force mode afterwards.
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      263b7fb5
    • J
      usb: dwc2: Fix dr_mode validation · 5268ed9d
      John Youn 提交于
      The dr_mode parameter was being checked against how the dwc2 module
      was being configured at compile time. But it wasn't checked against
      the hardware capabilities, nor were the hardware capabilities checked
      against the compilation parameters.
      
      This commit adds those checks and adjusts dr_mode to an appropriate
      value, if needed. If the hardware capabilities and module compilation
      do not match then we fail as it wouldn't be possible to run properly.
      
      The hardware, module, and dr_mode, can each be set to host, device,
      or otg. Check that all these values are compatible and adjust the
      value of dr_mode if possible.
      
      The following table summarizes the behavior:
      
                           actual
         HW  MOD dr_mode   dr_mode
       ------------------------------
        HST  HST  any    :  HST
        HST  DEV  any    :  ---
        HST  OTG  any    :  HST
      
        DEV  HST  any    :  ---
        DEV  DEV  any    :  DEV
        DEV  OTG  any    :  DEV
      
        OTG  HST  any    :  HST
        OTG  DEV  any    :  DEV
        OTG  OTG  any    :  dr_mode
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5268ed9d
    • J
      usb: dwc2: Rename dwc2_core_reset() · 6d58f346
      John Youn 提交于
      Renamed dwc2_core_reset() to dwc2_core_reset_and_force_dr_mode(). This
      describes what it is doing more accurately. This is in preparation of
      introducing a plain dwc2_core_reset() function that only performs the
      reset and doesn't force the mode.
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      6d58f346
    • Y
      usb: dwc2: reset dwc2 core before dwc2_get_hwparams() · cebfdbf3
      Yunzhi Li 提交于
      We initiate dwc2 usb controller in BIOS, dwc2_core_reset() should
      be called before dwc2_get_hwparams() to reset core registers to
      default value. Without this the FIFO setting might be incorrect
      because calculating FIFO size need power-on value of
      GRXFSIZ/GNPTXFSIZ/HPTXFSIZ registers.
      
      This patch could avoid warnning massage like in rk3288 platform:
      [    2.074764] dwc2 ff580000.usb: 256 invalid for
      host_perio_tx_fifo_size. Check HW configuration.
      Signed-off-by: NYunzhi Li <lyz@rock-chips.com>
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      cebfdbf3
  2. 15 12月, 2015 2 次提交
  3. 20 11月, 2015 4 次提交
  4. 18 11月, 2015 1 次提交
    • D
      usb: dwc2: host: Fix ahbcfg for rk3066 · f1659303
      Douglas Anderson 提交于
      The comment for ahbcfg for rk3066 parameters (also used for rk3288)
      claimed that ahbcfg was INCR16, but it wasn't.  Since the bits weren't
      shifted properly, the 0x7 ended up being masked and we ended up
      programming 0x3 for the HBstLen.  Let's set it to INCR16 properly.
      
      As per Wu Liang Feng at Rockchip this may increase transmission
      efficiency.  I did blackbox tests with writing 0s to a USB-based SD
      reader (forcefully capping CPU Freq to try to measure efficiency):
        cd /sys/devices/system/cpu/cpu0/cpufreq
        echo userspace > scaling_governor
        echo 126000 > scaling_setspeed
        for i in $(seq 10); do
          dd if=/dev/zero of=/dev/sdb bs=1M count=750
        done
      
      With the above tests I found that speeds went from ~15MB/s to ~18MB/s.
      Note that most other tests I did (including reading from the same USB
      reader) didn't show any difference in performance.
      Tested-by: NHeiko Stuebner <heiko@sntech.de>
      Acked-by: NJohn Youn <johnyoun@synopsys.com>
      Reviewed-by: NLiangfeng Wu <wulf@rock-chips.com>
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f1659303
  5. 14 10月, 2015 2 次提交
  6. 02 10月, 2015 2 次提交
  7. 27 9月, 2015 2 次提交
  8. 30 4月, 2015 4 次提交
  9. 13 3月, 2015 1 次提交
  10. 13 1月, 2015 1 次提交
  11. 25 11月, 2014 1 次提交
  12. 21 11月, 2014 1 次提交
  13. 15 11月, 2014 4 次提交
  14. 12 9月, 2014 1 次提交
  15. 09 9月, 2014 3 次提交
  16. 28 5月, 2014 1 次提交
  17. 05 2月, 2014 1 次提交
    • A
      usb: dwc2: bail out early when booting with "nousb" · 861e0f5b
      Andre Heider 提交于
      Add usb_disabled() check to prevent kernel oops when booting with "nousb"
      in the cmdline:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000030
      ...
      PC is at bus_add_device+0xe0/0x18c
      LR is at device_add_groups+0x1c/0x20
      ...
      [<c02191c0>] (bus_add_device) from [<c0217130>] (device_add+0x41c/0x538)
      [<c0217130>] (device_add) from [<c023b1d4>] (usb_new_device+0x270/0x35c)
      [<c023b1d4>] (usb_new_device) from [<c0241174>] (usb_add_hcd+0x4fc/0x760)
      [<c0241174>] (usb_add_hcd) from [<c0254ce0>] (dwc2_hcd_init+0x434/0x510)
      [<c0254ce0>] (dwc2_hcd_init) from [<c02594f4>] (dwc2_driver_probe+0x130/0x170)
      [<c02594f4>] (dwc2_driver_probe) from [<c021bbd0>] (platform_drv_probe+0x28/0x58)
      Signed-off-by: NAndre Heider <a.heider@gmail.com>
      Acked-by: NPaul Zimmerman <paulz@synopsys.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      861e0f5b
  18. 14 1月, 2014 1 次提交
  19. 05 12月, 2013 1 次提交
  20. 04 12月, 2013 1 次提交
  21. 20 11月, 2013 1 次提交
  22. 31 10月, 2013 1 次提交