All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Marek Vasut <marex@denx.de>, Jonas Karlman <jonas@kwiboo.se>,
	Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH] usb: dwc3-generic: Fix build errors when USB_DWC3_GADGET is disabled
Date: Tue, 07 Jan 2025 13:48:02 +0100	[thread overview]
Message-ID: <87ed1edc3h.fsf@baylibre.com> (raw)
In-Reply-To: <5b5cba1e-b057-4d64-a836-603534d48620@denx.de>

Hi Marek,

On dim., janv. 05, 2025 at 20:29, Marek Vasut <marex@denx.de> wrote:

> On 6/18/24 9:15 AM, Mattijs Korpershoek wrote:
>> Hi Jonas,
>
> Hello all,
>
>> On sam., mars 02, 2024 at 14:00, Jonas Karlman <jonas@kwiboo.se> wrote:
>> 
>> [...]
>> 
>>>>
>>>> I will keep you posted.
>>>
>>> Thanks, much appreciated!
>>>
>>> Please also keep in mind that changing the interrupt handling probably
>>> only fixes the second of the two build errors reported and fixed by this
>>> patch.
>>>
>>> Trying to build with following will trigger the first build error, and
>>> should not change because use of dm_usb_gadget_handle_interrupts() is
>>> reworked.
>>>
>>> CONFIG_DM_USB_GADGET=y
>>> CONFIG_USB_DWC3=y
>>> # CONFIG_USB_DWC3_GADGET is not set
>>> CONFIG_USB_DWC3_GENERIC=y
>>> CONFIG_USB_GADGET=y
>>>
>>> E.g to only include host part of dwc3 and gadget from another driver,
>>> to i.e. save on binary size, produce following build error:
>>>
>>> aarch64-linux-gnu-ld.bfd: drivers/usb/dwc3/dwc3-generic.o: in function `dm_usb_gadget_handle_interrupts':
>>> drivers/usb/dwc3/dwc3-generic.c:201:(.text.dm_usb_gadget_handle_interrupts+0x10):
>>>    undefined reference to `dwc3_gadget_uboot_handle_interrupt'
>>>
>>> I guess force select USB_DWC3_GADGET for USB_DWC3_GENERIC would make
>>> that build error disappear, and increase binary size as a result.
>>>
>>> For my RK3328 series [1] I will just revert to use USB_XHCI_DWC3 instead
>>> of using USB_DWC3_GENERIC on boards that enable peripheral use of otg
>>> port.
>>>
>>> [1] https://patchwork.ozlabs.org/patch/1904779/
>> 
>> Marek ended up doing this rework.
>> It's available for review here, if you want to have a look:
>> https://lore.kernel.org/all/20240614005309.34433-1-marek.vasut+renesas@mailbox.org/
> This should be upstream in some form now, is this thread still an open 
> topic or is this solved now ?

The thread reported 2 problems:

Using khadas-vim3_android_defconfig, I tried:
1. DM_USB_GADGET is enabled and USB_DWC3_GADGET is disabled
$ grep -e DM_USB_GADGET -e USB_DWC3_GADGET .config
CONFIG_DM_USB_GADGET=y
# CONFIG_USB_DWC3_GADGET is not set

2. USB_GADGET_DWC2_OTG + DM_USB_GADGET is enabled and USB_DWC3_GADGET is disabled.
$ grep -e USB_GADGET_DWC2_OTG -e DM_USB_GADGET -e USB_DWC3_GADGET .config
CONFIG_DM_USB_GADGET=y
# CONFIG_USB_DWC3_GADGET is not set
CONFIG_USB_GADGET_DWC2_OTG=y
# CONFIG_USB_GADGET_DWC2_OTG_PHY is not set
CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y

In both case, I could build succesfully on master with commit 6d41f0a39d64 ("Prepare v2025.01")

So I think this is solved now. I'll let Jonas confirm.

  reply	other threads:[~2025-01-07 12:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-25 15:27 [PATCH] usb: dwc3-generic: Fix build errors when USB_DWC3_GADGET is disabled Jonas Karlman
2024-02-25 16:05 ` Tom Rini
2024-02-25 22:01 ` Marek Vasut
2024-02-26  0:02   ` Jonas Karlman
2024-02-26  1:47     ` Tom Rini
2024-02-26  7:54       ` Jonas Karlman
2024-02-26  8:22         ` Marek Vasut
2024-02-26  9:50           ` Jonas Karlman
2024-02-26 10:18             ` Marek Vasut
2024-02-26 12:36               ` Jonas Karlman
2024-03-01 15:18                 ` Mattijs Korpershoek
2024-03-02 13:00                   ` Jonas Karlman
2024-06-18  7:15                     ` Mattijs Korpershoek
2025-01-05 19:29                       ` Marek Vasut
2025-01-07 12:48                         ` Mattijs Korpershoek [this message]
2025-01-07 14:16                           ` Jonas Karlman
2025-01-07 14:49                             ` Marek Vasut

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=87ed1edc3h.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=jonas@kwiboo.se \
    --cc=marex@denx.de \
    --cc=trini@konsulko.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 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.