<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/usb.c, branch v2009.06</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>usb_scan_devices: fix output with no devices</title>
<updated>2009-01-28T18:57:31+00:00</updated>
<author>
<name>Bryan Wu</name>
<email>bryan.wu@analog.com</email>
</author>
<published>2009-01-19T04:04:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1a448db77b10153703bc5e4ad13dd55d88beb1d6'/>
<id>1a448db77b10153703bc5e4ad13dd55d88beb1d6</id>
<content type='text'>
We should check the return of usb_new_device() so that if no USB device is
found, we print out the right message rather than always saying "new usb
device found".

Signed-off-by: Bryan Wu &lt;bryan.wu@analog.com&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should check the return of usb_new_device() so that if no USB device is
found, we print out the right message rather than always saying "new usb
device found".

Signed-off-by: Bryan Wu &lt;bryan.wu@analog.com&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: Add high-speed (480Mb/s) to all USB related outputs</title>
<updated>2009-01-28T18:57:31+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2009-01-22T09:11:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f1c1f540243438246aefb703fdcf16957e3a72e1'/>
<id>f1c1f540243438246aefb703fdcf16957e3a72e1</id>
<content type='text'>
With this patch the USB related connection speed output ("usb tree" command and
debug output) is now high-speed enabled.

This patch also fixes a compilation warning when debugging is enabled.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this patch the USB related connection speed output ("usb tree" command and
debug output) is now high-speed enabled.

This patch also fixes a compilation warning when debugging is enabled.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB change speed</title>
<updated>2009-01-28T18:57:28+00:00</updated>
<author>
<name>Michael Trimarchi</name>
<email>trimarchi@gandalf.sssup.it</email>
</author>
<published>2008-12-18T09:05:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=366523c26b6320af171459b19e6e0e9e3baa83ca'/>
<id>366523c26b6320af171459b19e6e0e9e3baa83ca</id>
<content type='text'>
USB changes the speed according to the port status

Signed-off-by: Michael Trimarchi &lt;trimarchimichael@yahoo.it&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
USB changes the speed according to the port status

Signed-off-by: Michael Trimarchi &lt;trimarchimichael@yahoo.it&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Prepare USB layer for ehci</title>
<updated>2009-01-28T18:57:27+00:00</updated>
<author>
<name>Michael Trimarchi</name>
<email>trimarchi@gandalf.sssup.it</email>
</author>
<published>2008-11-28T12:19:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3e126484df7868e341545cce740b24b62b0cd3b7'/>
<id>3e126484df7868e341545cce740b24b62b0cd3b7</id>
<content type='text'>
Prepare USB layer for ehci support

Signed-off-by: Michael Trimarchi &lt;trimarchi@gandalf.sssup.it&gt;
Signed-off-by: Remy Böhmer &lt;linux@bohmer.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare USB layer for ehci support

Signed-off-by: Michael Trimarchi &lt;trimarchi@gandalf.sssup.it&gt;
Signed-off-by: Remy Böhmer &lt;linux@bohmer.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB style patch, 80 chars strict</title>
<updated>2008-11-28T20:24:12+00:00</updated>
<author>
<name>Michael Trimarchi</name>
<email>trimarchi@gandalf.sssup.it</email>
</author>
<published>2008-11-26T16:41:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=de39f8c19d7c12017248c49d432dcb81db68f724'/>
<id>de39f8c19d7c12017248c49d432dcb81db68f724</id>
<content type='text'>
USB Code style patch

Signed-off-by: Michael Trimarchi &lt;trimarchi@gandalf.sssup.it&gt;
Signed-off-by: Remy Böhmer &lt;linux@bohmer.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
USB Code style patch

Signed-off-by: Michael Trimarchi &lt;trimarchi@gandalf.sssup.it&gt;
Signed-off-by: Remy Böhmer &lt;linux@bohmer.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix USB initialisation procedure</title>
<updated>2008-10-14T14:42:44+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>linux@bohmer.net</email>
</author>
<published>2008-10-10T08:23:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=48867208444cb2a82e2af9c3249e90b7ed4a1751'/>
<id>48867208444cb2a82e2af9c3249e90b7ed4a1751</id>
<content type='text'>
The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes.
At some places directly 8,16,32,64 was used instead of the encoded
value. Made a enum for the options to make this more clear and to help
preventing similar errors in the future.

After fixing this bug it became clear that another bug existed where
the 'pipe' is and-ed with PIPE_* flags, where it should have been
'usb_pipetype(pipe)', or even better usb_pipeint(pipe).

Also removed the triple 'get_device_descriptor' sequence, it has no use,
and Windows nor Linux behaves that way.
There is also a poll going on with a timeout when usb_control_msg() fails.
However, the poll is useless, because the flag will never be set on a error,
because there is no code that runs in a parallel that can set this flag.
Changed this to something more logical.

Tested on AT91SAM9261ek and compared the flow on the USB bus to what
Linux is doing. There is no difference anymore in the early initialisation
sequence.

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes.
At some places directly 8,16,32,64 was used instead of the encoded
value. Made a enum for the options to make this more clear and to help
preventing similar errors in the future.

After fixing this bug it became clear that another bug existed where
the 'pipe' is and-ed with PIPE_* flags, where it should have been
'usb_pipetype(pipe)', or even better usb_pipeint(pipe).

Also removed the triple 'get_device_descriptor' sequence, it has no use,
and Windows nor Linux behaves that way.
There is also a poll going on with a timeout when usb_control_msg() fails.
However, the poll is useless, because the flag will never be set on a error,
because there is no code that runs in a parallel that can set this flag.
Changed this to something more logical.

Tested on AT91SAM9261ek and compared the flow on the USB bus to what
Linux is doing. There is no difference anymore in the early initialisation
sequence.

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB layer of U-Boot causes USB protocol errors while using USB memory sticks</title>
<updated>2008-09-17T13:41:21+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>linux@bohmer.net</email>
</author>
<published>2008-09-16T12:55:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c9e8436b10cca53fca4904ecbadcd6231ad72c38'/>
<id>c9e8436b10cca53fca4904ecbadcd6231ad72c38</id>
<content type='text'>
There are several differences between Linux, Windows and U-boot for initialising the
USB devices. While analysing the behaviour of U-boot it turned out that U-boot does
things really different, and some are wrong (compared to the USB standard).

This patch fixes some errors:
* The NEW_init procedure that was already in the code is good, while the old procedure
  is wrong. See code comments for more info.
* On a Control request the data returned by the device can be more than 8 bytes, while
  the host limits it to 8 bytes. This caused the host to generate a DataOverrun error.
  This results in a lot of USB sticks not being recognised, and the transmission ended
  frequently with a CTL:TIMEOUT Error.
* Added a flag CONFIG_LEGACY_USB_INIT_SEQ to allow users to use the old init procedure.

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are several differences between Linux, Windows and U-boot for initialising the
USB devices. While analysing the behaviour of U-boot it turned out that U-boot does
things really different, and some are wrong (compared to the USB standard).

This patch fixes some errors:
* The NEW_init procedure that was already in the code is good, while the old procedure
  is wrong. See code comments for more info.
* On a Control request the data returned by the device can be more than 8 bytes, while
  the host limits it to 8 bytes. This caused the host to generate a DataOverrun error.
  This results in a lot of USB sticks not being recognised, and the transmission ended
  frequently with a CTL:TIMEOUT Error.
* Added a flag CONFIG_LEGACY_USB_INIT_SEQ to allow users to use the old init procedure.

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactoring parts of the common USB OHCI code</title>
<updated>2008-09-17T13:41:16+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>linux@bohmer.net</email>
</author>
<published>2008-09-16T12:55:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6f5794a6f78b313231256958fd73673c6aacc116'/>
<id>6f5794a6f78b313231256958fd73673c6aacc116</id>
<content type='text'>
This patch refactors some large routines of the USB OHCI code by
making some routines smaller and more readable which helps
debugging and understanding the code. (Makes the code looks
somewhat more like the Linux implementation.)

Also made entire file compliant to Linux Coding Rules (checkpatch.pl compliant)

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch refactors some large routines of the USB OHCI code by
making some routines smaller and more readable which helps
debugging and understanding the code. (Makes the code looks
somewhat more like the Linux implementation.)

Also made entire file compliant to Linux Coding Rules (checkpatch.pl compliant)

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix for USB sticks not working on ARM while using GCC 4.x compilers</title>
<updated>2008-09-17T13:41:05+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>linux@bohmer.net</email>
</author>
<published>2008-09-16T12:55:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=be19d324edc1a1d7f393d24e10d164cd94c91a00'/>
<id>be19d324edc1a1d7f393d24e10d164cd94c91a00</id>
<content type='text'>
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 &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make usb-stop() safe to call multiple times in a row.</title>
<updated>2008-09-09T14:59:25+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>linux@bohmer.net</email>
</author>
<published>2008-08-20T09:22:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=eba1f2fc75f128a9a6c1328d786996a93fd7a707'/>
<id>eba1f2fc75f128a9a6c1328d786996a93fd7a707</id>
<content type='text'>
A recent commit (936897d4d1365452bbbdf8430db5e7769ef08d38)
enabled the usb_stop() command in common/cmd_bootm.c which was
not enabled for some time, because no board did actually set the
CFG_CMD_USB flag. So, now the usb_stop() is executed before
loading the linux kernel.

However, the usb_ohci driver hangs up (at least on AT91SAM) if the
driver is stopped twice (e.g. the peripheral clock is stopped on AT91).
If some other piece of code calls usb_stop() before the bootm command,
this command will hangup the system during boot.
(usb start and stop is typically used while booting from usb memory stick)

But, stopping the usb stack twice is useless anyway, and a flag already
existed that kept track on the usb_init()/usb_stop() calls.
So, we now check if the usb stack is really started before we stop it.

This problem is now fixed in both the upper as low-level layer.

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Acked-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A recent commit (936897d4d1365452bbbdf8430db5e7769ef08d38)
enabled the usb_stop() command in common/cmd_bootm.c which was
not enabled for some time, because no board did actually set the
CFG_CMD_USB flag. So, now the usb_stop() is executed before
loading the linux kernel.

However, the usb_ohci driver hangs up (at least on AT91SAM) if the
driver is stopped twice (e.g. the peripheral clock is stopped on AT91).
If some other piece of code calls usb_stop() before the bootm command,
this command will hangup the system during boot.
(usb start and stop is typically used while booting from usb memory stick)

But, stopping the usb stack twice is useless anyway, and a flag already
existed that kept track on the usb_init()/usb_stop() calls.
So, we now check if the usb stack is really started before we stop it.

This problem is now fixed in both the upper as low-level layer.

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Acked-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
