public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] USB Device Identification -- non-removable USB NAND flash
       [not found] <1958288758.803909.1366258865033.JavaMail.root@cumulusnetworks.com>
@ 2013-04-18  4:33 ` Curt Brune
  2013-04-18  6:25   ` Albert ARIBAUD
  0 siblings, 1 reply; 2+ messages in thread
From: Curt Brune @ 2013-04-18  4:33 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] USB Device Identification -- non-removable USB NAND flash
  2013-04-18  4:33 ` [U-Boot] USB Device Identification -- non-removable USB NAND flash Curt Brune
@ 2013-04-18  6:25   ` Albert ARIBAUD
  0 siblings, 0 replies; 2+ messages in thread
From: Albert ARIBAUD @ 2013-04-18  6:25 UTC (permalink / raw)
  To: u-boot

Hi Curt,

On Wed, 17 Apr 2013 21:33:29 -0700 (PDT), Curt Brune
<curt@cumulusnetworks.com> wrote:

> 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.

Haven't tested this at all, but maybe first do a "usb dev 1" and test
if it succeeded (probably requires enabling the HUSH parser), and if
it did, (try to) load from it; otherwise fall back to "usb dev 0" and
(try to) load.

Testing could actually be "blank a memory area, select usb dev 1 and
blindly load the boot image to the memory area, test image with
'iminfo', and decide if you go on or switch to dev 0.

> Cheers,
> Curt

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-18  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1958288758.803909.1366258865033.JavaMail.root@cumulusnetworks.com>
2013-04-18  4:33 ` [U-Boot] USB Device Identification -- non-removable USB NAND flash Curt Brune
2013-04-18  6:25   ` Albert ARIBAUD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox