On 6/29/26 10:44 AM, Jens Wiklander wrote:
Sync Linux kernel dwc3 changes from v5.15 to v5.16.

The following files are preserved accross the import:
Makefile Kconfig dwc3-meson-g12a.c dwc3-meson-gxl.c dwc3-omap.c
dwc3-uniphier.c dwc3-generic.h dwc3-generic.c dwc3-generic-sti.c
dwc3-layerscape.c ti_usb_phy.c

Skipping unused files:
debugfs.c drd.c dwc3-exynos.c dwc3-haps.c dwc3-imx8mp.c dwc3-keystone.c
dwc3-octeon.c dwc3-of-simple.c dwc3-pci.c dwc3-qcom.c dwc3-qcom-legacy.c
dwc3-rtk.c dwc3-st.c dwc3-xilinx.c host.c trace.c trace.h ulpi.c

Note that this is a raw import and doesn't build.
A fixup commit at the end of the series fixes that.

List of commits: git log --oneline v5.15..v5.16
Commits imported:
6a97cee39d8f Revert "usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by 
default"
47ce45906ca9 usb: dwc3: leave default DMA for PCI devices
26288448120b usb: dwc3: gadget: Fix null pointer exception
63c4c320ccf7 usb: dwc3: gadget: Check for L1/L2/U3 for Start Transfer
d74dc3e9f58c usb: dwc3: gadget: Ignore NoStream after End Transfer
250fdabec6ff usb: dwc3: core: Revise GHWPARAMS9 offset
d1a4683747fe usb: dwc3: Align DWC3_EP_* flag macros
876a75cb520f usb: dwc3: gadget: Skip resizing EP's TX FIFO if already resized
b851f7c7b8fd usb: dwc3: gadget: Change to dev_dbg() when queuing to inactive 
gadget/ep
620b74d01b9d Merge 5.15-rc5 into usb-next
2abc865706c9 usb: exynos: describe driver in KConfig
ae9a6149884e Merge 5.15-rc3 into usb-next
8217f07a5023 usb: dwc3: gadget: Avoid starting DWC3 gadget during UDC unbind
7bee31883889 usb: dwc3: reference clock period configuration

Signed-off-by: Jens Wiklander <[email protected]>
Tested-by: Alexey Charkov <[email protected]>
---
  drivers/usb/dwc3/core.c   | 37 ++++++++++++++++++++++++---
  drivers/usb/dwc3/core.h   | 27 +++++++++++++-------
  drivers/usb/dwc3/gadget.c | 53 ++++++++++++++++++++++++++++-----------
  3 files changed, 90 insertions(+), 27 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 0104a80b185e..f4c09951b517 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -26,6 +26,7 @@
  #include <linux/acpi.h>
  #include <linux/pinctrl/consumer.h>
  #include <linux/reset.h>
+#include <linux/bitfield.h>
#include <linux/usb/ch9.h>
  #include <linux/usb/gadget.h>
@@ -335,6 +336,29 @@ static void dwc3_frame_length_adjustment(struct dwc3 *dwc)
        }
  }
+/**
+ * dwc3_ref_clk_period - Reference clock period configuration
+ *             Default reference clock period depends on hardware
+ *             configuration. For systems with reference clock that differs
+ *             from the default, this will set clock period in DWC3_GUCTL
+ *             register.
+ * @dwc: Pointer to our controller context structure
+ * @ref_clk_per: reference clock period in ns
+ */
+static void dwc3_ref_clk_period(struct dwc3 *dwc)
+{
+       u32 reg;
+
+       if (dwc->ref_clk_per == 0)
+               return;
+
+       reg = dwc3_readl(dwc->regs, DWC3_GUCTL);
+       reg &= ~DWC3_GUCTL_REFCLKPER_MASK;
+       reg |=  FIELD_PREP(DWC3_GUCTL_REFCLKPER_MASK, dwc->ref_clk_per);
+       dwc3_writel(dwc->regs, DWC3_GUCTL, reg);
+}
+
+

One newline too many here.

[...]

Reply via email to