public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1] arch/x86: Select USB before selecting host driver
@ 2017-07-04 16:32 Andy Shevchenko
  2017-07-05  5:23 ` Bin Meng
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2017-07-04 16:32 UTC (permalink / raw)
  To: u-boot

Kbuild complains if USB is not selected before any of host driver.

warning: (X86) selects USB_EHCI_HCD which has unmet direct dependencies (USB)
warning: (X86) selects USB_EHCI_HCD which has unmet direct dependencies (USB)

Select it for X86.

Fixes: 64d6ac5bc4a9 ("Kconfig: USB: Migrate CONFIG_USB_EHCI_HCD users to Kconfig")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/Kconfig b/arch/Kconfig
index d04ab9f177..48a267d314 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -95,6 +95,7 @@ config X86
 	select DM_GPIO
 	select DM_SPI
 	select DM_SPI_FLASH
+	select USB
 	select USB_EHCI_HCD
 	imply CMD_FPGA_LOADMK
 	imply CMD_GETTIME
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v1] arch/x86: Select USB before selecting host driver
  2017-07-04 16:32 [U-Boot] [PATCH v1] arch/x86: Select USB before selecting host driver Andy Shevchenko
@ 2017-07-05  5:23 ` Bin Meng
  2017-07-05  9:36   ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Bin Meng @ 2017-07-05  5:23 UTC (permalink / raw)
  To: u-boot

Hi Andy,

On Wed, Jul 5, 2017 at 12:32 AM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> Kbuild complains if USB is not selected before any of host driver.
>
> warning: (X86) selects USB_EHCI_HCD which has unmet direct dependencies (USB)
> warning: (X86) selects USB_EHCI_HCD which has unmet direct dependencies (USB)
>
> Select it for X86.
>
> Fixes: 64d6ac5bc4a9 ("Kconfig: USB: Migrate CONFIG_USB_EHCI_HCD users to Kconfig")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  arch/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/Kconfig b/arch/Kconfig
> index d04ab9f177..48a267d314 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -95,6 +95,7 @@ config X86
>         select DM_GPIO
>         select DM_SPI
>         select DM_SPI_FLASH
> +       select USB
>         select USB_EHCI_HCD
>         imply CMD_FPGA_LOADMK
>         imply CMD_GETTIME

I cannot reproduce the warnings you are reporting. Isn't this due to
your board defconfig file does not include CONFIG_USB?

Regards,
Bin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v1] arch/x86: Select USB before selecting host driver
  2017-07-05  5:23 ` Bin Meng
@ 2017-07-05  9:36   ` Andy Shevchenko
  2017-07-05  9:36     ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2017-07-05  9:36 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 5, 2017 at 8:23 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Andy,
>
> On Wed, Jul 5, 2017 at 12:32 AM, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>> Kbuild complains if USB is not selected before any of host driver.
>>
>> warning: (X86) selects USB_EHCI_HCD which has unmet direct dependencies (USB)
>> warning: (X86) selects USB_EHCI_HCD which has unmet direct dependencies (USB)
>>
>> Select it for X86.
>>
>> Fixes: 64d6ac5bc4a9 ("Kconfig: USB: Migrate CONFIG_USB_EHCI_HCD users to Kconfig")
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> ---
>>  arch/Kconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/Kconfig b/arch/Kconfig
>> index d04ab9f177..48a267d314 100644
>> --- a/arch/Kconfig
>> +++ b/arch/Kconfig
>> @@ -95,6 +95,7 @@ config X86
>>         select DM_GPIO
>>         select DM_SPI
>>         select DM_SPI_FLASH
>> +       select USB
>>         select USB_EHCI_HCD
>>         imply CMD_FPGA_LOADMK
>>         imply CMD_GETTIME
>
> I cannot reproduce the warnings you are reporting. Isn't this due to
> your board defconfig file does not include CONFIG_USB?

It doesn't. But this doesn't matter, see below.

Anyone who selects USB host _must_ select USB as well. Since the
selection is under X86 it's not anymore board business.
So, options are:
1) apply my patch
2) remove selection of the host at least for X86.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v1] arch/x86: Select USB before selecting host driver
  2017-07-05  9:36   ` Andy Shevchenko
@ 2017-07-05  9:36     ` Andy Shevchenko
  2017-07-05 12:19       ` Bin Meng
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2017-07-05  9:36 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 5, 2017 at 12:36 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Wed, Jul 5, 2017 at 8:23 AM, Bin Meng <bmeng.cn@gmail.com> wrote:

> So, options are:
> 1) apply my patch
> 2) remove selection of the host at least for X86.

3) move hosts out of "if USB".

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v1] arch/x86: Select USB before selecting host driver
  2017-07-05  9:36     ` Andy Shevchenko
@ 2017-07-05 12:19       ` Bin Meng
  2017-07-05 13:09         ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Bin Meng @ 2017-07-05 12:19 UTC (permalink / raw)
  To: u-boot

+Marek,

Hi Andy,

On Wed, Jul 5, 2017 at 5:36 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Wed, Jul 5, 2017 at 12:36 PM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>> On Wed, Jul 5, 2017 at 8:23 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
>
>> So, options are:
>> 1) apply my patch
>> 2) remove selection of the host at least for X86.
>
> 3) move hosts out of "if USB".
>

4) select USB in USB_EHCI_HCD?

Not sure which option is the best way.

Regards,
Bin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v1] arch/x86: Select USB before selecting host driver
  2017-07-05 12:19       ` Bin Meng
@ 2017-07-05 13:09         ` Tom Rini
  2017-07-10  2:14           ` Bin Meng
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2017-07-05 13:09 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 05, 2017 at 08:19:27PM +0800, Bin Meng wrote:
> +Marek,
> 
> Hi Andy,
> 
> On Wed, Jul 5, 2017 at 5:36 PM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Wed, Jul 5, 2017 at 12:36 PM, Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> >> On Wed, Jul 5, 2017 at 8:23 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> >> So, options are:
> >> 1) apply my patch
> >> 2) remove selection of the host at least for X86.
> >
> > 3) move hosts out of "if USB".
> >
> 
> 4) select USB in USB_EHCI_HCD?
> 
> Not sure which option is the best way.

So, to be clear, CONFIG_USB is not used in the code.  It's a
Kconfig-only option we can / should use to make navigation and
dependencies easier.  I would think that USB needs to be enabled for any
USB-related choice to be visible (so things can depends on USB or be
hidden under if USB, depending on overall file context).

So I would expect X86 (and most ARCH_xxx under ARM and other cases) to
at least imply USB, if not select it.

And peeking at the kernel, this maybe should be CONFIG_USB_SUPPORT not
CONFIG_USB, to be clearer?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170705/29c9d15e/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v1] arch/x86: Select USB before selecting host driver
  2017-07-05 13:09         ` Tom Rini
@ 2017-07-10  2:14           ` Bin Meng
  2017-07-22  5:11             ` Bin Meng
  0 siblings, 1 reply; 8+ messages in thread
From: Bin Meng @ 2017-07-10  2:14 UTC (permalink / raw)
  To: u-boot

+Simon,

Hi Andy,

On Wed, Jul 5, 2017 at 9:09 PM, Tom Rini <trini@konsulko.com> wrote:
> On Wed, Jul 05, 2017 at 08:19:27PM +0800, Bin Meng wrote:
>> +Marek,
>>
>> Hi Andy,
>>
>> On Wed, Jul 5, 2017 at 5:36 PM, Andy Shevchenko
>> <andy.shevchenko@gmail.com> wrote:
>> > On Wed, Jul 5, 2017 at 12:36 PM, Andy Shevchenko
>> > <andy.shevchenko@gmail.com> wrote:
>> >> On Wed, Jul 5, 2017 at 8:23 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> >
>> >> So, options are:
>> >> 1) apply my patch
>> >> 2) remove selection of the host at least for X86.
>> >
>> > 3) move hosts out of "if USB".
>> >
>>
>> 4) select USB in USB_EHCI_HCD?
>>
>> Not sure which option is the best way.
>
> So, to be clear, CONFIG_USB is not used in the code.  It's a
> Kconfig-only option we can / should use to make navigation and
> dependencies easier.  I would think that USB needs to be enabled for any
> USB-related choice to be visible (so things can depends on USB or be
> hidden under if USB, depending on overall file context).
>
> So I would expect X86 (and most ARCH_xxx under ARM and other cases) to
> at least imply USB, if not select it.
>
> And peeking at the kernel, this maybe should be CONFIG_USB_SUPPORT not
> CONFIG_USB, to be clearer?

If we don't hear comments from others, let's do like what you
proposed, but please also update other x86 boards defconfig files to
remove CONFIG_USB there.

Regards,
Bin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v1] arch/x86: Select USB before selecting host driver
  2017-07-10  2:14           ` Bin Meng
@ 2017-07-22  5:11             ` Bin Meng
  0 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2017-07-22  5:11 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 10, 2017 at 10:14 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
> +Simon,
>
> Hi Andy,
>
> On Wed, Jul 5, 2017 at 9:09 PM, Tom Rini <trini@konsulko.com> wrote:
>> On Wed, Jul 05, 2017 at 08:19:27PM +0800, Bin Meng wrote:
>>> +Marek,
>>>
>>> Hi Andy,
>>>
>>> On Wed, Jul 5, 2017 at 5:36 PM, Andy Shevchenko
>>> <andy.shevchenko@gmail.com> wrote:
>>> > On Wed, Jul 5, 2017 at 12:36 PM, Andy Shevchenko
>>> > <andy.shevchenko@gmail.com> wrote:
>>> >> On Wed, Jul 5, 2017 at 8:23 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> >
>>> >> So, options are:
>>> >> 1) apply my patch
>>> >> 2) remove selection of the host at least for X86.
>>> >
>>> > 3) move hosts out of "if USB".
>>> >
>>>
>>> 4) select USB in USB_EHCI_HCD?
>>>
>>> Not sure which option is the best way.
>>
>> So, to be clear, CONFIG_USB is not used in the code.  It's a
>> Kconfig-only option we can / should use to make navigation and
>> dependencies easier.  I would think that USB needs to be enabled for any
>> USB-related choice to be visible (so things can depends on USB or be
>> hidden under if USB, depending on overall file context).
>>
>> So I would expect X86 (and most ARCH_xxx under ARM and other cases) to
>> at least imply USB, if not select it.
>>
>> And peeking at the kernel, this maybe should be CONFIG_USB_SUPPORT not
>> CONFIG_USB, to be clearer?
>
> If we don't hear comments from others, let's do like what you
> proposed, but please also update other x86 boards defconfig files to
> remove CONFIG_USB there.

I just sent a v2 [1] which updates all x86 defconfigs to remove USB.

[1] http://patchwork.ozlabs.org/patch/792443/

Regards,
Bin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-22  5:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-04 16:32 [U-Boot] [PATCH v1] arch/x86: Select USB before selecting host driver Andy Shevchenko
2017-07-05  5:23 ` Bin Meng
2017-07-05  9:36   ` Andy Shevchenko
2017-07-05  9:36     ` Andy Shevchenko
2017-07-05 12:19       ` Bin Meng
2017-07-05 13:09         ` Tom Rini
2017-07-10  2:14           ` Bin Meng
2017-07-22  5:11             ` Bin Meng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox