From: Kongyang Liu
Some macros are shared between host and gadget code, causing duplicated
definitions. Move DWC2 macro definitions from host and gadget code into a
common header to reduce duplication.
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
drivers/usb/common/dwc2_core.h
From: Kongyang Liu
Updates all instances of uint8_t, uint16_t, and uint32_t to u8, u16, and
u32 respectively, ensuring consistent use of kernel-preferred types and
resolving checkpatch.pl warnings.
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c |
From: Kongyang Liu
Update the DWC2 macros to match those used in the Linux kernel, making
it easier to synchronize updates with kernel. Also removed some unused
macros to cleanup the code.
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c |
From: Kongyang Liu
The same registers are accessed in both the otg and gatet drivers of
dwc2, and these registers are repeatedly defined in these two parts.
Extract register definitions into a common header file to reduce
redundancy and make the code more maintainable.
Signed-off-by: Kongyang Li
From: Kongyang Liu
Use FIELD_PREP, FIELD_GET, BIT, and GENMASK macros to standardize bit
manipulation across the DWC2 code, improving readability and
maintainability without altering functionality.
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c
From: Kongyang Liu
The loop used to calculate HBstLen for extern DMA mode does not produce
the correct result according to the datasheet [1]. Replacing that loop
with a direct calculation using LOG2 to correctly assign the burst length
in the GAHBCFG register for external DMA mode.
[1] https://r
From: Junhui Liu
The ULPI_UTMI_SEL bit in the DWC2 driver was set incorrectly. According
to the datasheet [1], this bit should be set to 0 for UTMI interface and 1
for ULPI interface. The existing code had this logic reversed,
causing the interface selection to be incorrect.
This commit corrects
From: Kongyang Liu
This patch merges flush and reset logic for both host and gadget code
into a common set of functions, reducing duplication. It also adds support
for the updated reset logic to compatible with core version since v4.20a.
This patch mainly refers to the patch in the kernel.
link:
This series improves the USB DWC2 driver by extracting register
definitions into a common file for better readability and updating the
reset method to reflect changes in version 4.20a, including the new
GRSTCTL_CSFTRST_DONE bit for reset completion indication.
This series has been tested on two pl
9 matches
Mail list logo