qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-5.1] hw: Only compile the usb-dwc2 controller if it is really needed
@ 2020-07-22 15:47 Thomas Huth
  2020-07-22 17:23 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2020-07-22 15:47 UTC (permalink / raw)
  To: qemu-devel, Gerd Hoffmann, Peter Maydell; +Cc: qemu-arm, Paul Zimmerman

The USB_DWC2 switch is currently "default y", so it is included in all
qemu-system-* builds, even if it is not needed. Even worse, it does a
"select USB", so USB devices are now showing up as available on targets
that do not support USB at all. This sysbus device should only be
included by the boards that need it, i.e. by the Raspi machines.

Fixes: 153ef1662c ("dwc-hsotg (dwc2) USB host controller emulation")
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/arm/Kconfig | 1 +
 hw/usb/Kconfig | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 4a224a6351..bc3a423940 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -315,6 +315,7 @@ config RASPI
     select FRAMEBUFFER
     select PL011 # UART
     select SDHCI
+    select USB_DWC2
 
 config STM32F205_SOC
     bool
diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
index d4d8c37c28..5e63dc75f8 100644
--- a/hw/usb/Kconfig
+++ b/hw/usb/Kconfig
@@ -48,7 +48,6 @@ config USB_MUSB
 
 config USB_DWC2
     bool
-    default y
     select USB
 
 config TUSB6010
-- 
2.18.1



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

* Re: [PATCH for-5.1] hw: Only compile the usb-dwc2 controller if it is really needed
  2020-07-22 15:47 [PATCH for-5.1] hw: Only compile the usb-dwc2 controller if it is really needed Thomas Huth
@ 2020-07-22 17:23 ` Philippe Mathieu-Daudé
  2020-07-23  4:28   ` Thomas Huth
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-07-22 17:23 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, Gerd Hoffmann, Peter Maydell
  Cc: qemu-arm, Paul Zimmerman

On 7/22/20 5:47 PM, Thomas Huth wrote:
> The USB_DWC2 switch is currently "default y", so it is included in all
> qemu-system-* builds, even if it is not needed. Even worse, it does a
> "select USB", so USB devices are now showing up as available on targets
> that do not support USB at all. This sysbus device should only be
> included by the boards that need it, i.e. by the Raspi machines.

Paul already sent that patch (your description is better although):
https://www.mail-archive.com/qemu-devel@nongnu.org/msg723681.html

> 
> Fixes: 153ef1662c ("dwc-hsotg (dwc2) USB host controller emulation")
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/arm/Kconfig | 1 +
>  hw/usb/Kconfig | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index 4a224a6351..bc3a423940 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -315,6 +315,7 @@ config RASPI
>      select FRAMEBUFFER
>      select PL011 # UART
>      select SDHCI
> +    select USB_DWC2
>  
>  config STM32F205_SOC
>      bool
> diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
> index d4d8c37c28..5e63dc75f8 100644
> --- a/hw/usb/Kconfig
> +++ b/hw/usb/Kconfig
> @@ -48,7 +48,6 @@ config USB_MUSB
>  
>  config USB_DWC2
>      bool
> -    default y
>      select USB
>  
>  config TUSB6010
> 



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

* Re: [PATCH for-5.1] hw: Only compile the usb-dwc2 controller if it is really needed
  2020-07-22 17:23 ` Philippe Mathieu-Daudé
@ 2020-07-23  4:28   ` Thomas Huth
  2020-07-23  4:36     ` Paul Zimmerman
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2020-07-23  4:28 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel, Gerd Hoffmann, Peter Maydell
  Cc: qemu-arm, Paul Zimmerman

On 22/07/2020 19.23, Philippe Mathieu-Daudé wrote:
> On 7/22/20 5:47 PM, Thomas Huth wrote:
>> The USB_DWC2 switch is currently "default y", so it is included in all
>> qemu-system-* builds, even if it is not needed. Even worse, it does a
>> "select USB", so USB devices are now showing up as available on targets
>> that do not support USB at all. This sysbus device should only be
>> included by the boards that need it, i.e. by the Raspi machines.
> 
> Paul already sent that patch (your description is better although):
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg723681.html

Oh, thanks for the pointer, I should have checked my qemu-devel folder
first... Please disregard my patch!

 Thomas



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

* Re: [PATCH for-5.1] hw: Only compile the usb-dwc2 controller if it is really needed
  2020-07-23  4:28   ` Thomas Huth
@ 2020-07-23  4:36     ` Paul Zimmerman
  2020-07-24 14:14       ` Gerd Hoffmann
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Zimmerman @ 2020-07-23  4:36 UTC (permalink / raw)
  To: Gerd Hoffmann, Thomas Huth
  Cc: Peter Maydell, qemu-arm, Philippe Mathieu-Daudé, QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

Gerd, it's OK by me if you take Thomas's patch instead, I agree the
changelog is better. It also has a fixes tag.

Reviewed-by: Paul Zimmerman <pauldzim@gmail.com>


On Wed, Jul 22, 2020 at 9:29 PM Thomas Huth <thuth@redhat.com> wrote:

> On 22/07/2020 19.23, Philippe Mathieu-Daudé wrote:
> > On 7/22/20 5:47 PM, Thomas Huth wrote:
> >> The USB_DWC2 switch is currently "default y", so it is included in all
> >> qemu-system-* builds, even if it is not needed. Even worse, it does a
> >> "select USB", so USB devices are now showing up as available on targets
> >> that do not support USB at all. This sysbus device should only be
> >> included by the boards that need it, i.e. by the Raspi machines.
> >
> > Paul already sent that patch (your description is better although):
> > https://www.mail-archive.com/qemu-devel@nongnu.org/msg723681.html
>
> Oh, thanks for the pointer, I should have checked my qemu-devel folder
> first... Please disregard my patch!
>
>  Thomas
>
>

[-- Attachment #2: Type: text/html, Size: 1853 bytes --]

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

* Re: [PATCH for-5.1] hw: Only compile the usb-dwc2 controller if it is really needed
  2020-07-23  4:36     ` Paul Zimmerman
@ 2020-07-24 14:14       ` Gerd Hoffmann
  0 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2020-07-24 14:14 UTC (permalink / raw)
  To: Paul Zimmerman
  Cc: Peter Maydell, Thomas Huth, qemu-arm, Philippe Mathieu-Daudé,
	QEMU Developers

On Wed, Jul 22, 2020 at 09:36:27PM -0700, Paul Zimmerman wrote:
> Gerd, it's OK by me if you take Thomas's patch instead, I agree the
> changelog is better. It also has a fixes tag.
> 
> Reviewed-by: Paul Zimmerman <pauldzim@gmail.com>

Queued.  Thanks,
  Gerd



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

end of thread, other threads:[~2020-07-24 14:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 15:47 [PATCH for-5.1] hw: Only compile the usb-dwc2 controller if it is really needed Thomas Huth
2020-07-22 17:23 ` Philippe Mathieu-Daudé
2020-07-23  4:28   ` Thomas Huth
2020-07-23  4:36     ` Paul Zimmerman
2020-07-24 14:14       ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).