[U-Boot] [PATCH 1/6] usb : musb : Add high speed field in usb_device structure
michael
trimarchi at gandalf.sssup.it
Thu Dec 18 10:06:52 CET 2008
Abraham, Thomas wrote:
> Hi Remy,
>
>
>> -----Original Message-----
>> From: l.pinguin at gmail.com [mailto:l.pinguin at gmail.com] On
>> Behalf Of Remy Bohmer
>> Sent: Wednesday, December 17, 2008 1:48 AM
>> To: Abraham, Thomas
>>
>>
>
> <snip>
>
>
>> Same, Michael combined slow+high into 1 single element called
>> 'speed', what I would prefer here.
>>
>> Can you please rebase your work on the U-boot-usb tree, 'next' branch?
>> And streamline these changes with the work Michael already has done?
>>
>
> Ok. I will rebase with u-boot-usb next branch.
>
> For mentor usb controller, it would still be necessary to record the speed of the device when it is found connected to a hub port. So the update of usb->speed would have to be done as below in 'usb_hub_port_connect_change' function. Would this be acceptable?
>
> /* Allocate a new device struct for it */
> usb = usb_alloc_new_device();
> usb->speed = (portstatus & USB_PORT_STAT_LOW_SPEED) ? 1 : 0;
> +usb->speed = (portstatus & USB_PORT_STAT_HIGH_SPEED) ? 1 : 0;
>
>
I'll send a patch. I think that the correct way to do it is:
+
+ if (portstatus & USB_PORT_STAT_HIGH_SPEED)
+ usb->speed = USB_SPEED_HIGH;
+ else if (portstatus & USB_PORT_STAT_LOW_SPEED)
+ usb->speed = USB_SPEED_LOW;
+ else
+ usb->speed = USB_SPEED_FULL;
Like linux does.
>> Kind Regards,
>>
>> Remy
>>
>
> Thanks,
> Thomas.
>
>
>
Regards Michael
More information about the U-Boot
mailing list