Re: Mx28 USB workaround for errata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 23 Sep 2013, Robert Hodaszi wrote:

> Hi,
> 
> I had a lot of USB errors on i.mx28. I could reproduce it most easily 
> with USB-serial adapters, and USB modems (CDC and WWAN drivers). If I 
> sent some data to the TTY port with the echo command in a loop (so 
> basically open the port, send data, and close the port), all of the 
> devices were dropped down from the root hub. (Later I found, it is 
> enough to just periodically open and close the TTY port.)
> 
> The reason was an mx28 errata: "ENGR119653 USB: ARM to USB register 
> error issue"
> 
> Freescale issued a patch for 2.6.35 to workaround this problem last 
> year. I ported this patch. However, it is not totally "device tree 
> compatible". I mean, this patch is only needed for mx28, not for the 
> other SOCs using chipidea, and I used ifdefs. So you can't compile a 
> kernel both for mx28 and e.g. for mx23. If you check the patch, you see, 
> that it is modifying the lowest layer, the writel() function; it is 
> changing it to an SWP instruction. According the errata, I need to use 
> SWP instructions to write USB registers.

Presumably you _could_ use the SWP instructions for other SOCs, but 
they would slow down the driver.  Right?

> So I'm curious, what other possibilities do I have to make this patch 
> device tree compatible? I mean, I can't check the machine's type on each 
> USB register writing.

Actually you can.  See the definition of ehci_writel for an example.

> Then I could use function pointers for register 
> writing function, or weak aliases somehow. But that would causes an 
> overhead because of the additional function calling, instead of simple 
> inline assembly codes.
> 
> What's the standard way in this case? Or should I just leave the patch 
> as it is?

Let's see what the Freescale and ChipIdea maintainers suggest.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux