From: Roger Quadros <rogerq@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] usb: dwc3: fix kconfig
Date: Wed, 18 May 2016 15:47:08 +0300 [thread overview]
Message-ID: <573C644C.9020203@ti.com> (raw)
In-Reply-To: <CAK7LNATvtCc3Paqua2uzJ1_fbey4ms3WM1A3CcTmt1vgVzNOtA@mail.gmail.com>
On 17/05/16 13:33, Masahiro Yamada wrote:
> Hi.
>
>
> 2016-05-13 21:17 GMT+09:00 Roger Quadros <rogerq@ti.com>:
>> DWC3 can be used in host only or gadget only mode.
>>
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> ---
>> 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 <contact@paulk.fr>
> AuthorDate: Tue Aug 4 17:04:05 2015 +0200
> Commit: Marek Vasut <marex@denx.de>
> 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 <contact@paulk.fr>
>
>
>
> 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
next prev parent reply other threads:[~2016-05-18 12:47 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 12:17 [U-Boot] [PATCH 0/4] am57xx: beagle-x15: get usb host working Roger Quadros
2016-05-13 12:17 ` [U-Boot] [PATCH 1/4] usb: dwc3: fix kconfig Roger Quadros
2016-05-13 12:23 ` Marek Vasut
2016-05-13 12:27 ` Roger Quadros
2016-05-13 12:43 ` Marek Vasut
2016-05-17 10:37 ` Masahiro Yamada
2016-05-17 10:33 ` Masahiro Yamada
2016-05-18 12:47 ` Roger Quadros [this message]
2016-05-18 12:52 ` Marek Vasut
2016-05-19 14:15 ` [U-Boot] [PATCH v2 " Roger Quadros
2016-05-13 12:17 ` [U-Boot] [PATCH 2/4] board: ti: am57xx: Fix USB configuration Roger Quadros
2016-05-13 12:23 ` Marek Vasut
2016-05-13 12:36 ` [U-Boot] [PATCH v2 " Roger Quadros
2016-05-13 12:45 ` Marek Vasut
2016-05-16 9:06 ` Roger Quadros
2016-05-16 9:26 ` Roger Quadros
2016-05-16 9:49 ` Roger Quadros
2016-05-16 10:03 ` Kishon Vijay Abraham I
2016-05-16 10:31 ` Roger Quadros
2016-05-16 11:10 ` Kishon Vijay Abraham I
2016-05-16 13:51 ` Roger Quadros
2016-05-20 22:32 ` [U-Boot] [U-Boot,2/4] " Tom Rini
2016-05-13 12:17 ` [U-Boot] [PATCH 3/4] usb: dwc3: Makefile: Don't build gadget code if USB_GADGET is disabled Roger Quadros
2016-05-13 12:24 ` Marek Vasut
2016-05-30 17:58 ` [U-Boot] [U-Boot, " Tom Rini
2016-05-13 12:17 ` [U-Boot] [PATCH 4/4] usb: gadget: udc: Build on USB_GADGET Roger Quadros
2016-05-13 12:24 ` Marek Vasut
2016-05-13 12:29 ` Roger Quadros
2016-05-13 12:47 ` Marek Vasut
2016-05-16 9:03 ` Roger Quadros
2016-05-13 12:22 ` [U-Boot] [PATCH 0/4] am57xx: beagle-x15: get usb host working Marek Vasut
2016-05-13 12:39 ` Roger Quadros
2016-05-13 12:47 ` Marek Vasut
2016-05-18 14:27 ` Roger Quadros
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=573C644C.9020203@ti.com \
--to=rogerq@ti.com \
--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