public inbox for u-boot@lists.denx.de
 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:05:04 +0100	[thread overview]
Message-ID: <201511301905.04848.marex@denx.de> (raw)
In-Reply-To: <1448905665-24748-1-git-send-email-abrodkin@synopsys.com>

On Monday, November 30, 2015 at 06:47:45 PM, Alexey Brodkin wrote:
> From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> 
> This driver is meant to be used with any EHCI-compatible host
> controller in case if there's no need for platform-specific
> glue such as setup of controller or PHY's power mode via
> GPIOs etc.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Marek Vasut <marex@denx.de>
> Cc: Stephen Warren <swarren@nvidia.com>
> ---
> 
> Changes compared to v2:
>  * Driver is disabled by default now
>  * Use uintptr_t instead of uint32_t for "struct ehci_hcor"
>    address calculation
> 
> Changes compared to v1:
>  * Updated commit message with removal of Synopsys board mention
>  * Cleaned-up ehci_usb_remove()
> 
>  drivers/usb/host/Kconfig        |  7 ++++++
>  drivers/usb/host/Makefile       |  1 +
>  drivers/usb/host/ehci-generic.c | 51
> +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59
> insertions(+)
>  create mode 100644 drivers/usb/host/ehci-generic.c
> 
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index 2a2bffe..6bb9caa 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -73,4 +73,11 @@ config USB_EHCI_UNIPHIER
>  	---help---
>  	  Enables support for the on-chip EHCI controller on UniPhier SoCs.
> 
> +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) ?

[...]

> +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.

> +	.name	= "ehci_generic",
> +	.id	= UCLASS_USB,
> +	.of_match = ehci_usb_ids,
> +	.probe = ehci_usb_probe,
> +	.remove = ehci_usb_remove,
> +	.ops	= &ehci_usb_ops,
> +	.priv_auto_alloc_size = sizeof(struct generic_ehci),
> +	.flags	= DM_FLAG_ALLOC_PRIV_DMA,
> +};
> +

Best regards,
Marek Vasut

  parent reply	other threads:[~2015-11-30 18:05 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 [this message]
2015-11-30 18:13   ` Alexey Brodkin
2015-11-30 18:21     ` Marek Vasut
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=201511301905.04848.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox