• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: fix for booting from USB with multiple devices  (Read 4434 times)
leadog
Newbie
*

Karma: 1
Posts: 6


View Profile
« on: October 30, 2009, 11:00:10 AM »

I believe I've found a fix for the USB boot failures when multiple devices are attached to the Sheevaplug via a hub. Looks like U-Boot was incorrectly determining the speed of the devices as it was probing the bus. Attached is a modified usb.c that can be applied to your build tree as well as a prebuilt flash image.

Please let me know if you have issues with this change. You know how newbie posters can be Smiley

FYI, I used the steps provided by http://plugcomputer.org/plugforum/index.php?topic=765.0 for setting up a U-Boot build.

* uboot-3.4.19-usbfix.tgz (10.92 KB - downloaded 227 times.)
* uboot-3.4.19-usbfix-image.gz (201.43 KB - downloaded 245 times.)
Logged

pc2000
Newbie
*

Karma: 0
Posts: 8


View Profile
« Reply #1 on: November 04, 2009, 10:51:35 PM »

Probably useful to provide a diff Smiley


--- usb.c       2009-07-08 17:51:06.000000000 +1000
+++ usb.c.fix   2009-10-31 04:23:55.000000000 +1100
@@ -33,6 +33,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  * MA 02111-1307 USA
  *
+ *
+ *
+ * Oct 30, 2009 - Fix bus probing when multiple devices present.
+ *                Previous logic incorrectly determined device speed.
+ *                No copyright of any kind claimed, Lea Edel.
  */
 
 /*
@@ -743,7 +748,14 @@
        dev->epmaxpacketin
  • = 8;
        dev->epmaxpacketout[0] = 8;
 
-    dev->speed = (0x0c000000 & (*(volatile unsigned int *)(0xf1050184))) >> 26;
+        if (dev->devnum <= 2)
+       {
+         /* Our built-in hub is a special case - we must check PORTSC reg.    */
+          /* This should not be here, it should be abstracted to a lower level */
+         /* somehow. I'm taking the shortcut of just fixing previous logic... */
+          dev->speed = (0x0c000000 & (*(volatile unsigned int *)(0xf1050184))) >> 26;
+        }
+
        /* We still haven't set the Address yet */
        addr = dev->devnum;
        dev->devnum = 0;
Logged

OmahaVike
Newbie
*

Karma: 0
Posts: 8


View Profile
« Reply #2 on: January 08, 2011, 07:42:41 AM »

the attached usbfix-image worked great for me.  thank you.  LEADDOGRULES
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #3 on: February 16, 2011, 02:11:02 AM »

Hi leadog,

Quote
I believe I've found a fix for the USB boot failures [...] as well as a prebuilt flash image.

sorry for the naive question, however I guess the patches provided by pingtoo (see post http://plugcomputer.org/plugforum/index.php?topic=1134.msg7016#msg7016 and following) haven't been integrated into your u-boot image?!

Would you or sb else know, if your and pingtoo's (and maybe other fixes) were already merged into a "latest and greatest" image. (doubt I'd be experienced enough to build an image on my own (more likely bricking my plug ;-)))
Logged

Pages: [1]
Print
Jump to: