Re: [RFC PATCH] ehci-platform: Merge ppc-of EHCI driver into the ehci-platform driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 7 Nov 2013 06:57:00 Benjamin Herrenschmidt wrote:
> On Wed, 2013-11-06 at 18:39 +1100, Alistair Popple wrote:

[snip]

> 
> I would go even further and add the 44x workarounds to the normal
> platform device, with a compatible check in there. That isn't the
> first time we add quirks to an existing driver.

Ok, easily done. I guess I was just cautious of adding a bunch of platform 
specific code into an otherwise generic driver as there seems to be a number 
of other platforms with their own quirks and it would be easy to end up with a 
driver full of platform specific quirks.

That said it is probably better than the current situation in which each 
platform has its own copy/variation of the generic code in ehci-platform.

Unless anyone is against this I will merge the 440EPX specific quirks into the 
ehci-platform driver and submit it as part of the next version of the Akebono 
patch series.

> > +	/* Initialise platform data from device tree if available. */
> > +	if (!dn) {
> 
> That was supposed to be if (dn) no ?

It sure was, thanks.

> 
> > +		if (of_get_property(dn, "big-endian", NULL)) {
> > +			pdata->big_endian_mmio = 1;
> > +			pdata->big_endian_desc = 1;
> > +		}
> > +		if (of_get_property(dn, "big-endian-regs", NULL))
> > +			pdata->big_endian_mmio = 1;
> > +		if (of_get_property(dn, "big-endian-desc", NULL))
> > +			pdata->big_endian_desc = 1;
> > +	}
> > +
> > 
> >  	irq = platform_get_irq(dev, 0);
> >  	if (irq < 0) {
> >  	
> >  		dev_err(&dev->dev, "no irq provided");
> > 
> > @@ -203,9 +216,10 @@ static int ehci_platform_resume(struct device *dev)
> > 
> >  #define ehci_platform_resume	NULL
> >  #endif /* CONFIG_PM */
> > 
> > -static const struct of_device_id vt8500_ehci_ids[] = {
> > +static const struct of_device_id ehci_platform_ids[] = {
> > 
> >  	{ .compatible = "via,vt8500-ehci", },
> >  	{ .compatible = "wm,prizm-ehci", },
> > 
> > +	{ .compatible = "usb-ehci", },
> > 
> >  	{}
> >  
> >  };
> 
> Cheers,
> Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux