From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mateusz Kulikowski Date: Thu, 31 Dec 2015 12:31:17 +0100 Subject: [U-Boot] [PATCH v3 2/5] usb: dwc2: Use shared wait_for_bit In-Reply-To: <181436916.aXENOq8L9R@pebbles.site> References: <1451237293-24497-1-git-send-email-mateusz.kulikowski@gmail.com> <1451237293-24497-3-git-send-email-mateusz.kulikowski@gmail.com> <181436916.aXENOq8L9R@pebbles.site> Message-ID: <20151231113117.GA30140@rlyeh> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, On Sun, Dec 27, 2015 at 11:17:55PM +0100, Stefan Bruens wrote: > 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 > > 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. This may be a good idea, but I prefer to add it to my todo list (or you can do it once this series gets submitted or as dependant patch). I need wait_for_bit for my board/driver. Doing another set of upgrades will delay it. I will also have access to dwc2 device around mid. Jan so will be able to test "bigger" refactors. Is it ok with you? Regards, Mateusz