From mboxrd@z Thu Jan 1 00:00:00 1970 From: michael Date: Thu, 18 Dec 2008 10:06:52 +0100 Subject: [U-Boot] [PATCH 1/6] usb : musb : Add high speed field in usb_device structure In-Reply-To: <19F8576C6E063C45BE387C64729E739403ECE3AFD3@dbde02.ent.ti.com> References: <19F8576C6E063C45BE387C64729E739403ECE3AFD3@dbde02.ent.ti.com> Message-ID: <494A12AC.40101@gandalf.sssup.it> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 >> >> > > > > >> 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