diff options
author | Remy Bohmer <linux@bohmer.net> | 2008-09-16 14:55:42 +0200 |
---|---|---|
committer | Markus Klotzbuecher <mk@denx.de> | 2008-09-17 15:41:05 +0200 |
commit | be19d324edc1a1d7f393d24e10d164cd94c91a00 (patch) | |
tree | b8def4593f28fadb96b1ab713a8a65a2ace03806 /drivers/usb | |
parent | 87b4ef560cf2da4ccc9e59711ad1ff7fafe96670 (diff) | |
download | u-boot-imx-be19d324edc1a1d7f393d24e10d164cd94c91a00.zip u-boot-imx-be19d324edc1a1d7f393d24e10d164cd94c91a00.tar.gz u-boot-imx-be19d324edc1a1d7f393d24e10d164cd94c91a00.tar.bz2 |
Fix for USB sticks not working on ARM while using GCC 4.x compilers
The GCC-compiler makes an optimisation error while optimising the routine
usb_set_maxpacket(). This should be fixed in the compiler in the first place,
but there lots of compilers out there that makes this error, that it is
probably wiser to workaround it in U-boot itself.
What happens is that the register r3 is used as loop-counter 'i', but gets
overwritten later on. From there it starts using register r3 for several other
things and the assembler code is becoming a big mess. This is clearly a compiler bug.
This error occurs on at least several versions of Code Sourcery Lite compilers
for ARM. Like the Edition 2008q1, and 2008q3, It has also been seen on other
compilers, while compiling for armv4t, or armv5te with Os, O1 and O2.
We work around it by splitting up this routine in 2 parts, and making sure that
the split out part is NOT inlined any longer. This will make GCC spit out assembler
that do not show this problem. Another possibility is to adapt the Makefile to stop
optimisation for the complete file. I think this solution is nicer.
Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
Diffstat (limited to 'drivers/usb')
0 files changed, 0 insertions, 0 deletions