All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@cixtech.com>
To: Pawel Laszczak <pawell@cadence.com>
Cc: "robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"rogerq@kernel.org" <rogerq@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"cix-kernel-upstream@cixtech.com"
	<cix-kernel-upstream@cixtech.com>
Subject: Re: [PATCH 0/2] usb: cdns3: USBSSP platform driver support
Date: Tue, 3 Mar 2026 18:54:37 +0800	[thread overview]
Message-ID: <aaa97U38DByYYDcC@nchen-desktop> (raw)
In-Reply-To: <PH7PR07MB9538DF65B6E13761C630615ADD7FA@PH7PR07MB9538.namprd07.prod.outlook.com>

On 26-03-03 07:34:54, Pawel Laszczak wrote:
> [Some people who received this message don't often get email from pawell@cadence.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> EXTERNAL EMAIL
> 
> >
> >Hi Pawel,
> >
> >The Cadence USBSSP (CDNSP) controller was previously only accessible
> >through PCI, coupling the gadget driver with the PCI glue layer into a single
> >monolithic module (cdnsp-udc-pci). This prevented using the CDNSP IP on
> >SoC/platform designs that expose the controller through device tree, eg, CIX
> >Sky1 SoC.
> >
> >In this series, it restructures the driver to decouple the CDNSP gadget from
> >PCI, and refactor cdnsp-pci.c into a thin PCI-to-platform wrapper (similar to
> >cdns3-pci-wrap.c) that registers a platform device and passes PCI resources
> >and platform data to the common platform driver. So, please help test it in
> >your platform.
> >
> >The changes are tested with random configuration combination tests.
> >
> >============================================================
> >ALL TESTS COMPLETE. Summary:
> >============================================================
> >Starting cdns3 config combination tests...
> >Timestamp: 2026年 03月 02日 星期一 09:34:47 CST
> >
> >PASS: all-builtin (SUPPORT=y CDNS3=y GADGET=y HOST=y CDNSP=y
> >CDNSP_G=y CDNSP_H=y)
> >PASS: support-y_cdns3-m_gadget-y (SUPPORT=y CDNS3=m GADGET=y
> >HOST=y CDNSP=y CDNSP_G=y CDNSP_H=y)
> >PASS: support-y_cdns3-m_gadget-n (SUPPORT=y CDNS3=m GADGET=n
> >HOST=y CDNSP=y CDNSP_G=y CDNSP_H=y)
> >PASS: support-y_cdnsp-m_gadget-y (SUPPORT=y CDNS3=y GADGET=y HOST=y
> >CDNSP=m CDNSP_G=y CDNSP_H=y)
> >PASS: all-module (SUPPORT=m CDNS3=m GADGET=y HOST=y CDNSP=m
> >CDNSP_G=y CDNSP_H=y)
> >PASS: no-cdns3 (SUPPORT=y CDNS3=n GADGET=n HOST=n CDNSP=y
> >CDNSP_G=y CDNSP_H=y)
> >PASS: no-gadget (SUPPORT=y CDNS3=y GADGET=n HOST=y CDNSP=y
> >CDNSP_G=n CDNSP_H=y)
> >PASS: support-y_both-m_gadget-y (SUPPORT=y CDNS3=m GADGET=y HOST=y
> >CDNSP=m CDNSP_G=y CDNSP_H=y)
> >PASS: minimal-module (SUPPORT=m CDNS3=m GADGET=n HOST=n CDNSP=m
> >CDNSP_G=n CDNSP_H=n)
> >
> >This patch was developed with assistance from Anthropic Claude Opus 4.6.
> >
> 
> I can compile the kernel but when I try to install modules with
> make modules_install I get error:
> 
> DEPMOD  /lib/modules/7.0.0-rc1-new-pci-plat-support-next-20260227+
> depmod: ERROR: Cycle detected: cdns_usb_common -> cdnsp -> cdns_usb_common
> depmod: ERROR: Cycle detected: udc_core
> depmod: ERROR: Found 2 modules in dependency cycles!
> make[2]: *** [scripts/Makefile.modinst:132: depmod] Error 1
> 
> It occurs even with minimal configuration:
> CONFIG_USB_CDNS_SUPPORT=m
> # CONFIG_USB_CDNS3 is not set
> CONFIG_USB_CDNSP=m
> CONFIG_USB_CDNSP_GADGET=y
> 

Thanks for testing. It needs to let cdns3(p) platform driver as
standalone module to fix it. Would you please try below fix on top
of my patch set:

diff --git a/drivers/usb/cdns3/Makefile b/drivers/usb/cdns3/Makefile
index 0e9b20e799d0..63484f145bb9 100644
--- a/drivers/usb/cdns3/Makefile
+++ b/drivers/usb/cdns3/Makefile
@@ -3,12 +3,14 @@
 CFLAGS_cdns3-trace.o				:= -I$(src)
 CFLAGS_cdnsp-trace.o				:= -I$(src)
 
-cdns-usb-common-y				:= core.o drd.o cdns3-plat.o
+cdns-usb-common-y				:= core.o drd.o
 
 ifeq ($(CONFIG_USB),m)
 obj-m						+= cdns-usb-common.o
+obj-m						+= cdns3-plat.o
 else
 obj-$(CONFIG_USB_CDNS_SUPPORT)			+= cdns-usb-common.o
+obj-$(CONFIG_USB_CDNS_SUPPORT)			+= cdns3-plat.o
 endif
 
 cdns-usb-common-$(CONFIG_USB_CDNS_HOST) 	+= host.o

Besides, would you please comment [1], the key point is could we
keep one platform driver with one compatible string, and cdns3 or cdnsp
platform is decided at runtime?

[1] https://www.spinics.net/lists/kernel/msg6072480.html

-- 

Best regards,
Peter

  reply	other threads:[~2026-03-03 10:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02  3:03 [PATCH 0/2] usb: cdns3: USBSSP platform driver support Peter Chen
2026-03-02  3:03 ` [PATCH 1/2] usb: cdns3: Add " Peter Chen
2026-03-02  7:31   ` Krzysztof Kozlowski
2026-03-02 11:05     ` Peter Chen
2026-03-04 23:07   ` kernel test robot
2026-03-04 23:29   ` kernel test robot
2026-03-08 11:38   ` kernel test robot
2026-03-11  6:52   ` Pawel Laszczak
2026-03-02  3:03 ` [PATCH 2/2] dt-bindings: usb: cdns,usb3: Add support for USBSSP Peter Chen
2026-03-02  7:28   ` Krzysztof Kozlowski
2026-03-02  9:21     ` Peter Chen
2026-03-02  9:27       ` Krzysztof Kozlowski
2026-03-02 10:59         ` Peter Chen
2026-03-04 10:02           ` Pawel Laszczak
2026-03-11 12:02             ` Peter Chen
2026-03-12  8:07               ` Pawel Laszczak
2026-03-02  7:29   ` Krzysztof Kozlowski
2026-03-02  9:33     ` Peter Chen
2026-03-02  9:03   ` Pawel Laszczak
2026-03-02 11:04     ` Peter Chen
2026-03-03  7:34 ` [PATCH 0/2] usb: cdns3: USBSSP platform driver support Pawel Laszczak
2026-03-03 10:54   ` Peter Chen [this message]
2026-03-04  8:22     ` Pawel Laszczak
2026-03-04  8:31       ` 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=aaa97U38DByYYDcC@nchen-desktop \
    --to=peter.chen@cixtech.com \
    --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=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 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.