[U-Boot] USB Device Identification -- non-removable USB NAND flash

Curt Brune curt at cumulusnetworks.com
Thu Apr 18 06:33:29 CEST 2013


Hi - 

Looking for suggestions on how to identify a particular USB mass storage device on my platform.

My platform has a P2020 SoC.  The SoC USB controller is connected to an on board USB hub.  The hub has 3 connections as follows:

+---------+
|         |--->[USB flash controller, fronting a 2GB NAND flash]
| USB Hub |--->[front panel USB connector]
|         |--->[front panel USB connector]
+---------+

My uImage is stored on the NAND in a raw partition. I have been using the usbboot command just fine.  Something like this:

  uboot> usbboot $loadaddr 0:0 && bootm $loadaddr

That boots from storage device 0, partition 0.  That works great.

The problem is when I *also* have a USB memory stick plugged into one of the front panel ports.  In that case my boot device no longer shows up as device "0", but rather "1".

I'm guessing this problem is not unique.

Is there a way to "fix" the device number for the non-removable flash to always be 0?

Alternatively is there a way to figure out at run time (in a script) what device corresponds to my internal flash?

I started hacking on common/usb.c and I see how I can make it work, but that solution seemed wrong.  There's got to be a better way.

Any suggestions are much appreciated.

Cheers,
Curt


More information about the U-Boot mailing list