From: "Arnd Bergmann" <arnd@arndb.de>
To: "Peter Chen" <peter.chen@cixtech.com>,
"Rob Herring" <robh@kernel.org>,
krzk+dt@kernel.org, "Conor Dooley" <conor+dt@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Pawel Laszczak" <pawell@cadence.com>,
"Roger Quadros" <rogerq@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, cix-kernel-upstream@cixtech.com
Subject: Re: [PATCH v3 2/2] usb: cdns3: Add USBSSP platform driver support
Date: Tue, 21 Apr 2026 07:57:25 +0200 [thread overview]
Message-ID: <f21d5bab-c79d-4b7d-8aa4-e8188ee11aa8@app.fastmail.com> (raw)
In-Reply-To: <20260421023459.506145-3-peter.chen@cixtech.com>
On Tue, Apr 21, 2026, at 04:34, Peter Chen wrote:
> Expose Cadence USBSSP through the same platform path as USBSS, trim
> Kconfig and Makefile: one core loadable object plus separate glue .ko
> files.
>
> Single cdns.ko bundles core, DRD, the generic "cdns,usb3" platform
> driver in cdns3-plat.c, optional host.o, and optional gadget objects.
> Use CONFIG_USB_CDNS3_GADGET as a bool to compile gadget support into
> that module. Remove duplicate MODULE_* declarations from cdns3-plat.c
> now that it links into the same module.
>
> Kconfig: the generic platform driver is selected via CONFIG_USB_CDNS3.
> Move CONFIG_USB_CDNSP_PCI beside CONFIG_USB_CDNS3_PCI_WRAP under
> "Platform glue driver support". SoC glue entries (TI, i.MX, StarFive)
> depend only on CONFIG_USB_CDNS3.
>
> Tighten CONFIG_USB_CDNS_SUPPORT dependencies so the umbrella follows
> host or gadget when either is built as a module. Match host and gadget
> bools to the cdns.ko tristate with USB=USB_CDNS3 and USB_GADGET=USB_CDNS3
> instead of comparing against USB_CDNS_SUPPORT.
>
> Link host.o when CONFIG_USB_CDNS3_HOST is enabled and use that symbol in
> host-export.h, removing the redundant CONFIG_USB_CDNS_HOST indirection.
>
> Export cdns_core_init_role and reorganize the function cdns_init, and
> controller version could be gotten before the gadget init function is
> decided per controller.
>
> Keep host_init / gadget_init callbacks in struct cdns, so core.c does
> not need direct linkage to host or gadget objects. Refactor cdnsp-pci.c
> into a thin PCI-to-platform wrapper.
>
> drivers/usb/Makefile: descend into drivers/usb/cdns3/ only when
> CONFIG_USB_CDNS_SUPPORT is enabled.
>
> Assisted-by: Cursor:claude-4.6-opus
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Peter Chen <peter.chen@cixtech.com>
This looks fine to me,
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
I've added the patch to my randconfig build setup now, to see if there
are any corner cases left that I have missed where it may still
get into a build time failure and will let you know if I find any.
Arnd
next prev parent reply other threads:[~2026-04-21 5:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 2:34 [PATCH v3 0/2] usb: cdns3: USBSSP platform driver support Peter Chen
2026-04-21 2:34 ` [PATCH v3 1/2] dt-bindings: usb: cdns,usb3: document USBSSP controller support Peter Chen
2026-04-21 2:34 ` [PATCH v3 2/2] usb: cdns3: Add USBSSP platform driver support Peter Chen
2026-04-21 5:57 ` Arnd Bergmann [this message]
2026-04-21 6:24 ` Peter Chen
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=f21d5bab-c79d-4b7d-8aa4-e8188ee11aa8@app.fastmail.com \
--to=arnd@arndb.de \
--cc=cix-kernel-upstream@cixtech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pawell@cadence.com \
--cc=peter.chen@cixtech.com \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox