[U-Boot] [PATCH] USB: Change "usb tree" cmd to print 480MBit upon highspeed connection

Stefan Roese sr at denx.de
Thu Jan 22 06:21:30 CET 2009


On Thursday 22 January 2009, Michael Trimarchi wrote:
> Mike Frysinger wrote:
> > On Wednesday 21 January 2009 11:11:47 Stefan Roese wrote:
> >> Signed-off-by: Stefan Roese <sr at denx.de>
> >> ---
> >>  common/cmd_usb.c |    1 +
> >>  1 files changed, 1 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/common/cmd_usb.c b/common/cmd_usb.c
> >> index 9e55c7c..773d1b5 100644
> >> --- a/common/cmd_usb.c
> >> +++ b/common/cmd_usb.c
> >> @@ -310,6 +310,7 @@ void usb_show_tree_graph(struct usb_device *dev,
> >> char *pre) pre[index] = 0;
> >>  	printf(" %s (%s, %dmA)\n", usb_get_class_desc(
> >>  					dev->config.if_desc[0].bInterfaceClass),
> >> +					dev->speed == 2 ? "480MBit/s" :
> >>  					dev->speed ? "1.5MBit/s" : "12MBit/s",
> >>  					dev->config.MaxPower * 2);
> >>  	if (strlen(dev->mf) || strlen(dev->prod) || strlen(dev->serial))
>
> I personally prefer using the #define instead the number 1, 2, 3 (refer
> to linux/drivers/usb/core/hub.c)

OK, I'll provide a patch using the defines later today.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list