public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: michael <trimarchi@gandalf.sssup.it>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6] usb : musb : Add high speed field in usb_device structure
Date: Thu, 18 Dec 2008 10:06:52 +0100	[thread overview]
Message-ID: <494A12AC.40101@gandalf.sssup.it> (raw)
In-Reply-To: <19F8576C6E063C45BE387C64729E739403ECE3AFD3@dbde02.ent.ti.com>

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

      parent reply	other threads:[~2008-12-18  9:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-16  9:57 [U-Boot] [PATCH 1/6] usb : musb : Add high speed field in usb_device structure Thomas Abraham
2008-12-16 20:18 ` Remy Bohmer
2008-12-17 21:12   ` Abraham, Thomas
2008-12-18  8:08     ` Remy Bohmer
2008-12-18  9:06     ` michael [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=494A12AC.40101@gandalf.sssup.it \
    --to=trimarchi@gandalf.sssup.it \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox