Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-23 Thread Alan Stern
On Tue, 22 Jan 2013, Sascha Hauer wrote:

> On Tue, Jan 22, 2013 at 03:38:55PM +, Arnd Bergmann wrote:
> > On Tuesday 22 January 2013, Alan Stern wrote:
> > > In order to prevent this, you have to make sure that each glue driver
> > > depends on USB_ARCH_HAS_EHCI.  A simple way to do this is to surround
> > > the Kconfig entries for those drivers with "if USB && 
> > > USB_ARCH_HAS_EHCI" ... "endif".
> > 
> > I was actually thinking we could remove the use of USB_ARCH_HAS_EHCI
> > as well once we have inverted the logic for selecting USB_EHCI_HCD,
> > but there is another problem with that, because then we still need
> > something to select USB_ARCH_HAS_HCD, or kill that symbol as well.
> 
> +1 for killing it. Such symbols get more and more meaningless anyway
> with multiarch kernels-

I tend to agree.  Anyway, the symbols are named badly.  _Any_
architecture with HAS_IOMEM can in theory aupport host-side USB.  
Maybe some of the platforms don't, but that has nothing to do with the
CPU's architecture.

Furthermore, even platforms that don't support USB host controllers 
can use things like dummy-hcd and usbip, which provide virtual host 
controllers.

Anybody think these symbols should be retained?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-22 Thread Sascha Hauer
On Tue, Jan 22, 2013 at 03:38:55PM +, Arnd Bergmann wrote:
> On Tuesday 22 January 2013, Alan Stern wrote:
> > In order to prevent this, you have to make sure that each glue driver
> > depends on USB_ARCH_HAS_EHCI.  A simple way to do this is to surround
> > the Kconfig entries for those drivers with "if USB && 
> > USB_ARCH_HAS_EHCI" ... "endif".
> 
> I was actually thinking we could remove the use of USB_ARCH_HAS_EHCI
> as well once we have inverted the logic for selecting USB_EHCI_HCD,
> but there is another problem with that, because then we still need
> something to select USB_ARCH_HAS_HCD, or kill that symbol as well.

+1 for killing it. Such symbols get more and more meaningless anyway
with multiarch kernels-

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-22 Thread Arnd Bergmann
On Tuesday 22 January 2013, Alan Stern wrote:
> In order to prevent this, you have to make sure that each glue driver
> depends on USB_ARCH_HAS_EHCI.  A simple way to do this is to surround
> the Kconfig entries for those drivers with "if USB && 
> USB_ARCH_HAS_EHCI" ... "endif".

I was actually thinking we could remove the use of USB_ARCH_HAS_EHCI
as well once we have inverted the logic for selecting USB_EHCI_HCD,
but there is another problem with that, because then we still need
something to select USB_ARCH_HAS_HCD, or kill that symbol as well.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-22 Thread Alan Stern
On Tue, 22 Jan 2013, Shawn Guo wrote:

> On Mon, Jan 21, 2013 at 09:37:42PM +, Arnd Bergmann wrote:
> > > Arnd, please take a look at
> > > 
> > > http://marc.info/?l=linux-usb&m=135843716515529&w=2
> > > 
> > > I can't test it easily, not being set up for cross compilation.  I'm 
> > > waiting to hear from anybody whether it works before submitting it.
> > > (There's also a report of memory corruption involving a similar patch 
> > > for ehci-omap; it hasn't been tracked down yet.)
> > 
> > Your patch looks good to me, but it also seems to do some other
> > changes that are not required to fix the problem but could wait
> > for 3.9 instead. You definitely have my Ack if you are willing
> > to take it for 3.8 though.

I think it's not too late to submit this for 3.8.  Thanks for the Ack.

> > Shawn or Sascha should be able to test it.
> > 
> Alan,
> 
> Thanks for the patch.  I just gave it try.  The USB Host port still
> works for me with a couple of fixes on your changes integrated (one
> for compiling and the other for probing).  So you have my ACK with
> the changes below rolled into your patch.

Right, I have merged your changes into the patch.  Will submit shortly.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-22 Thread Alan Stern
On Tue, 22 Jan 2013, Manjunath Goudar wrote:

> > >  I think we can actually
> > > get the same results by turning the Kconfig logic around and making
> > > the platform glue drivers 'select USB_EHCI_HCD' than depending on
> > > it.
> >
> > That's a good idea.  The Kconfig changes would have to be done
> > carefully to make sure that the dependency on USB_ARCH_HAS_EHCI still
> > applies to all the platform drivers.
> >
> > Manjunath, would you like to send a patch to do this?
> >
> > Alan Stern
> >
> > Ya sure,could you explain little bit  briefly about the Kconfig changes.

Suppose you do exactly what Arnd proposed: add "select USB_EHCI_HCD" to
the Kconfig entries for each of the platform glue drivers.  Then
consider what would happen in a build where USB_ARCH_HAS_EHCI is "n"
but one of those glue drivers is enabled.  There would be conflicting
requirements on USB_EHCI_HCD: The new "select" would force it to be on,
but the existing "depends on USB && USB_ARCH_HAS_EHCI" would force it
to be off.  The build would fail.

In order to prevent this, you have to make sure that each glue driver
depends on USB_ARCH_HAS_EHCI.  A simple way to do this is to surround
the Kconfig entries for those drivers with "if USB && 
USB_ARCH_HAS_EHCI" ... "endif".

Come to think of it, the "if USB" part really should protect the entire 
file.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-21 Thread Shawn Guo
On Tue, Jan 22, 2013 at 02:11:18PM +0800, Shawn Guo wrote:
> Alan,
> 
> Thanks for the patch.  I just gave it try.  The USB Host port still
> works for me with a couple of fixes on your changes integrated (one
> for compiling and the other for probing).  So you have my ACK with
> the changes below rolled into your patch.
> 
> Acked-by: Shawn Guo 
> 
Sorry.  I meant a Test tag.

Tested-by: Shawn Guo 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-21 Thread Shawn Guo
On Mon, Jan 21, 2013 at 09:37:42PM +, Arnd Bergmann wrote:
> > Arnd, please take a look at
> > 
> > http://marc.info/?l=linux-usb&m=135843716515529&w=2
> > 
> > I can't test it easily, not being set up for cross compilation.  I'm 
> > waiting to hear from anybody whether it works before submitting it.
> > (There's also a report of memory corruption involving a similar patch 
> > for ehci-omap; it hasn't been tracked down yet.)
> 
> Your patch looks good to me, but it also seems to do some other
> changes that are not required to fix the problem but could wait
> for 3.9 instead. You definitely have my Ack if you are willing
> to take it for 3.8 though.
> 
> Shawn or Sascha should be able to test it.
> 
Alan,

Thanks for the patch.  I just gave it try.  The USB Host port still
works for me with a couple of fixes on your changes integrated (one
for compiling and the other for probing).  So you have my ACK with
the changes below rolled into your patch.

Acked-by: Shawn Guo 

---8<

diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index 177b354..a685945 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -37,7 +37,7 @@

 #define DRIVER_DESC "Freescale On-Chip EHCI Host driver"

-static const char hcd_name[] = "ehci-mxc";
+static const char hcd_name[] = "mxc-ehci";

 #define ULPI_VIEWPORT_OFFSET   0x170

@@ -48,7 +48,7 @@ struct ehci_mxc_priv {
 static struct hc_driver __read_mostly ehci_mxc_hc_driver;

 static const struct ehci_driver_overrides ehci_mxc_overrides __initdata = {
-   .extra_priv_size =  sizeof(struct ehci_mxc_priv);
+   .extra_priv_size =  sizeof(struct ehci_mxc_priv),
 };

 static int ehci_mxc_drv_probe(struct platform_device *pdev)

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-21 Thread Alan Stern
On Mon, 21 Jan 2013, Arnd Bergmann wrote:

> Alan, one comment about your version: You keep maintaining the
> '#if IS_ENABLED' list in the main driver, which I think can actually
> get removed now.

I considered doing that.  The benefit of keeping it is that it warns 
about configs where the main driver is built but can never be used.

Still, you're right that its purpose is becoming less important.  I had 
planned to remove it when all the glue driver had been converted, but 
in fact it could be removed at any time.

>  Since the base driver can be built independent of
> the presence of platform glue drivers, there is no need to forbid
> it any more, and the #if block will cause merge conflicts for each
> patch that converts or adds another platform.

If the patches are done independently.  There are likely to be some
context conflicts anyway.

>  I think we can actually
> get the same results by turning the Kconfig logic around and making
> the platform glue drivers 'select USB_EHCI_HCD' than depending on
> it.

That's a good idea.  The Kconfig changes would have to be done 
carefully to make sure that the dependency on USB_ARCH_HAS_EHCI still 
applies to all the platform drivers.

Manjunath, would you like to send a patch to do this?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-21 Thread Arnd Bergmann
On Monday 21 January 2013, Alan Stern wrote:
> Is Manjunath aware of the first patch attached to this email message?
> 
> http://marc.info/?l=linux-usb&m=135843902916416&w=2
> 

I would not expect so. Manjunath is still learning about the open
source processes, but he has also done a similar patch in his tree,
and one for most of the other ARM based platforms.

Manjunath: following up on the discussions we've had, I would suggest
you take a look at that patch, and do a comparison with your version
(apply it on the same base, then use git-diff to show the differences
between the version) and thing about whether your they are significant
or not.  Since Alan posted his version on the mailing list first, that's
the one that should get merged, but there might be something in it that
you can learn from it and that I did not see.

Alan, one comment about your version: You keep maintaining the
'#if IS_ENABLED' list in the main driver, which I think can actually
get removed now. Since the base driver can be built independent of
the presence of platform glue drivers, there is no need to forbid
it any more, and the #if block will cause merge conflicts for each
patch that converts or adds another platform. I think we can actually
get the same results by turning the Kconfig logic around and making
the platform glue drivers 'select USB_EHCI_HCD' than depending on
it.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-21 Thread Arnd Bergmann
On Monday 21 January 2013, Alan Stern wrote:
> On Mon, 21 Jan 2013, Felipe Balbi wrote:
> 
> > On Mon, Jan 21, 2013 at 05:16:06PM +, Arnd Bergmann wrote:
> > > In linux-3.8-rc1 it became possible to build the imx and
> > > mvebu platforms together in a single kernel, which clashes
> > > in the ehci driver.
> > > 
> > > Manjunath Goudar is already working on a patch to convert
> > > both the imx and the mvebu glue drivers (along with all
> > > the other ARM specific ones) to the new probing method,
> > > but that will be too late to fix v3.8. This patch instead
> > > adds yet another hack like the existing ones to allow
> > > the ehci driver to load both back-ends.
> 
> Pardon me for being confused.  Is this about imx and mvebu (as 
> mentioned here) or about orion and mxc (as described in the patch 
> title, the error messages below, and the patch itself)?

mxc is the old name for imx: the platform got removed, but some
of the drivers still carry the old name. Similarly, orion was
used before as the name for the superset of various Marvell platforms,
and mvebu is the superset of that and some of the newer ones.

Sorry for the confusion.

> > > Without this patch, building allyesconfig results in:
> > > 
> > > drivers/usb/host/ehci-hcd.c:1285:0: error: "PLATFORM_DRIVER" redefined
> > > drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the 
> > > previous definition
> > > In file included from drivers/usb/host/ehci-hcd.c:1254:0:
> > > drivers/usb/host/ehci-mxc.c:280:31: warning: 'ehci_mxc_driver' defined 
> > > but not used
> 
> Was the point here to fix the build error or to allow the two drivers
> to coexist?  The first would be eaiser than the second.

Fixing the build error is probably the more important part here, but
we also really want this to work, since people are migrating towards
multiplatform kernels now, and mvebu/orion and imx/mxc are two of the
more important ones.

> > NAK, should be converted to the new usage of ehci library driver. Alan
> > Stern already implemented for a few drivers, help is very welcome.
> 
> Arnd, please take a look at
> 
> http://marc.info/?l=linux-usb&m=135843716515529&w=2
> 
> I can't test it easily, not being set up for cross compilation.  I'm 
> waiting to hear from anybody whether it works before submitting it.
> (There's also a report of memory corruption involving a similar patch 
> for ehci-omap; it hasn't been tracked down yet.)

Your patch looks good to me, but it also seems to do some other
changes that are not required to fix the problem but could wait
for 3.9 instead. You definitely have my Ack if you are willing
to take it for 3.8 though.

Shawn or Sascha should be able to test it.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-21 Thread Alan Stern
On Mon, 21 Jan 2013, Arnd Bergmann wrote:

> On Monday 21 January 2013, Felipe Balbi wrote:
> > On Mon, Jan 21, 2013 at 05:16:06PM +, Arnd Bergmann wrote:
> > > Manjunath Goudar is already working on a patch to convert
> > > both the imx and the mvebu glue drivers (along with all
> > > the other ARM specific ones) to the new probing method,
> > > but that will be too late to fix v3.8. This patch instead
> > > adds yet another hack like the existing ones to allow
> > > the ehci driver to load both back-ends.
> > 
> > NAK, should be converted to the new usage of ehci library driver. Alan
> > Stern already implemented for a few drivers, help is very welcome.
> 
> As I explained above, Manjunath already has a patch [1] for that, but I
> think it's too late to include that in v3.8 given the regression
> potential and size of the patch. Once he submits that patch for 3.9,
> my change would get taken out anyway, but it lets us build important
> configurations (including allyesconfig build tests) on 3.8.
> 
>   Arnd
> 
> [1] 
> http://git.linaro.org/gitweb?p=people/manjunathgoudar/usb-refactoring.git;a=commitdiff;h=d9f28dba727212d022605c955796a3a83b3978ae

Is Manjunath aware of the first patch attached to this email message?

http://marc.info/?l=linux-usb&m=135843902916416&w=2

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-21 Thread Arnd Bergmann
On Monday 21 January 2013, Felipe Balbi wrote:
> On Mon, Jan 21, 2013 at 05:16:06PM +, Arnd Bergmann wrote:
> > Manjunath Goudar is already working on a patch to convert
> > both the imx and the mvebu glue drivers (along with all
> > the other ARM specific ones) to the new probing method,
> > but that will be too late to fix v3.8. This patch instead
> > adds yet another hack like the existing ones to allow
> > the ehci driver to load both back-ends.
> 
> NAK, should be converted to the new usage of ehci library driver. Alan
> Stern already implemented for a few drivers, help is very welcome.

As I explained above, Manjunath already has a patch [1] for that, but I
think it's too late to include that in v3.8 given the regression
potential and size of the patch. Once he submits that patch for 3.9,
my change would get taken out anyway, but it lets us build important
configurations (including allyesconfig build tests) on 3.8.

Arnd

[1] 
http://git.linaro.org/gitweb?p=people/manjunathgoudar/usb-refactoring.git;a=commitdiff;h=d9f28dba727212d022605c955796a3a83b3978ae
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-21 Thread Alan Stern
On Mon, 21 Jan 2013, Felipe Balbi wrote:

> On Mon, Jan 21, 2013 at 05:16:06PM +, Arnd Bergmann wrote:
> > In linux-3.8-rc1 it became possible to build the imx and
> > mvebu platforms together in a single kernel, which clashes
> > in the ehci driver.
> > 
> > Manjunath Goudar is already working on a patch to convert
> > both the imx and the mvebu glue drivers (along with all
> > the other ARM specific ones) to the new probing method,
> > but that will be too late to fix v3.8. This patch instead
> > adds yet another hack like the existing ones to allow
> > the ehci driver to load both back-ends.

Pardon me for being confused.  Is this about imx and mvebu (as 
mentioned here) or about orion and mxc (as described in the patch 
title, the error messages below, and the patch itself)?

> > Without this patch, building allyesconfig results in:
> > 
> > drivers/usb/host/ehci-hcd.c:1285:0: error: "PLATFORM_DRIVER" redefined
> > drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the 
> > previous definition
> > In file included from drivers/usb/host/ehci-hcd.c:1254:0:
> > drivers/usb/host/ehci-mxc.c:280:31: warning: 'ehci_mxc_driver' defined but 
> > not used

Was the point here to fix the build error or to allow the two drivers
to coexist?  The first would be eaiser than the second.

> > Signed-off-by: Arnd Bergmann 
> > Cc: Alan Stern 
> > Cc: Greg Kroah-Hartman 
> > Cc: linux-usb@vger.kernel.org
> > Cc: Manjunath Goudar 
> > Cc: Shawn Guo 
> > Cc: Sascha Hauer 
> > Cc: Jason Cooper 
> > Cc: Andrew Lunn 
> > Cc: Gregory Clement 
> 
> NAK, should be converted to the new usage of ehci library driver. Alan
> Stern already implemented for a few drivers, help is very welcome.

Arnd, please take a look at

http://marc.info/?l=linux-usb&m=135843716515529&w=2

I can't test it easily, not being set up for cross compilation.  I'm 
waiting to hear from anybody whether it works before submitting it.
(There's also a report of memory corruption involving a similar patch 
for ehci-omap; it hasn't been tracked down yet.)

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-21 Thread Felipe Balbi
On Mon, Jan 21, 2013 at 05:16:06PM +, Arnd Bergmann wrote:
> In linux-3.8-rc1 it became possible to build the imx and
> mvebu platforms together in a single kernel, which clashes
> in the ehci driver.
> 
> Manjunath Goudar is already working on a patch to convert
> both the imx and the mvebu glue drivers (along with all
> the other ARM specific ones) to the new probing method,
> but that will be too late to fix v3.8. This patch instead
> adds yet another hack like the existing ones to allow
> the ehci driver to load both back-ends.
> 
> Without this patch, building allyesconfig results in:
> 
> drivers/usb/host/ehci-hcd.c:1285:0: error: "PLATFORM_DRIVER" redefined
> drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the 
> previous definition
> In file included from drivers/usb/host/ehci-hcd.c:1254:0:
> drivers/usb/host/ehci-mxc.c:280:31: warning: 'ehci_mxc_driver' defined but 
> not used
> 
> Signed-off-by: Arnd Bergmann 
> Cc: Alan Stern 
> Cc: Greg Kroah-Hartman 
> Cc: linux-usb@vger.kernel.org
> Cc: Manjunath Goudar 
> Cc: Shawn Guo 
> Cc: Sascha Hauer 
> Cc: Jason Cooper 
> Cc: Andrew Lunn 
> Cc: Gregory Clement 

NAK, should be converted to the new usage of ehci library driver. Alan
Stern already implemented for a few drivers, help is very welcome.

-- 
balbi


signature.asc
Description: Digital signature


[PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist

2013-01-21 Thread Arnd Bergmann
In linux-3.8-rc1 it became possible to build the imx and
mvebu platforms together in a single kernel, which clashes
in the ehci driver.

Manjunath Goudar is already working on a patch to convert
both the imx and the mvebu glue drivers (along with all
the other ARM specific ones) to the new probing method,
but that will be too late to fix v3.8. This patch instead
adds yet another hack like the existing ones to allow
the ehci driver to load both back-ends.

Without this patch, building allyesconfig results in:

drivers/usb/host/ehci-hcd.c:1285:0: error: "PLATFORM_DRIVER" redefined
drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous 
definition
In file included from drivers/usb/host/ehci-hcd.c:1254:0:
drivers/usb/host/ehci-mxc.c:280:31: warning: 'ehci_mxc_driver' defined but not 
used

Signed-off-by: Arnd Bergmann 
Cc: Alan Stern 
Cc: Greg Kroah-Hartman 
Cc: linux-usb@vger.kernel.org
Cc: Manjunath Goudar 
Cc: Shawn Guo 
Cc: Sascha Hauer 
Cc: Jason Cooper 
Cc: Andrew Lunn 
Cc: Gregory Clement 
---
 drivers/usb/host/ehci-hcd.c |   16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index c97503b..92e7180 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1282,7 +1282,7 @@ MODULE_LICENSE ("GPL");
 
 #ifdef CONFIG_PLAT_ORION
 #include "ehci-orion.c"
-#definePLATFORM_DRIVER ehci_orion_driver
+#defineORION_PLATFORM_DRIVER   ehci_orion_driver
 #endif
 
 #ifdef CONFIG_USB_W90X900_EHCI
@@ -1353,6 +1353,7 @@ MODULE_LICENSE ("GPL");
 #if !IS_ENABLED(CONFIG_USB_EHCI_PCI) && \
!IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \
!defined(CONFIG_USB_CHIPIDEA_HOST) && \
+   !defined(ORION_PLATFORM_DRIVER) && \
!defined(PLATFORM_DRIVER) && \
!defined(PS3_SYSTEM_BUS_DRIVER) && \
!defined(OF_PLATFORM_DRIVER) && \
@@ -1393,6 +1394,12 @@ static int __init ehci_hcd_init(void)
goto clean0;
 #endif
 
+#ifdef ORION_PLATFORM_DRIVER
+   retval = platform_driver_register(&ORION_PLATFORM_DRIVER);
+   if (retval < 0)
+   goto clean1;
+#endif
+
 #ifdef PS3_SYSTEM_BUS_DRIVER
retval = ps3_ehci_driver_register(&PS3_SYSTEM_BUS_DRIVER);
if (retval < 0)
@@ -1424,6 +1431,10 @@ clean3:
ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
 clean2:
 #endif
+#ifdef ORION_PLATFORM_DRIVER
+   platform_driver_unregister(&ORION_PLATFORM_DRIVER);
+clean1:
+#endif
 #ifdef PLATFORM_DRIVER
platform_driver_unregister(&PLATFORM_DRIVER);
 clean0:
@@ -1446,6 +1457,9 @@ static void __exit ehci_hcd_cleanup(void)
 #ifdef OF_PLATFORM_DRIVER
platform_driver_unregister(&OF_PLATFORM_DRIVER);
 #endif
+#ifdef ORION_PLATFORM_DRIVER
+   platform_driver_unregister(&ORION_PLATFORM_DRIVER);
+#endif
 #ifdef PLATFORM_DRIVER
platform_driver_unregister(&PLATFORM_DRIVER);
 #endif
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html