All of lore.kernel.org
 help / color / mirror / Atom feed
From: stern@rowland.harvard.edu (Alan Stern)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] USB: EHCI: make ehci-orion a separate driver
Date: Mon, 18 Feb 2013 17:34:35 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1302181723540.6790-100000@netrider.rowland.org> (raw)
In-Reply-To: <1360966349-1242560-2-git-send-email-arnd@arndb.de>

On Fri, 15 Feb 2013, Arnd Bergmann wrote:

> From: Manjunath Goudar <manjunath.goudar@linaro.org>
> 
> With the multiplatform changes in arm-soc tree, it becomes
> possible to enable the mvebu platform (which uses
> ehci-orion) at the same time as other platforms that require
> a conflicting EHCI bus glue. At the moment, this results
> in a warning like
> 
> drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
> drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definition
> drivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]
> 
> and an ehci driver that only works on one of them.
> 
> With the infrastructure added by Alan Stern in patch 3e0232039
> "USB: EHCI: prepare to make ehci-hcd a library module", we can
> avoid this problem by turning a bus glue into a separate
> module, as we do here for the orion bus glue.

> --- a/drivers/usb/host/Makefile
> +++ b/drivers/usb/host/Makefile
> @@ -30,6 +30,7 @@ obj-$(CONFIG_USB_EHCI_MXC)	+= ehci-mxc.o
>  
>  obj-$(CONFIG_USB_OXU210HP_HCD)	+= oxu210hp-hcd.o
>  obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o
> +obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o

Both of these two new lines should be formatted like the other lines in
this file (i.e., with tabs at the corresponding places), and they
should come before the OXU210HP_HCD entry so that they are next to the
other EHCI-related lines.

> --- a/drivers/usb/host/ehci-orion.c
> +++ b/drivers/usb/host/ehci-orion.c
> @@ -17,6 +17,13 @@
>  #include <linux/of.h>
>  #include <linux/of_device.h>
>  #include <linux/of_irq.h>
> +#include <linux/usb.h>
> +#include <linux/usb/hcd.h>
> +#include <linux/io.h>
> +#include <linux/dma-mapping.h>

Is this line really needed?

> @@ -34,6 +41,17 @@
>  #define USB_PHY_IVREF_CTRL	0x440
>  #define USB_PHY_TST_GRP_CTRL	0x450
>  
> +#define DRIVER_DESC "EHCI orion driver"
> +
> +static const char hcd_name[] = "ehci-orion";
> +
> +static struct hc_driver __read_mostly ehci_orion_hc_driver;
> +
> +static const struct ehci_driver_overrides orion_overrides __initdata = {
> +	.reset = ehci_setup,
> +};

This is not necessary; ehci_setup is the default value anyway.  This 
structure can be omitted.

> @@ -323,8 +296,6 @@ static int __exit ehci_orion_drv_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -MODULE_ALIAS("platform:orion-ehci");
> -
>  static const struct of_device_id ehci_orion_dt_ids[] = {
>  	{ .compatible = "marvell,orion-ehci", },
>  	{},
> @@ -336,8 +307,31 @@ static struct platform_driver ehci_orion_driver = {
>  	.remove		= __exit_p(ehci_orion_drv_remove),
>  	.shutdown	= usb_hcd_platform_shutdown,
>  	.driver = {
> -		.name	= "orion-ehci",
> +		.name	= hcd_name,

Is this really what you want -- changing the driver name from 
"orion-ehci" to "ehci-orion"?  Is that liable to cause trouble?

> +MODULE_DESCRIPTION(DRIVER_DESC);
> +MODULE_ALIAS("platform:ehci-orion");

And is this really what you want -- changing the alias from 
"platform:orion-ehci" to "platform:ehci-orion"?

Alan Stern

  parent reply	other threads:[~2013-02-18 22:34 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 10:24 [V2 0/8] usb: ehci: more bus glues as separate modules Manjunath Goudar
2013-02-15 10:24 ` [V2 2/8] USB: EHCI: make ehci-atmel a separate driver Manjunath Goudar
2013-02-18  9:44   ` Bo Shen
2013-02-18  9:44     ` Bo Shen
2013-02-18 10:12     ` Arnd Bergmann
2013-02-18 10:12       ` Arnd Bergmann
2013-02-15 10:24 ` [V2 4/8] USB: EHCI: make ehci-mv as separate static driver Manjunath Goudar
2013-02-15 10:24 ` [V2 5/8] USB: EHCI: make ehci-vt8500 a separate driver Manjunath Goudar
2013-02-20 16:37   ` Alan Stern
2013-02-20 16:37     ` Alan Stern
2013-02-15 10:24 ` [V2 6/8] USB: EHCI: make ehci-msm " Manjunath Goudar
2013-02-20 16:31   ` Alan Stern
2013-02-20 16:31     ` Alan Stern
2013-02-15 10:24 ` [V2 7/8] USB: EHCI: make ehci-w90X900 " Manjunath Goudar
2013-02-20 16:33   ` Alan Stern
2013-02-20 16:33     ` Alan Stern
2013-02-15 10:24 ` [V2 8/8] USB: EHCI: make ehci-orion " Manjunath Goudar
2013-02-15 16:10 ` [V2 0/8] usb: ehci: more bus glues as separate modules Arnd Bergmann
2013-02-15 18:07   ` Greg KH
2013-02-15 21:58     ` Arnd Bergmann
2013-02-15 22:12       ` [PATCH 1/2] USB: EHCI: make ehci-vt8500 a separate driver Arnd Bergmann
2013-02-15 22:12         ` [PATCH 2/2] USB: EHCI: make ehci-orion " Arnd Bergmann
2013-02-15 22:38           ` Jason Cooper
2013-02-16  8:42           ` Andrew Lunn
2013-02-16 14:19           ` Ezequiel Garcia
2013-02-16 23:03             ` [PATCH] USB: update host controller Kconfig entries Arnd Bergmann
2013-02-18 22:34           ` Alan Stern [this message]
2013-02-19  7:24             ` [PATCH 2/2] USB: EHCI: make ehci-orion a separate driver Andrew Lunn
2013-02-19  8:32               ` Arnaud Patard (Rtp)
2013-02-20 18:28               ` Greg KH
2013-02-20 18:44                 ` Arnd Bergmann
     [not found]             ` <CAJFYCKGCNDTSq9OYZUYXx8XNSgSHD=p=hw+9_7N=EhM=bUu=bg@mail.gmail.com>
2013-02-19 10:56               ` Arnd Bergmann
2013-02-19 15:26                 ` Alan Stern
2013-02-20 16:02           ` Alan Stern
2013-02-20 16:27             ` Arnd Bergmann
2013-02-20 16:54               ` Jason Cooper
2013-02-15 22:21         ` [PATCH 1/2] USB: EHCI: make ehci-vt8500 " Tony Prisk
2013-02-15 16:47 ` [V2 0/8] usb: ehci: more bus glues as separate modules Ezequiel Garcia

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=Pine.LNX.4.44L0.1302181723540.6790-100000@netrider.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=linux-arm-kernel@lists.infradead.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.