From: Jean-Jacques Hiblot Date: Wed, 2 Jan 2019 11:38:47 +0100 Subject: [U-Boot] [PATCH] dm: usb: gadget: Fix boot breakage on sunxi platforms In-Reply-To: References: <1545382221-21788-1-git-send-email-jjhiblot@ti.com> Message-ID: <1334d28c-5b96-1359-811c-e1491c8aba7d@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On 29/12/2018 19:49, Jagan Teki wrote: > On Mon, Dec 24, 2018 at 3:44 AM Jagan Teki w= rote: >> On Fri, Dec 21, 2018 at 2:20 PM Jean-Jacques Hiblot wr= ote: >> Better to have proper commit head that tells the real issue. I found it hard to come up with a short description of the real issue. At least this title makes it clear that it is a regression fix, not a=20 new feature. The details of the failures=C2=A0 are in the commit log (or so I thought) >> >>> Fixes commit 013116243950 ("dm: usb: create a new UCLASS ID for USB gad= get >>> devices") >>> >>> The UCLASS_DRIVER for id UCLASS_USB_GADGET_GENERIC needs to be declared >>> even for platforms that do not enable DM_USB_GADGET. Otherwise the driv= er >>> for their usb peripheral controller fails to bind. >> Sorry this is unclear, you are trying to skip DM_USB_GADGET code even >> though UCLASS_USB_GADGET_GENERIC id used. does it make sense? Sorry for the delay. This was indeed a vacation time. This patch does not skip DM_USB_GADGET. What it does is declare the=20 UCLASS_DRIVER for USB peripheral devices even if DM_USB_GADGET is not set. DM_USB_GADGET is a new option and not (yet) widely used and some drivers=20 have their own version of the DM support for gadget drivers (ie they=20 implement their own version of usb_gadget_initialize(),=20 usb_gadget_release() and usb_gadget_handle_interrupts()). However all=20 those drivers use the UCLASS_USB_GADGET_GENERIC uclass ID and thus the=20 UCLASS_DRIVER for UCLASS_USB_GADGET_GENERIC must be declared. In the=20 past they used UCLASS_USB_DEV_GENERIC, but this option is intended for=20 the host side. JJ > Any response on this? > > We need the fix asap since the release is about a week. >