From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Junhui Liu <junhui.liu@pigmoral.tech>,
Tom Rini <trini@konsulko.com>, Marek Vasut <marex@denx.de>,
Lukasz Majewski <lukma@denx.de>
Cc: u-boot@lists.denx.de, seashell11234455@gmail.com,
pbrobinson@gmail.com, junhui.liu@pigmoral.tech
Subject: Re: [PATCH v3 0/8] usb: dwc2: Refactor and update USB DWC2 driver
Date: Tue, 07 Jan 2025 10:47:37 +0100 [thread overview]
Message-ID: <87jzb7c5vq.fsf@baylibre.com> (raw)
In-Reply-To: <20250104-dwc2-dev-v3-0-d4b2bc1996e4@pigmoral.tech>
Hi Junhui,
On sam., janv. 04, 2025 at 11:37, Junhui Liu <junhui.liu@pigmoral.tech> wrote:
> 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 platforms:
> - MK808 with RK3066 SoC and dwc2 v2.91a, tested with USB flash drive and
> connected the board to the PC through the rockusb command. Test log [1].
> - K230-CanMV with K230 SoC [2] and dwc2 v4.30a, tested with the onboard
> rtl8152 USB to net chip and an external rtl8152 adapter connected to
> the onboard USB-C interface via USB hub. Test log [3].
>
> [1] https://gist.github.com/Judehahh/878ace2607d201dc49211f2c655f0fe0#file-mk808-md
> [2] https://developer.canaan-creative.com/k230/en/dev/CanMV_K230_Tutorial.html
> [3] https://gist.github.com/Judehahh/878ace2607d201dc49211f2c655f0fe0#file-k230-canmv-md
When applying this series on top of master (commit 6d41f0a39d64 ("Prepare v2025.01"))
And building with khadas-vim3_android_ab_defconfig, I see:
drivers/usb/gadget/dwc2_udc_otg.c:1209:33: error: invalid use of undefined type 'struct dwc2_core_reg'
1209 | return readl(&usbotg_reg->global_regs.gotgctl) & GOTGCTL_BSESVLD;
| ^~
Full build logs:
https://paste.debian.net/1343304/
It seems that at some places, we use:
struct dwc2_core_reg
instead of:
struct dwc2_core_regs
Could that be fixed for v4, please?
I think this typo is in "usb: dwc2: Align macros with Linux kernel
definitions" but missed it during review, sorry.
>
> ---
> Changes in v3:
> - Handled warnings from checkpatch.pl (add spaces around '<<' and
> replace 'x' with '(x)' for macro argument).
> - Add return ret; when timeout happens.
> - Link to v2: https://lore.kernel.org/r/20241230-dwc2-dev-v2-3-12cd9b8a2358@outlook.com
>
> Changes in v2:
> - Reorganized structures, renamed macros, and moved code for better
> clarity and maintainability.
> - Added a fix for the incorrect ULPI_UTMI_SEL bit setting.
> - Added a fix for incorrectly calculating HBstLen for external DMA mode.
> - Extend the changes that replace uint32 with u32 to also include u8 and
> u16.
> - Link to v1: https://lore.kernel.org/r/20240522142311.17351-1-seashell11234455@gmail.com
>
> ---
> Junhui Liu (1):
> usb: dwc2: Fix incorrect ULPI_UTMI_SEL bit setting
>
> Kongyang Liu (7):
> usb: dwc2: Extract register definitions to common header file
> USB: dwc2: Fix HBstLen setting for external DMA mode
> usb: dwc2: Clean up with bitfield macros
> usb: dwc2: Align macros with Linux kernel definitions
> usb: dwc2: Extract macro definitions to common header
> usb: dwc2: Unify flush and reset logic with v4.20a support
> usb: dwc2: Replace uint<x>_t types with u<x>
>
> drivers/usb/common/Makefile | 2 +
> drivers/usb/common/dwc2_core.c | 115 +++++
> drivers/usb/common/dwc2_core.h | 560 +++++++++++++++++++++
> drivers/usb/gadget/dwc2_udc_otg.c | 125 ++---
> drivers/usb/gadget/dwc2_udc_otg_regs.h | 293 ++---------
> drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c | 306 ++++++------
> drivers/usb/host/dwc2.c | 494 ++++++++-----------
> drivers/usb/host/dwc2.h | 750 +----------------------------
> 8 files changed, 1137 insertions(+), 1508 deletions(-)
> ---
> base-commit: e7713a78829250b925d6377ee26c7b0745727feb
> change-id: 20241218-dwc2-dev-955c21a81118
>
> Best regards,
> --
> Junhui Liu <junhui.liu@pigmoral.tech>
next prev parent reply other threads:[~2025-01-07 9:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-04 3:37 [PATCH v3 0/8] usb: dwc2: Refactor and update USB DWC2 driver Junhui Liu
2025-01-04 3:37 ` [PATCH v3 1/8] usb: dwc2: Extract register definitions to common header file Junhui Liu
2025-01-07 9:03 ` Mattijs Korpershoek
2025-01-04 3:37 ` [PATCH v3 2/8] usb: dwc2: Fix incorrect ULPI_UTMI_SEL bit setting Junhui Liu
2025-01-07 9:11 ` Mattijs Korpershoek
2025-01-04 3:37 ` [PATCH v3 3/8] USB: dwc2: Fix HBstLen setting for external DMA mode Junhui Liu
2025-01-07 9:16 ` Mattijs Korpershoek
2025-01-04 3:37 ` [PATCH v3 4/8] usb: dwc2: Clean up with bitfield macros Junhui Liu
2025-01-05 19:14 ` Marek Vasut
2025-01-07 9:22 ` Mattijs Korpershoek
2025-01-04 3:37 ` [PATCH v3 5/8] usb: dwc2: Align macros with Linux kernel definitions Junhui Liu
2025-01-07 9:26 ` Mattijs Korpershoek
2025-01-04 3:37 ` [PATCH v3 6/8] usb: dwc2: Extract macro definitions to common header Junhui Liu
2025-01-07 9:55 ` Mattijs Korpershoek
2025-01-07 12:52 ` Junhui Liu
2025-01-04 3:37 ` [PATCH v3 7/8] usb: dwc2: Unify flush and reset logic with v4.20a support Junhui Liu
2025-01-05 19:19 ` Marek Vasut
2025-01-06 9:14 ` Junhui Liu
2025-01-06 15:37 ` Marek Vasut
2025-01-07 12:39 ` Junhui Liu
2025-01-07 12:57 ` Marek Vasut
2025-01-04 3:37 ` [PATCH v3 8/8] usb: dwc2: Replace uint<x>_t types with u<x> Junhui Liu
2025-01-07 9:47 ` Mattijs Korpershoek [this message]
2025-01-07 12:44 ` [PATCH v3 0/8] usb: dwc2: Refactor and update USB DWC2 driver Junhui Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jzb7c5vq.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=junhui.liu@pigmoral.tech \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=pbrobinson@gmail.com \
--cc=seashell11234455@gmail.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.