From: "Peter Chen (CIX)" <peter.chen@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Pawel Laszczak <pawell@cadence.com>,
Roger Quadros <rogerq@kernel.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: cdns3: attempt to fix Kconfig dependencies
Date: Fri, 3 Apr 2026 17:26:49 +0800 [thread overview]
Message-ID: <ac+H2dzj5t1JJJd5@nchen-desktop> (raw)
In-Reply-To: <26779a33-135a-4881-8614-9987c5e90380@app.fastmail.com>
On 26-04-03 10:39:18, Arnd Bergmann wrote:
> On Fri, Apr 3, 2026, at 09:50, Peter Chen (CIX) wrote:
> > On 26-04-02 16:09:55, Arnd Bergmann wrote:
> >> ---
> >> TBH, I would be more comfortable with reverting 6076388ca1ed altogether
> >> and asking for a new version with the proper fixups included along
> >> with more testing for the next merge window.
> >
> > It depends on Greg, I am okay for both ways. If Greg reverts the patch,
> > I will do below improvements and adapts for most of your changes for v3
> > patch.
> >
> > cdns-usb-common.ko is a libary, and no USB/GADGET dependency, could builds in.
> > ├── core.o
> > └── drd.o
> >
> > cdns3-host.ko -> depends on USB/XHCI(it is m when USB = m
> > cdns3.ko (gadget) -> depends on USB_GADGET
> > cdnsp.ko (gadget) -> depends on USB_GADGET
> > cdns3-plat.ko -> assign host_init/gadget_init function pointer
>
> This all sounds good. Ideally cdns3-plat.ko would also lose the
> dependency on cdns3.ko/cdnsp.ko
No, it can't. cdns3-plat.ko depends on cdns3.ko/cdsnp.ko or its
stub.
>
> >> @@ -10,12 +11,24 @@ config USB_CDNS_SUPPORT
> >>
> >> config USB_CDNS_HOST
> >> bool
> >> + depends on USB=y || USB=USB_CDNS_SUPPORT
> >> +
> >> +config CONFIG_USB_CDNS_PLATFORM
> >
> > %s/CONFIG_USB_CDNS_PLATFORM/USB_CDNS_PLATFORM
>
> Oh, this means my patch did not actually work at all, and my testing
> was pointless. I've fixed that now in my randconfig tree to see
> if anything else comes up.
>
> Arnd
I am afraid it may need to change more for your patch, otherwise, it could have
error with below combinations:
USB=y USB_GADGET=y USB_CDNS_SUPPORT=y USB_CDNS_HOST=y USB_CDNS_PLATFORM=y USB_CDNS3=y
USB_CDNS3_GADGET=y USB_CDNS3_HOST=y USB_CDNSP=y USB_CDNSP_GADGET=m USB_CDNSP_HOST=y
USB_CDNS_PLATFORM reference to the cdnsp_gadget_init which is built as module.
drivers/usb/cdns3/cdns3-plat.c:52: undefined reference to `cdnsp_gadget_init'
So far, below changes works okay at my test:
diff --git a/drivers/usb/cdns3/Kconfig b/drivers/usb/cdns3/Kconfig
index 07ed694e10b8..57cd7e3b5b22 100644
--- a/drivers/usb/cdns3/Kconfig
+++ b/drivers/usb/cdns3/Kconfig
@@ -13,11 +13,13 @@ config USB_CDNS_HOST
bool
depends on USB=y || USB=USB_CDNS_SUPPORT
-config CONFIG_USB_CDNS_PLATFORM
+config USB_CDNS_PLATFORM
tristate "Cadence USB3 generic platform support"
depends on USB_CDNSP || USB_CDNS3
depends on USB_CDNSP || !USB_CDNSP
depends on USB_CDNS3 || !USB_CDNS3
+ depends on USB_CDNS3_GADGET || !USB_CDNS3_GADGET
+ depends on USB_CDNSP_GADGET || !USB_CDNSP_GADGET
help
The platform driver support is needed on any SoC integrating
a variant of the Cadence USB3 or USBSSP dual-role controllers,
@@ -118,7 +120,7 @@ config USB_CDNSP
if USB_CDNSP
config USB_CDNSP_GADGET
- bool "Cadence USBSSP device controller"
+ tristate "Cadence USBSSP device controller"
depends on USB_GADGET=y || USB_GADGET=USB_CDNSP
help
Say Y here to enable device controller functionality of the
--
Best regards,
Peter
next prev parent reply other threads:[~2026-04-03 9:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 14:09 [PATCH] usb: cdns3: attempt to fix Kconfig dependencies Arnd Bergmann
2026-04-02 15:21 ` Arnd Bergmann
2026-04-03 7:50 ` Peter Chen (CIX)
2026-04-03 8:39 ` Arnd Bergmann
2026-04-03 9:26 ` Peter Chen (CIX) [this message]
2026-04-03 18:50 ` Arnd Bergmann
2026-04-06 1:30 ` Peter Chen (CIX)
2026-04-03 8:54 ` Greg Kroah-Hartman
2026-04-03 9:40 ` Peter Chen (CIX)
2026-04-03 12:03 ` Greg Kroah-Hartman
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=ac+H2dzj5t1JJJd5@nchen-desktop \
--to=peter.chen@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pawell@cadence.com \
--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