Hi, On Mon, Mar 25, 2013 at 04:20:42PM +0000, Arnd Bergmann wrote: > This lets us use the ehci-generic driver on platforms without special > requirements for their ehci controllers. In particular, this is true > for the vt8500/wm8x50 platforms, which currently have a separate > driver that causes problems with multiplatform configurations. > > Cc: Tony Prisk <linux@xxxxxxxxxxxxxxx> > Cc: Alexey Charkov <alchark@xxxxxxxxx> > Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> > Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx> > --- > Tony, Alexey et al: could one of you test if this works for you? > > drivers/usb/host/ehci-hcd.c | 5 -- > drivers/usb/host/ehci-platform.c | 28 ++++++-- > drivers/usb/host/ehci-vt8500.c | 150 --------------------------------- > 3 files changed, 22 insertions(+), 161 deletions(-) > > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > index 0c3314c..960e7cf 100644 > --- a/drivers/usb/host/ehci-hcd.c > +++ b/drivers/usb/host/ehci-hcd.c > @@ -1286,11 +1286,6 @@ MODULE_LICENSE ("GPL"); > #define PLATFORM_DRIVER ehci_octeon_driver > #endif > > -#ifdef CONFIG_ARCH_VT8500 > -#include "ehci-vt8500.c" > -#define PLATFORM_DRIVER vt8500_ehci_driver > -#endif > - > #ifdef CONFIG_PLAT_SPEAR > #include "ehci-spear.c" > #define PLATFORM_DRIVER spear_ehci_hcd_driver > diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c > index ca75063..27e9227 100644 > --- a/drivers/usb/host/ehci-platform.c > +++ b/drivers/usb/host/ehci-platform.c > @@ -18,11 +18,13 @@ > * > * Licensed under the GNU/GPL. See COPYING for details. > */ > +#include <linux/dma-mapping.h> > #include <linux/err.h> > #include <linux/kernel.h> > #include <linux/hrtimer.h> > #include <linux/io.h> > #include <linux/module.h> > +#include <linux/of.h> > #include <linux/platform_device.h> > #include <linux/usb.h> > #include <linux/usb/hcd.h> > @@ -62,22 +64,26 @@ static const struct ehci_driver_overrides platform_overrides __initdata = { > .reset = ehci_platform_reset, > }; > > +static struct usb_ehci_pdata ehci_platform_defaults; this ehci_platform_defaults is quite a hack. Would be much better to see a proper re-factoring of the code so that it actually learns about DT *and* platform_data. So, if dev->dev.platform_data is NULL, you shouldn't error, rather you should just assume the default, rather than this quick little hack. Alan has final saying though. -- balbi
Attachment:
signature.asc
Description: Digital signature