From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Quadros Date: Wed, 18 May 2016 15:47:08 +0300 Subject: [U-Boot] [PATCH 1/4] usb: dwc3: fix kconfig In-Reply-To: References: <1463141873-10604-1-git-send-email-rogerq@ti.com> <1463141873-10604-2-git-send-email-rogerq@ti.com> Message-ID: <573C644C.9020203@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 17/05/16 13:33, Masahiro Yamada wrote: > Hi. > > > 2016-05-13 21:17 GMT+09:00 Roger Quadros : >> DWC3 can be used in host only or gadget only mode. >> >> Signed-off-by: Roger Quadros >> --- >> drivers/usb/dwc3/Kconfig | 9 +++++---- >> 1 file changed, 5 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig >> index e93398f..caf695b 100644 >> --- a/drivers/usb/dwc3/Kconfig >> +++ b/drivers/usb/dwc3/Kconfig >> @@ -1,15 +1,16 @@ >> config USB_DWC3 >> bool "DesignWare USB3 DRD Core Support" >> - depends on (USB && USB_GADGET) >> - select USB_GADGET_DUALSPEED >> + depends on (USB || USB_GADGET) >> + select USB_GADGET_DUALSPEED if USB_GADGET >> help >> - Say Y here if your system has a Dual Role SuperSpeed >> - USB controller based on the DesignWare USB3 IP Core. >> + Say Y here if your system has DesignWare USB3 IP Core. >> >> if USB_DWC3 >> >> choice >> bool "DWC3 Mode Selection" >> + default USB_DWC3_HOST if (USB && !USB_GADGET) >> + default USB_DWC3_GADGET if (!USB && USB_GADGET) >> >> config USB_DWC3_HOST >> bool "Host only mode" >> -- >> 2.7.4 >> >> _______________________________________________ >> U-Boot mailing list >> U-Boot at lists.denx.de >> http://lists.denx.de/mailman/listinfo/u-boot > > > Please note the following commit changed > the meaning of CONFIG_USB. > > > commit 68f7c5db2d1e714c15b49b0759ddef8f8344f184 > Author: Paul Kocialkowski > AuthorDate: Tue Aug 4 17:04:05 2015 +0200 > Commit: Marek Vasut > CommitDate: Wed Aug 5 17:20:34 2015 +0200 > > usb: Generic USB Kconfig option, that fits both host and gadget and comments > > There is no particular reason why the USB Kconfig option should be specific > host mode. In prevision of adding MUSB host and gadget to Kconfig, this move > the title and help message of the USB Kconfig option to a more generic forma > > Adding comments to the usb Kconfig allows for a better separation and more > readability in generated configs and in menuconfig. > > Signed-off-by: Paul Kocialkowski > > > > In Linux, CONFIG_USB enables the host mode of USB. > So, "depends on (USB || USB_GADGET)" makes sense. > > > In U-Boot, since the commit above, CONFIG_USB enables > the whole of USB frame-work, including host, gadget. > > USB_DWC3 already resides inside of if USB ... endif > so, depends on (USB || USB_GADGET) does not make sense. > > > OK, thanks for pointing this out. But USB doesn't mean Host is active and USB_GADGET means gadget framework is available. So I think we have incomplete information for deciding about Host role based on just Kconfig. cheers, -roger