On 6/18/24 9:15 AM, Mattijs Korpershoek wrote:
Hi Jonas,

Hello all,

On sam., mars 02, 2024 at 14:00, Jonas Karlman <[email protected]> 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/[email protected]/
This should be upstream in some form now, is this thread still an open topic or is this solved now ?

Reply via email to