| #
5253aded |
| 22-Dec-2015 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
usb: dwc2: avoid out of bounds access
flush_dcache_range may access data after priv->aligned_buffer end if len > DWC2_DATA_BUF_SIZE. memcpy may access data after buffer end if done > 0
Signed-off-b
usb: dwc2: avoid out of bounds access
flush_dcache_range may access data after priv->aligned_buffer end if len > DWC2_DATA_BUF_SIZE. memcpy may access data after buffer end if done > 0
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
| #
13a39725 |
| 14-Oct-2015 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge remote-tracking branch 'u-boot/master'
|
| #
cf92e05c |
| 02-Sep-2015 |
Simon Glass <sjg@chromium.org> |
Move ALLOC_CACHE_ALIGN_BUFFER() to the new memalign.h header
Now that we have a new header file for cache-aligned allocation, we should move the stack-based allocation macro there also.
Signed-off-
Move ALLOC_CACHE_ALIGN_BUFFER() to the new memalign.h header
Now that we have a new header file for cache-aligned allocation, we should move the stack-based allocation macro there also.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
a5d338b2 |
| 19-Aug-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-usb
|
| #
7a1386f9 |
| 12-Aug-2015 |
Marek Vasut <marex@denx.de> |
usb: dwc2: Rename to dwc2_usb
This driver is not used only on exynos, but also on Altera SoCFPGA, HiSilicon SoCs, RPi etc, so rename it accordingly to prevent confusion.
Signed-off-by: Marek Vasut
usb: dwc2: Rename to dwc2_usb
This driver is not used only on exynos, but also on Altera SoCFPGA, HiSilicon SoCs, RPi etc, so rename it accordingly to prevent confusion.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| #
f522f947 |
| 12-Aug-2015 |
Marek Vasut <marex@denx.de> |
usb: dwc2: Add original Synopsys compat string
Add the Synopsys compatible string. This is used in SoCFPGA DT files.
Signed-off-by: Marek Vasut <marex@denx.de>
|
| #
db402e00 |
| 24-Jul-2015 |
Alexander Stein <alexanders83@web.de> |
dwc2: Add dcache support
This adds dcache support for dwc2. The DMA buffers must be DMA aligned and is flushed for outgoing transactions before starting transfer. For ingoing transactions it is inva
dwc2: Add dcache support
This adds dcache support for dwc2. The DMA buffers must be DMA aligned and is flushed for outgoing transactions before starting transfer. For ingoing transactions it is invalidated after the transfer has finished.
Signed-off-by: Alexander Stein <alexanders83@web.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org> [trini: Update to apply again on top of DM patches] Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
ae27120c |
| 06-Aug-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
f58a41e0 |
| 08-Jul-2015 |
Simon Glass <sjg@chromium.org> |
dm: usb: Add driver-model support to dwc2
Add driver model support to this driver so it can be used with the new USB stack.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| #
cc3e3a9e |
| 08-Jul-2015 |
Simon Glass <sjg@chromium.org> |
dm: usb: Prepare dwc2 driver for driver-model conversion
Put all global data in a structure and move (what will be) common code into common functions. This will make the driver-model conversion much
dm: usb: Prepare dwc2 driver for driver-model conversion
Put all global data in a structure and move (what will be) common code into common functions. This will make the driver-model conversion much easier.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
93b99578 |
| 29-Jul-2015 |
Peter Griffin <peter.griffin@linaro.org> |
usb: dwc2: Call board_usb_init() from usb_lowlevel_init()
This patch makes the dwc2 controller like ehci / ohci / xhci controllers by calling the board_usb_init() function from usb_lowlevel_init.
T
usb: dwc2: Call board_usb_init() from usb_lowlevel_init()
This patch makes the dwc2 controller like ehci / ohci / xhci controllers by calling the board_usb_init() function from usb_lowlevel_init.
This can then be implemented by specific platforms to initialise their USB hardware (phys / clocks etc).
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
show more ...
|
| #
cac6d4bf |
| 29-May-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-usb
|
| #
5cfd6c00 |
| 12-May-2015 |
Peter Griffin <peter.griffin@linaro.org> |
usb: dwc2: Add support for v3 snpsid value
This has been tested to the extent that I can enumerate a asix usb networking adapter and boot a kernel over usb on the 96boards hikey u-boot port I'm curr
usb: dwc2: Add support for v3 snpsid value
This has been tested to the extent that I can enumerate a asix usb networking adapter and boot a kernel over usb on the 96boards hikey u-boot port I'm currently doing.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
show more ...
|
| #
5877de91 |
| 12-Apr-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: retry NAK'd interrupt transfers
IIUC, interrupt transfers are NAK'd by devices until they wish to trigger an interrupt, and e.g. EHCI controllers retry these in HW until they are ACK'd. H
usb: dwc2: retry NAK'd interrupt transfers
IIUC, interrupt transfers are NAK'd by devices until they wish to trigger an interrupt, and e.g. EHCI controllers retry these in HW until they are ACK'd. However, DWC2 doesn't seem to retry, so we need to do this in SW. In practice, I've seen DWC2_HCINT_FRMOVRUN happen too. I'm not quite sure what this error implies; perhaps it's related to how near the end of a USB frame we're at when the interrupt transfer is initiated? Anyway, retrying this temporary error seems to be necessary too.
With all these commits applied, both my USB keyboards (one LS Lenovo and one FS Dell) work correctly when there is no USB hub between the SoC and the keyboard; We still need split transactions to be implemented for hubs to work.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
| #
e236519b |
| 11-Apr-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: implement interrupt transfers
As best I can tell, there's no difference between bulk and interrupt transfers in terms of how the HW should be programmed, at least given that we're executi
usb: dwc2: implement interrupt transfers
As best I can tell, there's no difference between bulk and interrupt transfers in terms of how the HW should be programmed, at least given that we're executing one transaction at a time rather than scheduling them into frames for maximum throughput.
This patch ends up sharing the toggle bit state between bulk and interrupt transfers on a particular EP. However I believe this is fine; AFAIK a given EP either uses bulk or interrupt transfers and doesn't mix them.
This patch doesn't do anything with the "interval" parameter for interrupt transfers, but then most other USB controller drivers in U-Boot don't either.
It turns out that one of my keyboards is happy to work using control transfers but the other only gives non-zero "HID reports" via interrupt transfers.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
| #
ed9bcbc7 |
| 11-Apr-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: correctly program hcchar for LS devices
A bit must be set in HCCHAR when communicating with low-speed devices. I have no idea why there's no corresponding bit to distinguish between full-
usb: dwc2: correctly program hcchar for LS devices
A bit must be set in HCCHAR when communicating with low-speed devices. I have no idea why there's no corresponding bit to distinguish between full-speed and high-speed devices, but no matter; they all work now!
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
| #
4748cce5 |
| 28-Mar-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: detect device speed correctly
This doesn't make my LS keyboard work any better, but it does at least report the correct speed in "usb tree".
Signed-off-by: Stephen Warren <swarren@wwwdot
usb: dwc2: detect device speed correctly
This doesn't make my LS keyboard work any better, but it does at least report the correct speed in "usb tree".
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
| #
5c0beb5c |
| 25-Mar-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: use phys_to_bus/bus_to_phys
Use of these APIs is required on the Raspberry Pi. With this change, USB on RPi1 should be more reliable, and USB on the RPi2 will start working.
Signed-off-b
usb: dwc2: use phys_to_bus/bus_to_phys
Use of these APIs is required on the Raspberry Pi. With this change, USB on RPi1 should be more reliable, and USB on the RPi2 will start working.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
| #
fc909c05 |
| 24-Mar-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: fix bulk transfers
When I created wait_for_chhltd(), I noticed that some instances of the code it replaced expected the ACK bit to be set and others didn't. I assumed this was an accident
usb: dwc2: fix bulk transfers
When I created wait_for_chhltd(), I noticed that some instances of the code it replaced expected the ACK bit to be set and others didn't. I assumed this was an accidental inconsistency in the code, so wrote wait_for_chhltd() to always expect ACK to be set. This code appeared to work correctly for both enumeration of USB keyboards and operation of USB Ethernet devices. However, this change broke USB Mass Storage (at least my USB SD card reader). This change reverts to exactly the original behaviour. I'm not sure why the ACK bit isn't always set (perhaps a quirk in the USB HW or DWC2 controller), but the code works this way!
Fixes: 5be4ca7d6ac8 ("usb: dwc2: unify waiting for transfer completion") Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
| #
805b67e1 |
| 08-Mar-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: remove restriction on buffer length
Each USB transfer is split up into chunks that are held in an aligned buffer. This imposes a limit on the size of each chunk, but no limit on the total
usb: dwc2: remove restriction on buffer length
Each USB transfer is split up into chunks that are held in an aligned buffer. This imposes a limit on the size of each chunk, but no limit on the total size of transferred data. Fix the logic in chunk_msg() not to reject large transfers, but simply take the size of the aligned buffer into account when calculating the chunk size.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
| #
d1c880c6 |
| 08-Mar-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: fix aligned buffer usage
The original aligned_buffer usage: a) Uselessly copied data into the aligned buffer even for IN transactions. Fix this my making the copy conditional. b) Alway
usb: dwc2: fix aligned buffer usage
The original aligned_buffer usage: a) Uselessly copied data into the aligned buffer even for IN transactions. Fix this my making the copy conditional. b) Always programmed the HW to transfer to/from the start of the aligned buffer. This worked fine for OUT transactions since the memcpy copied the OUT data to this location too. However, for large IN transactions, since the copy from the aligned buffer to the "client" buffer was deferred until after all chunks were transferred. it resulted in each chunk's transfer over-writing the data for the first transfer. Fix this by copying IN data as soon as it's received.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
| #
66ffc875 |
| 08-Mar-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: simplify wait_for_chhltd
toggle is never NULL. Simplify the code by removing handling of when it is NULL.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
|
| #
282685e0 |
| 08-Mar-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: remove control_data_toggle[]
The control data toggle resets to DATA1 at the start of the data phase of every setup transaction. We don't need a global variable to store the value; we can
usb: dwc2: remove control_data_toggle[]
The control data toggle resets to DATA1 at the start of the data phase of every setup transaction. We don't need a global variable to store the value; we can just store it on the stack.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
| #
ee837554 |
| 08-Mar-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: usb chunk_msg() for control transfers too
This removes duplicated code.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
|
| #
7b5e504d |
| 08-Mar-2015 |
Stephen Warren <swarren@wwwdotorg.org> |
usb: dwc2: refactor submit_bulk_msg to be common
Move the body of submit_bulk_msg() into new function chunk_msg(). This can be shared with submit_control_msg() to reduce code duplication, and allow
usb: dwc2: refactor submit_bulk_msg to be common
Move the body of submit_bulk_msg() into new function chunk_msg(). This can be shared with submit_control_msg() to reduce code duplication, and allow control messages larger than maxpacket.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|