All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB OTG: make dwc2 otg driver dependent on Exynos platform
@ 2025-08-04  9:43 Marius Dinu
  2025-08-04  9:56 ` Marius Dinu
  2025-08-04 12:42 ` Jonas Karlman
  0 siblings, 2 replies; 6+ messages in thread
From: Marius Dinu @ 2025-08-04  9:43 UTC (permalink / raw)
  To: u-boot; +Cc: Marius Dinu

drivers/usb/gadget/dwc2_udc_otg_phy.c uses s5p_cpu_id,
which is only defined for Exynos CPUs.

Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
---
 drivers/usb/gadget/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 46a83141481..deabcb3e51f 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -108,10 +108,11 @@ config USB_GADGET_AT91
 
 config USB_GADGET_DWC2_OTG
 	bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
+	depends on ARCH_EXYNOS5
 	select USB_GADGET_DUALSPEED
 	help
 	  The Designware USB2.0 high-speed gadget controller
-	  integrated into many SoCs. Select this option if you want the
+	  integrated into many Exynos SoCs. Select this option if you want the
 	  driver to operate in Peripheral mode. This option requires
 	  USB_GADGET to be enabled.
 
-- 
2.49.0



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

* Re: [PATCH] USB OTG: make dwc2 otg driver dependent on Exynos platform
  2025-08-04  9:43 [PATCH] USB OTG: make dwc2 otg driver dependent on Exynos platform Marius Dinu
@ 2025-08-04  9:56 ` Marius Dinu
  2025-08-04 12:42 ` Jonas Karlman
  1 sibling, 0 replies; 6+ messages in thread
From: Marius Dinu @ 2025-08-04  9:56 UTC (permalink / raw)
  To: u-boot

On Mon, 2025-08-04 09.43.53 ++0000, Marius Dinu wrote:
> drivers/usb/gadget/dwc2_udc_otg_phy.c uses s5p_cpu_id,
> which is only defined for Exynos CPUs.
> 
> Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
> ---
>  drivers/usb/gadget/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 46a83141481..deabcb3e51f 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -108,10 +108,11 @@ config USB_GADGET_AT91
>  
>  config USB_GADGET_DWC2_OTG
>  	bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
> +	depends on ARCH_EXYNOS5
>  	select USB_GADGET_DUALSPEED
>  	help
>  	  The Designware USB2.0 high-speed gadget controller
> -	  integrated into many SoCs. Select this option if you want the
> +	  integrated into many Exynos SoCs. Select this option if you want the
>  	  driver to operate in Peripheral mode. This option requires
>  	  USB_GADGET to be enabled.
>  
> -- 
> 2.49.0
> 

PS:
This might be a bug; I can't tell.
Even so, it should be merged to avoid build errors until someone can take
a better look at the driver.


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

* Re: [PATCH] USB OTG: make dwc2 otg driver dependent on Exynos platform
  2025-08-04  9:43 [PATCH] USB OTG: make dwc2 otg driver dependent on Exynos platform Marius Dinu
  2025-08-04  9:56 ` Marius Dinu
@ 2025-08-04 12:42 ` Jonas Karlman
  2025-08-05 10:07   ` Marius Dinu
  2025-08-05 11:44   ` Marius Dinu
  1 sibling, 2 replies; 6+ messages in thread
From: Jonas Karlman @ 2025-08-04 12:42 UTC (permalink / raw)
  To: Marius Dinu; +Cc: u-boot

Hi Marius,

On 8/4/2025 11:43 AM, Marius Dinu wrote:
> drivers/usb/gadget/dwc2_udc_otg_phy.c uses s5p_cpu_id,
> which is only defined for Exynos CPUs.
> 
> Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
> ---
>  drivers/usb/gadget/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 46a83141481..deabcb3e51f 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -108,10 +108,11 @@ config USB_GADGET_AT91
>  
>  config USB_GADGET_DWC2_OTG
>  	bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
> +	depends on ARCH_EXYNOS5

There are other platforms using this driver not just exynos.

You should probably change

  if (s5p_cpu_id == 0x4412)

into something like

  if (IS_ENABLED(CONFIG_ARCH_EXYNOS5) && s5p_cpu_id == 0x4412)

instead of breaking use of this driver for other platforms.

Regards,
Jonas

>  	select USB_GADGET_DUALSPEED
>  	help
>  	  The Designware USB2.0 high-speed gadget controller
> -	  integrated into many SoCs. Select this option if you want the
> +	  integrated into many Exynos SoCs. Select this option if you want the
>  	  driver to operate in Peripheral mode. This option requires
>  	  USB_GADGET to be enabled.
>  


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

* Re: [PATCH] USB OTG: make dwc2 otg driver dependent on Exynos platform
  2025-08-04 12:42 ` Jonas Karlman
@ 2025-08-05 10:07   ` Marius Dinu
  2025-08-05 11:44   ` Marius Dinu
  1 sibling, 0 replies; 6+ messages in thread
From: Marius Dinu @ 2025-08-05 10:07 UTC (permalink / raw)
  To: Jonas Karlman; +Cc: Marius Dinu, u-boot

On Mon, 2025-08-04 14.42.11 ++0200, Jonas Karlman wrote:
> Hi Marius,
> 
> On 8/4/2025 11:43 AM, Marius Dinu wrote:
> > drivers/usb/gadget/dwc2_udc_otg_phy.c uses s5p_cpu_id,
> > which is only defined for Exynos CPUs.
> > 
> > Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
> > ---
> >  drivers/usb/gadget/Kconfig | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> > index 46a83141481..deabcb3e51f 100644
> > --- a/drivers/usb/gadget/Kconfig
> > +++ b/drivers/usb/gadget/Kconfig
> > @@ -108,10 +108,11 @@ config USB_GADGET_AT91
> >  
> >  config USB_GADGET_DWC2_OTG
> >  	bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
> > +	depends on ARCH_EXYNOS5
> 
> There are other platforms using this driver not just exynos.
> 
> You should probably change
> 
>   if (s5p_cpu_id == 0x4412)
> 
> into something like
> 
>   if (IS_ENABLED(CONFIG_ARCH_EXYNOS5) && s5p_cpu_id == 0x4412)
> 
> instead of breaking use of this driver for other platforms.
> 
> Regards,
> Jonas
> 
> >  	select USB_GADGET_DUALSPEED
> >  	help
> >  	  The Designware USB2.0 high-speed gadget controller
> > -	  integrated into many SoCs. Select this option if you want the
> > +	  integrated into many Exynos SoCs. Select this option if you want the
> >  	  driver to operate in Peripheral mode. This option requires
> >  	  USB_GADGET to be enabled.
> >  
> 

I'm sorry. I'm unable to fix this driver. My C skills are not that good.
I didn't even know this was a bug.

Marius


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

* Re: [PATCH] USB OTG: make dwc2 otg driver dependent on Exynos platform
  2025-08-04 12:42 ` Jonas Karlman
  2025-08-05 10:07   ` Marius Dinu
@ 2025-08-05 11:44   ` Marius Dinu
  2025-08-11 12:32     ` Quentin Schulz
  1 sibling, 1 reply; 6+ messages in thread
From: Marius Dinu @ 2025-08-05 11:44 UTC (permalink / raw)
  To: u-boot; +Cc: Marius Dinu

On Mon, 2025-08-04 14.42.11 ++0200, Jonas Karlman wrote:
> Hi Marius,
> 
> On 8/4/2025 11:43 AM, Marius Dinu wrote:
> > drivers/usb/gadget/dwc2_udc_otg_phy.c uses s5p_cpu_id,
> > which is only defined for Exynos CPUs.
> > 
> > Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
> > ---
> >  drivers/usb/gadget/Kconfig | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> > index 46a83141481..deabcb3e51f 100644
> > --- a/drivers/usb/gadget/Kconfig
> > +++ b/drivers/usb/gadget/Kconfig
> > @@ -108,10 +108,11 @@ config USB_GADGET_AT91
> >  
> >  config USB_GADGET_DWC2_OTG
> >  	bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
> > +	depends on ARCH_EXYNOS5
> 
> There are other platforms using this driver not just exynos.
> 
> You should probably change
> 
>   if (s5p_cpu_id == 0x4412)
> 
> into something like
> 
>   if (IS_ENABLED(CONFIG_ARCH_EXYNOS5) && s5p_cpu_id == 0x4412)
> 
> instead of breaking use of this driver for other platforms.
> 
> Regards,
> Jonas
> 
> >  	select USB_GADGET_DUALSPEED
> >  	help
> >  	  The Designware USB2.0 high-speed gadget controller
> > -	  integrated into many SoCs. Select this option if you want the
> > +	  integrated into many Exynos SoCs. Select this option if you want the
> >  	  driver to operate in Peripheral mode. This option requires
> >  	  USB_GADGET to be enabled.
> >  
> 

I'm sorry. I'm unable to fix this driver. My C skills are not that good.
I didn't even know this was a bug.

BTW, what's the difference between IS_ENABLED(CONFIG_something) and
CONFIG_IS_ENABLED(something) ? I saw both variants.


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

* Re: [PATCH] USB OTG: make dwc2 otg driver dependent on Exynos platform
  2025-08-05 11:44   ` Marius Dinu
@ 2025-08-11 12:32     ` Quentin Schulz
  0 siblings, 0 replies; 6+ messages in thread
From: Quentin Schulz @ 2025-08-11 12:32 UTC (permalink / raw)
  To: Marius Dinu, u-boot

On 8/5/25 1:44 PM, Marius Dinu wrote:
> On Mon, 2025-08-04 14.42.11 ++0200, Jonas Karlman wrote:
>> Hi Marius,
>>
>> On 8/4/2025 11:43 AM, Marius Dinu wrote:
>>> drivers/usb/gadget/dwc2_udc_otg_phy.c uses s5p_cpu_id,
>>> which is only defined for Exynos CPUs.
>>>
>>> Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
>>> ---
>>>   drivers/usb/gadget/Kconfig | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
>>> index 46a83141481..deabcb3e51f 100644
>>> --- a/drivers/usb/gadget/Kconfig
>>> +++ b/drivers/usb/gadget/Kconfig
>>> @@ -108,10 +108,11 @@ config USB_GADGET_AT91
>>>   
>>>   config USB_GADGET_DWC2_OTG
>>>   	bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
>>> +	depends on ARCH_EXYNOS5
>>
>> There are other platforms using this driver not just exynos.
>>
>> You should probably change
>>
>>    if (s5p_cpu_id == 0x4412)
>>
>> into something like
>>
>>    if (IS_ENABLED(CONFIG_ARCH_EXYNOS5) && s5p_cpu_id == 0x4412)
>>
>> instead of breaking use of this driver for other platforms.
>>
>> Regards,
>> Jonas
>>
>>>   	select USB_GADGET_DUALSPEED
>>>   	help
>>>   	  The Designware USB2.0 high-speed gadget controller
>>> -	  integrated into many SoCs. Select this option if you want the
>>> +	  integrated into many Exynos SoCs. Select this option if you want the
>>>   	  driver to operate in Peripheral mode. This option requires
>>>   	  USB_GADGET to be enabled.
>>>   
>>
> 
> I'm sorry. I'm unable to fix this driver. My C skills are not that good.
> I didn't even know this was a bug.
> 
> BTW, what's the difference between IS_ENABLED(CONFIG_something) and
> CONFIG_IS_ENABLED(something) ? I saw both variants.
> 

https://docs.u-boot.org/en/latest/develop/codingstyle.html#conditional-compilation

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

end of thread, other threads:[~2025-08-11 12:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04  9:43 [PATCH] USB OTG: make dwc2 otg driver dependent on Exynos platform Marius Dinu
2025-08-04  9:56 ` Marius Dinu
2025-08-04 12:42 ` Jonas Karlman
2025-08-05 10:07   ` Marius Dinu
2025-08-05 11:44   ` Marius Dinu
2025-08-11 12:32     ` Quentin Schulz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.