[U-Boot] [PATCH v3 2/5] usb: dwc2: Use shared wait_for_bit

Stefan Bruens
2015-12-27T22:17:55Z

On Sonntag, 27. Dezember 2015 18:28:09 CET Mateusz Kulikowski wrote:
> Use existing library function to poll bit(s).
>
> Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

It might be useful to have not only a relative timeout, but also an absolute
timeout. For dwc2, the timeout handling could be moved from the transactions
wrappers to the chunk_msg function. As the USB timeouts are specified for the
whole transaction, it would be very neat to calculate one deadline for the
whole transaction and hand this absolute timeout to the wait_for_bit(..)
function. At the end, this would also result in less code.

Kind regards,

Stefan

--
Stefan Br?ns / Bergstra?e 21 / 52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019
work: +49 2405 49936-424