1. 24 1月, 2017 2 次提交
    • J
      usb: dwc2: Cleanup some checkpatch issues · 9da51974
      John Youn 提交于
      This commmit is the result of running checkpatch --fix.
      
      The results were verified for correctness. Some of the fixes result in
      line over 80 char which we will fix manually later.
      
      The following is a summary of what was done by checkpatch:
      * Remove externs on function prototypes.
      * Replace symbolic permissions with octal.
      * Align code to open parens.
      * Replace 'unsigned' with 'unsigned int'.
      * Remove unneccessary blank lines.
      * Add blank lines after declarations.
      * Add spaces around operators.
      * Remove unnecessary spaces after casts.
      * Replace 'x == NULL' with '!x'.
      * Replace kzalloc() with kcalloc().
      * Concatenate multi-line strings.
      * Use the BIT() macro.
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      9da51974
    • L
      usb: dwc2: use u32 for DT binding parameters · 00c704cc
      Leo Yan 提交于
      Commit 05ee799f ("usb: dwc2: Move gadget settings into core_params")
      changes to type u16 for DT binding "g-rx-fifo-size" and
      "g-np-tx-fifo-size" but use type u32 for "g-tx-fifo-size". Finally the
      the first two parameters cannot be passed successfully with wrong data
      format. This is found the data transferring broken on 96boards Hikey.
      
      This patch is to change all parameters to u32 type, and verified on
      Hikey board the DT parameters can pass successfully.
      
      [johnyoun: minor rebase]
      Signed-off-by: NLeo Yan <leo.yan@linaro.org>
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Tested-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      00c704cc
  2. 18 11月, 2016 17 次提交
  3. 18 10月, 2016 1 次提交
    • J
      Revert "usb: dwc2: gadget: fix TX FIFO size and address initialization" · 3fa95385
      John Youn 提交于
      This reverts commit aa381a72 ("usb: dwc2: gadget: fix TX FIFO size
      and address initialization").
      
      The original commit removed the FIFO size programming per endpoint. The
      DPTXFSIZn register is also used for DIEPTXFn and the SIZE field is r/w
      in dedicated fifo mode. So it isn't appropriate to simply remove this
      initialization as it might break existing behavior.
      
      Also, some cores might not have enough fifo space to handle the
      programming method used in the reverted patch, resulting in fifo
      initialization failure.
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Cc: Robert Baldyga <r.baldyga@samsung.com>
      Cc: Stefan Wahren <stefan.wahren@i2se.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      3fa95385
  4. 08 9月, 2016 1 次提交
  5. 31 8月, 2016 1 次提交
  6. 22 8月, 2016 1 次提交
  7. 21 6月, 2016 3 次提交
  8. 31 5月, 2016 1 次提交
    • A
      usb: dwc2: fix regression on big-endian PowerPC/ARM systems · 23e34392
      Arnd Bergmann 提交于
      A patch that went into Linux-4.4 to fix big-endian mode on a Lantiq
      MIPS system unfortunately broke big-endian operation on PowerPC
      APM82181 as reported by Christian Lamparter, and likely other
      systems.
      
      It actually introduced multiple issues:
      
      - it broke big-endian ARM kernels: any machine that was working
        correctly with a little-endian kernel is no longer using byteswaps
        on big-endian kernels, which clearly breaks them.
      - On PowerPC the same thing must be true: if it was working before,
        using big-endian kernels is now broken. Unlike ARM, 32-bit PowerPC
        usually uses big-endian kernels, so they are likely all broken.
      - The barrier for dwc2_writel is on the wrong side of the __raw_writel(),
        so the MMIO no longer synchronizes with DMA operations.
      - On architectures that require specific CPU instructions for MMIO
        access, using the __raw_ variant may turn this into a pointer
        dereference that does not have the same effect as the readl/writel.
      
      This patch is a simple revert for all architectures other than MIPS,
      in the hope that we can more easily backport it to fix the regression
      on PowerPC and ARM systems without breaking the Lantiq system again.
      
      We should follow this up with a more elaborate change to add runtime
      detection of endianness, to make sure it also works on all other
      combinations of architectures and implementations of the usb-dwc2
      device. That patch however will be fairly large and not appropriate
      for backports to stable kernels.
      
      Felipe suggested a different approach, using an endianness switching
      register to always put the device into LE mode, but unfortunately
      the dwc2 hardware does not provide a generic way to do that. Also,
      I see no practical way of addressing the problem more generally by
      patching architecture specific code on MIPS.
      
      Fixes: 95c8bc36 ("usb: dwc2: Use platform endianness when accessing registers")
      Acked-by: NJohn Youn <johnyoun@synopsys.com>
      Tested-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      23e34392
  9. 04 3月, 2016 7 次提交
  10. 23 12月, 2015 6 次提交