From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Mon, 24 Feb 2020 16:28:59 +0100 Subject: [U-Boot] [PATCH] usb: ehci-mx5: Fix bus enumeration for DM case In-Reply-To: <20190624140939.3babf5f2@jawa> References: <20190620205358.11534-1-marex@denx.de> <20190624140939.3babf5f2@jawa> Message-ID: <20200224161756.2f3e68ce@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek, > On Thu, 20 Jun 2019 22:53:58 +0200 > Marek Vasut wrote: > > > It is likely that the DM conversion of EHCI iMX5 driver was a > > derivative of EHCI VF, however the conversion is incomplete and is > > missing the bind workaround, which updates dev->seq number. Without > > this, all controllers have dev->seq number 0 . Add this bind > > workaround into EHCI iMX5 driver as well. > > > > Signed-off-by: Marek Vasut > > Cc: Abel Vesa > > Cc: Adam Ford > > Cc: Fabio Estevam > > Cc: Ludwig Zenz > > Cc: Peng Fan > > Cc: Stefano Babic > > Cc: Vagrant Cascadian > > --- > > drivers/usb/host/ehci-mx5.c | 17 +++++++++++++++++ > > 1 file changed, 17 insertions(+) > > > > diff --git a/drivers/usb/host/ehci-mx5.c > > b/drivers/usb/host/ehci-mx5.c index 0b32728c57..4db513f4e5 100644 > > --- a/drivers/usb/host/ehci-mx5.c > > +++ b/drivers/usb/host/ehci-mx5.c > > @@ -301,6 +301,22 @@ static int ehci_usb_ofdata_to_platdata(struct > > udevice *dev) return 0; > > } > > > > +static int ehci_usb_bind(struct udevice *dev) > > +{ > > + static int num_controllers; > > + > > + /* > > + * Without this hack, if we return ENODEV for USB > > Controller 0, on > > + * probe for the next controller, USB Controller 1 will be > > given a > > + * sequence number of 0. This conflicts with our > > requirement of > > + * sequence numbers while initialising the peripherals. > > + */ > > + dev->req_seq = num_controllers; > > + num_controllers++; > > + > > + return 0; > > +} > > + > > static int ehci_usb_probe(struct udevice *dev) > > { > > struct usb_platdata *plat = dev_get_platdata(dev); > > @@ -362,6 +378,7 @@ U_BOOT_DRIVER(usb_mx5) = { > > .id = UCLASS_USB, > > .of_match = mx5_usb_ids, > > .ofdata_to_platdata = ehci_usb_ofdata_to_platdata, > > + .bind = ehci_usb_bind, > > .probe = ehci_usb_probe, > > .remove = ehci_deregister, > > .ops = &ehci_usb_ops, > > Tested-by: Lukasz Majewski > > Tested on HSC|DDC i.MX53 board (usb start works as previously). > Gentle ping on this patch :-) It must have been overlooked in some way ... Marek, could you please apply this fix? Otherwise kp_imx53 boards (and probably some other ones) are broken - and cannot be easily debricked. > master branch > SHA1: 77f6e2dd0551d8a825bab391a1bd6b838874bcd4 It applies also on top of newest -master: SHA1: 8e51bf746a11d7f67416859da73a83109af4e0a3 Thanks in advance. > > Best regards, > > Lukasz Majewski > > -- > > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > lukma at denx.de Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: