Re: [U-Boot] [PATCH] usb: ehci: Fix test mode for connected ports

2013-09-24 Thread Marek Vasut
Dear Simon Glass, > Hi Julius, > > On Mon, Sep 23, 2013 at 8:55 PM, Julius Werner wrote: > > Hi Simon, > > > > > It seems like you could do something like > > > > > > /* > > > > > > * This is the delay for ...the spec requires a minimum of ... > > > */ > > > > > > #define SOME_SUITABLE_NAM

Re: [U-Boot] [PATCH] usb: ehci: Fix test mode for connected ports

2013-09-23 Thread Simon Glass
Hi Julius, On Mon, Sep 23, 2013 at 8:55 PM, Julius Werner wrote: > Hi Simon, > > > It seems like you could do something like > > > > /* > > * This is the delay for ...the spec requires a minimum of ... > > */ > > #define SOME_SUITABLE_NAME 8000 > > > > at the top of the file and then use it tw

Re: [U-Boot] [PATCH] usb: ehci: Fix test mode for connected ports

2013-09-23 Thread Julius Werner
Hi Simon, > It seems like you could do something like > > /* > * This is the delay for ...the spec requires a minimum of ... > */ > #define SOME_SUITABLE_NAME 8000 > > at the top of the file and then use it twice in your function. The file contains a dozen handshake() calls that have a literal

Re: [U-Boot] [PATCH] usb: ehci: Fix test mode for connected ports

2013-09-19 Thread Simon Glass
Hi Julius, On Thu, Sep 19, 2013 at 7:39 PM, Julius Werner wrote: > Hello Marek, > > 8 seemed like a reasonable value. It is not the only possible one. As > I said, the spec requires a minimum of 4.125 (125us to make sure the > current microframe finishes, and 16 * 125us to wait for the 16 full

Re: [U-Boot] [PATCH] usb: ehci: Fix test mode for connected ports

2013-09-19 Thread Julius Werner
Hello Marek, 8 seemed like a reasonable value. It is not the only possible one. As I said, the spec requires a minimum of 4.125 (125us to make sure the current microframe finishes, and 16 * 125us to wait for the 16 full microframes listed on page 20). 8 fulfills that constraint and leaves a little

Re: [U-Boot] [PATCH] usb: ehci: Fix test mode for connected ports

2013-09-19 Thread Marek Vasut
Dear Julius Werner, > > Why 8 * 1000? It's not clear. > > I am not quite sure to be honest... it's been a while since I actually > wrote this patch. The EHCI spec gives no clear max for the > Periodic/Async Schedule disable (I assume not more than a frame, > though), and says the Run/Stop bit mus

Re: [U-Boot] [PATCH] usb: ehci: Fix test mode for connected ports

2013-09-18 Thread Julius Werner
> Why 8 * 1000? It's not clear. I am not quite sure to be honest... it's been a while since I actually wrote this patch. The EHCI spec gives no clear max for the Periodic/Async Schedule disable (I assume not more than a frame, though), and says the Run/Stop bit must halt within 16 microframes (whi

Re: [U-Boot] [PATCH] usb: ehci: Fix test mode for connected ports

2013-09-18 Thread Marek Vasut
Dear Julius Werner, > The EHCI controller has some very specific requirements for the USB 2.0 > port test modes, which were not closely followed in the initial test > mode commit. It demands that the host controller is completely shut down > (all ports suspended, Run/Stop bit unset) when activatin

Re: [U-Boot] [PATCH] usb: ehci: Fix test mode for connected ports

2013-09-17 Thread Simon Glass
Hi, On Tue, Sep 17, 2013 at 6:29 PM, Julius Werner wrote: > The EHCI controller has some very specific requirements for the USB 2.0 > port test modes, which were not closely followed in the initial test > mode commit. It demands that the host controller is completely shut down > (all ports suspe

[U-Boot] [PATCH] usb: ehci: Fix test mode for connected ports

2013-09-17 Thread Julius Werner
The EHCI controller has some very specific requirements for the USB 2.0 port test modes, which were not closely followed in the initial test mode commit. It demands that the host controller is completely shut down (all ports suspended, Run/Stop bit unset) when activating test mode, and will not wor