[PATCH] USB: OHCI/UHCI: Add soft dependencies on ehci_hcd
Huacai Chen
chenhuacai at kernel.org
Sat Jan 10 17:54:46 PST 2026
On Sat, Jan 10, 2026 at 11:00 PM Alan Stern <stern at rowland.harvard.edu> wrote:
>
> On Sat, Jan 10, 2026 at 12:05:19PM +0800, Huacai Chen wrote:
> > So I think we need a softdep between ohci-platform/uhci-platform and
> > ehci-platform, which is similar to the PCI case.
>
> Yes, on your platform. But not on other platforms. (For example, not
> on a platform that doesn't have an EHCI controller.)
For the PCI case, OHCI without EHCI is also possible? So I think they
are similar.
>
> I think the best way to do this is to create a new CONFIG_EHCI_SOFTDEPS
> Kconfig symbol, and add the soft dependency only if the symbol is
> defined. Normally it will be undefined by default, but on your platform
> (and any others that need it) you can select it.
>
> How does that sound?
>From my point of view, keeping it simple may be better. I think an
unconditional softdep is harmless.
>
> > > There are other issues involving companion controllers, connected with
> > > hibernation. You should take a look at commit 6d19c009cc78 ("USB:
> > > implement non-tree resume ordering constraints for PCI host
> > > controllers"), which was later modified by commit 05768918b9a1 ("USB:
> > > improve port transitions when EHCI starts up") and a few others.
> > >
> > > Also, read through the current code in hcd-pci.c (for_each_companion(),
> > > ehci_pre_add(), ehci_post_add(), non_ehci_add(), ehci_remove(), and
> > > ehci_wait_for_companions()). Your non-PCI system will need to implement
> > > some sort of equivalent to all these things.
> > At least for the device probe, a softdep seems enough.
>
> Does this platform support hibernation at all?
LS2K500 is an embedded chip, it may or may not support hibernation,
but we haven't used hibernation.
Huacai
>
> Alan Stern
More information about the Linux-rockchip
mailing list