All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] usb: add support for generic EHCI devices
Date: Mon, 30 Nov 2015 19:21:06 +0100	[thread overview]
Message-ID: <201511301921.06861.marex@denx.de> (raw)
In-Reply-To: <1448907210.2903.26.camel@synopsys.com>

On Monday, November 30, 2015 at 07:13:30 PM, Alexey Brodkin wrote:
> Hi Marek,

Hi!

> On Mon, 2015-11-30 at 19:05 +0100, Marek Vasut wrote:
> > On Monday, November 30, 2015 at 06:47:45 PM, Alexey Brodkin wrote:
> > > From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> > > 
> > > +config USB_EHCI_GENERIC
> > > +	bool "Support for generic EHCI USB controller"
> > > +	depends on OF_CONTROL
> > > +	default n
> > > +	---help---
> > > +	  Enables support for generic EHCI controller.
> > 
> > This should depend on EHCI_HCD somehow, no (since it's using
> > ehci_deregister and friends) ?
> 
> This symbol is in "if USB_EHCI_HCD" so if USB_EHCI_HCD is not enabled
> EHCI_GENERIC won't be visible and hence USB_EHCI_HCD in defconfig.
> 
> Otherwise we'll need to add USB_EHCI_HCD dependency for other EHCI drivers
> such as USB_EHCI_MARVELL, USB_EHCI_MX6 and USB_EHCI_UNIPHIER.
> Do we want to do it? :)
> 
> Please check drivers/usb/host/Kconfig.

The order there seems correct. But how is it possible that your driver
triggered the build error on the ph1_sld8,ph1_sld3,ph1_ld4 boards ? I
suspect because it was enabled by default, but didn't "select" the
EHCI_HCD ?

> > [...]
> > 
> > > +static const struct udevice_id ehci_usb_ids[] = {
> > > +	{ .compatible = "generic-ehci" },
> > > +	{ }
> > > +};
> > > +
> > > +U_BOOT_DRIVER(usb_ehci) = {
> > 
> > The driver name should be ehci_generic, not usb_ehci, otherwise this will
> > collide with other drivers who do the same mistake.
> 
> Ok but then some other drivers should be fixed as well, right?

Yes.

> See:
> ----------------------->8------------------------
> git grep U_BOOT_DRIVER drivers/usb/host/
> drivers/usb/host/dwc2.c:U_BOOT_DRIVER(usb_dwc2) = {
> drivers/usb/host/ehci-exynos.c:U_BOOT_DRIVER(usb_ehci) = {

CCing Lukasz

> drivers/usb/host/ehci-generic.c:U_BOOT_DRIVER(usb_ehci) = {
> drivers/usb/host/ehci-marvell.c:U_BOOT_DRIVER(ehci_mvebu) = {
> drivers/usb/host/ehci-pci.c:U_BOOT_DRIVER(ehci_pci) = {
> drivers/usb/host/ehci-sunxi.c:U_BOOT_DRIVER(usb_ehci) = {

This was fixed by a patch I posted just a while ago.

> drivers/usb/host/ehci-tegra.c:U_BOOT_DRIVER(usb_ehci) = {
> drivers/usb/host/ohci-sunxi.c:U_BOOT_DRIVER(usb_ohci) = {

CCing Hans.

> drivers/usb/host/usb-sandbox.c:U_BOOT_DRIVER(usb_sandbox) = {
> drivers/usb/host/usb-uclass.c:U_BOOT_DRIVER(usb_dev_generic_drv) = {
> drivers/usb/host/xhci-exynos5.c:U_BOOT_DRIVER(usb_xhci) = {
> ----------------------->8------------------------
> 
> I believe it all works because we don't enable 2 drivers at a time
> [usually] :)

Correct. I trapped this on sunxi just today. Propagation of this error
must be stopped.

> And in that light I don't see a point in having different names here.
> Or you think there's a chance to have more than one USB controller enabled
> simultaneously [and if it is possible at all with current implementation]?

I can have ehci-pci and ehci-somethingelse enabled, so yes, the possibility
is here and since Tom triggered it on sunxi, it already happens.

Best regards,
Marek Vasut

  reply	other threads:[~2015-11-30 18:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30 17:47 [U-Boot] [PATCH v3] usb: add support for generic EHCI devices Alexey Brodkin
2015-11-30 17:52 ` Alexey Brodkin
2015-11-30 18:05 ` Marek Vasut
2015-11-30 18:13   ` Alexey Brodkin
2015-11-30 18:21     ` Marek Vasut [this message]
2015-12-01 18:54       ` Alexey Brodkin
2015-12-01 19:07         ` Marek Vasut
2015-12-01 20:02           ` Simon Glass

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=201511301921.06861.marex@denx.de \
    --to=marex@denx.de \
    --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.