[U-Boot] [PATCH] usb: Add new command to regress USB devices

Marek Vasut marex at denx.de
Wed Mar 9 12:28:48 CET 2016


On 03/09/2016 12:22 PM, Rajat Srivastava wrote:
> This patch adds a new 'usb regress' command, that can be used to
> regress test a USB device. It performs the following operations:
> 
> 1. starts the USB device
> 2. performs read/write operations
> 3. stops the USB device
> 4. verifies the contents of read/write operations
> 
> Sample Output:
> => usb regress 81000000 82000000 32m
> regressing USB..
> starting USB...
> USB0:   Register 200017f NbrPorts 2
> Starting the controller
> USB XHCI 1.00
> scanning bus 0 for devices... 2 USB Device(s) found
>        scanning usb for storage devices... 1 Storage Device(s) found
> USB write: device 0 block # 0, count 65536 ... 65536 blocks write: OK
> USB read: device 0 block # 0, count 65536 ... 65536 blocks read: OK
> stopping USB..
> verifying data on addresses 0x81000000 and 0x82000000
> Total of 65536 word(s) were the same
> 
> Signed-off-by: Rajat Srivastava <rajat.srivastava at nxp.com>
> Signed-off-by: Rajesh Bhagat <rajesh.bhagat at nxp.com>


Does it do anything which cannot be achieved on the command line itself
using "usb reset" "usb write" "usb read" "cmp" commands ?

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list