Re: [PATCH v3 6/9] usb: dwc3: dwc3-generic-plat: Add ST STM32MP2 DWC3 xHCI USB controller glue
flat view
From: sashiko-bot@kernel.org
Date: 2026-08-22 07:56:16
Also in:
linux-phy
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The file uses the FIELD_PREP macro without including its required header <linux/bitfield.h>. --
--- Patch [6]: [PATCH v3 6/9] usb: dwc3: dwc3-generic-plat: Add ST STM32MP2 DWC3 xHCI USB controller glue ---commit 144f9fcc747a522925bb8e40158fa496caf2673c Author: Marek Vasut [off-list ref] usb: dwc3: dwc3-generic-plat: Add ST STM32MP2 DWC3 xHCI USB controller glue This commit extends the generic DWC3 platform driver by adding glue logic support for the ST STM32MP2 SoC. It configures controller settings using syscon via device tree properties.
quoted hunk ↗ jump to hunk
diff --git a/drivers/usb/dwc3/dwc3-generic-plat.c b/drivers/usb/dwc3/dwc3-generic-plat.c index ca69ac0eb07ce..f670576511b59 100644 --- a/drivers/usb/dwc3/dwc3-generic-plat.c +++ b/drivers/usb/dwc3/dwc3-generic-plat.c
[ ... ]
quoted hunk ↗ jump to hunk
@@ -85,6 +91,38 @@ static int dwc3_spacemit_k1_init(struct dwc3_generic *dwc3g)
[ ... ]
+static int dwc3_stm32mp25_init(struct dwc3_generic *dwc3g)
+{[ ... ]
quoted hunk ↗ jump to hunk
+ return regmap_update_bits(regmap, drcr, + STM32MP2_USB3DRCR_HOST_PORT_POWER_CONTROL_PRESENT | + STM32MP2_USB3DRCR_OVRCUR_POLARITY | + STM32MP2_USB3DRCR_VBUSEN_POLARITY | + STM32MP2_USB3DRCR_USB2ONLYD | + STM32MP2_USB3DRCR_USB2ONLYH, + FIELD_PREP(STM32MP2_USB3DRCR_HOST_PORT_POWER_CONTROL_PRESENT, + prt_pwr_ctrl) |
[Severity: Low] This isn't a bug, but FIELD_PREP is used here without explicitly including linux/bitfield.h. Could this cause build failures on architectures or configurations where this header is not implicitly pulled in by other includes?
quoted hunk ↗ jump to hunk
+ FIELD_PREP(STM32MP2_USB3DRCR_OVRCUR_POLARITY, + ovrcur_polarity_low) | + FIELD_PREP(STM32MP2_USB3DRCR_VBUSEN_POLARITY, + vbusen_polarity_low) | + FIELD_PREP(STM32MP2_USB3DRCR_USB2ONLYD, + !!usb2only_conf) | + FIELD_PREP(STM32MP2_USB3DRCR_USB2ONLYH, + !!usb2only_conf)); +}
-- Sashiko AI review · https://sashiko.dev/#/patchset/20260822074816.548662-1-marex@nabladev.com?part=6