[PATCH v2] usb: dwc3: add a SPL_USB_DWC3_GENERIC option for the dwc3 driver

Suppress warnings when building the SPL without USB_DWC3_GENERIC
Signed-off-by: Angus Ainslie angus@akkea.ca ---
Changes since v1:
Updated Kconfig depends
drivers/usb/dwc3/Kconfig | 7 +++++++ drivers/usb/dwc3/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 62aa65bf0c..f010291d02 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -30,6 +30,13 @@ config USB_DWC3_GENERIC Select this for Xilinx ZynqMP and similar Platforms. This wrapper supports Host and Peripheral operation modes.
+config SPL_USB_DWC3_GENERIC + bool "Generic implementation of a DWC3 wrapper (aka dwc3 glue) for the SPL" + depends on SPL_DM_USB && USB_DWC3 && SPL_MISC + help + Select this for Xilinx ZynqMP and similar Platforms. + This wrapper supports Host and Peripheral operation modes. + config USB_DWC3_MESON_G12A bool "Amlogic Meson G12A USB wrapper" depends on DM_USB && USB_DWC3 && ARCH_MESON diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile index 0dd1ba87cd..97b4f7191c 100644 --- a/drivers/usb/dwc3/Makefile +++ b/drivers/usb/dwc3/Makefile @@ -9,7 +9,7 @@ obj-$(CONFIG_USB_DWC3_GADGET) += gadget.o ep0.o obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o obj-$(CONFIG_USB_DWC3_MESON_G12A) += dwc3-meson-g12a.o obj-$(CONFIG_USB_DWC3_MESON_GXL) += dwc3-meson-gxl.o -obj-$(CONFIG_USB_DWC3_GENERIC) += dwc3-generic.o +obj-$(CONFIG_$(SPL_)USB_DWC3_GENERIC) += dwc3-generic.o obj-$(CONFIG_USB_DWC3_UNIPHIER) += dwc3-uniphier.o obj-$(CONFIG_USB_DWC3_LAYERSCAPE) += dwc3-layerscape.o obj-$(CONFIG_USB_DWC3_PHY_OMAP) += ti_usb_phy.o

Hi Marek,
don't you mind if I apply to my u-booz-imx this (that really belongs to your competence area) ?
It fixes warnings for the librem5, and it is a pity if I cannot merge it.
Best regards, Stefano
On 24.04.22 16:08, Angus Ainslie wrote:
Suppress warnings when building the SPL without USB_DWC3_GENERIC
Signed-off-by: Angus Ainslie angus@akkea.ca
Changes since v1:
Updated Kconfig depends
drivers/usb/dwc3/Kconfig | 7 +++++++ drivers/usb/dwc3/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 62aa65bf0c..f010291d02 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -30,6 +30,13 @@ config USB_DWC3_GENERIC Select this for Xilinx ZynqMP and similar Platforms. This wrapper supports Host and Peripheral operation modes.
+config SPL_USB_DWC3_GENERIC
- bool "Generic implementation of a DWC3 wrapper (aka dwc3 glue) for the SPL"
- depends on SPL_DM_USB && USB_DWC3 && SPL_MISC
- help
Select this for Xilinx ZynqMP and similar Platforms.
This wrapper supports Host and Peripheral operation modes.
- config USB_DWC3_MESON_G12A bool "Amlogic Meson G12A USB wrapper" depends on DM_USB && USB_DWC3 && ARCH_MESON
diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile index 0dd1ba87cd..97b4f7191c 100644 --- a/drivers/usb/dwc3/Makefile +++ b/drivers/usb/dwc3/Makefile @@ -9,7 +9,7 @@ obj-$(CONFIG_USB_DWC3_GADGET) += gadget.o ep0.o obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o obj-$(CONFIG_USB_DWC3_MESON_G12A) += dwc3-meson-g12a.o obj-$(CONFIG_USB_DWC3_MESON_GXL) += dwc3-meson-gxl.o -obj-$(CONFIG_USB_DWC3_GENERIC) += dwc3-generic.o +obj-$(CONFIG_$(SPL_)USB_DWC3_GENERIC) += dwc3-generic.o obj-$(CONFIG_USB_DWC3_UNIPHIER) += dwc3-uniphier.o obj-$(CONFIG_USB_DWC3_LAYERSCAPE) += dwc3-layerscape.o obj-$(CONFIG_USB_DWC3_PHY_OMAP) += ti_usb_phy.o

On 5/20/22 11:08, Stefano Babic wrote:
Hi Marek,
don't you mind if I apply to my u-booz-imx this (that really belongs to your competence area) ?
It fixes warnings for the librem5, and it is a pity if I cannot merge it.
Just pick it via imx, that's fine, I don't expect conflict.
Reviewed-by: Marek Vasut marex@denx.de

On 20.05.22 12:21, Marek Vasut wrote:
On 5/20/22 11:08, Stefano Babic wrote:
Hi Marek,
don't you mind if I apply to my u-booz-imx this (that really belongs to your competence area) ?
It fixes warnings for the librem5, and it is a pity if I cannot merge it.
Just pick it via imx, that's fine, I don't expect conflict.
Rather it breaks some TI boards - Angus, can you take a look and possibly run buildman for ARM32 boards ?
This a link for the failure :
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/437210
I put Libre5 in standby, but I will still merge for the release if the problem is solved.
Regards, Stefano

On 2022-05-20 05:31, Stefano Babic wrote:
On 20.05.22 12:21, Marek Vasut wrote:
On 5/20/22 11:08, Stefano Babic wrote:
Hi Marek,
don't you mind if I apply to my u-booz-imx this (that really belongs to your competence area) ?
It fixes warnings for the librem5, and it is a pity if I cannot merge it.
Just pick it via imx, that's fine, I don't expect conflict.
Rather it breaks some TI boards - Angus, can you take a look and possibly run buildman for ARM32 boards ?
This a link for the failure :
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/437210
I put Libre5 in standby, but I will still merge for the release if the problem is solved.
The fix is probably as simple as adding SPL_USB_DWC3_GENERIC to all configs where USB_DWC3_GENERIC was already defined.
I'll try and verify that today.
Thanks Angus
Regards, Stefano
participants (3)
-
Angus Ainslie
-
Marek Vasut
-
Stefano Babic