world leader in high performance signal processing
Trace: » usb

U-Boot and USB

U-Boot supports USB Mass Storage Devices with multiple paritions, with the FAT file system.

Everything is accessed via the usb command:

bfin> help usb
usb reset - reset (rescan) USB controller
usb stop [f]  - stop USB [f]=force stop
usb tree  - show USB device tree
usb info [dev] - show available USB devices
usb storage  - show details of USB storage devices
usb dev [dev] - show or set current USB storage device
usb part [dev] - print partition table of one or all USB storage devices
usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'
    to memory address `addr'

To initialize the usb subsystem, use the usb start call:

bfin> usb start
(Re)start USB...
USB:   scanning bus for devices... No USB Device found
       scanning bus for storage devices... 0 Storage Device(s) found
bfin> 

Yeah - you actually need to plug something in:

bfin> usb start
(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found

bfin> usb info
1: Mass Storage,  USB Revision 2.0
 - SanDisk U3 Cruzer Micro 2443920EACC0F64C
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0781  Product 0x5406 Version 2.0
   Configuration: 1
   - Interfaces: 1 Bus Powered 200mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - Endpoint 1 In Bulk MaxPacket 512
     - Endpoint 2 Out Bulk MaxPacket 512

 bfin> usb storage
  Device 0: Vendor: SanDisk  Rev: 7.01 Prod: Cruzer
            Type: Removable Hard Disk
            Capacity: 955.9 MB = 0.9 GB (1957887 x 512)

bfin> usb tree

Device Tree:
  1  Mass Storage (12 Mb/s, 200mA)
     SanDisk U3 Cruzer Micro 2443920EACC0F64C

bfin> fatinfo usb 0:1
Interface:  USB
  Device 0: Vendor: SanDisk  Rev: 7.01 Prod: Cruzer
            Type: Removable Hard Disk
            Capacity: 955.9 MB = 0.9 GB (1957887 x 512)
Partition 1: Filesystem: FAT16 "NO NAME    "

 bfin> fatls usb 0:1
.
            documents/
            system/
  1336632   launchu3.exe

1 file(s), 2 dir(s)

bfin> fatload usb 0:1 0x1000000 launchu3.exe
reading launchu3.exe
.
.................................................................................................................................

1336632 bytes read