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

From: Alistair Popple <[email-masked]>
Date: Thu, 07 Nov 2013 13:34:10 +1100

On Wed, 6 Nov 2013 11:14:44 Alan Stern wrote:
> On Wed, 6 Nov 2013, Alistair Popple wrote:

[snip]

> > +	/* Initialise platform data from device tree if available. */
> > +	if (!dn) {
> 
> Shouldn't this be "if (dn)"?

Yep. 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;
> > +	}
> > +
> 
> This isn't good if there is more than one EHCI controller using
> ehci-platform.  To accomodate such cases, it would be necessary to
> allocate a separate copy of ehci_platform_defaults for each controller.

OK, that's a problem. Rather than allocating platform data for each controller 
I will move the device tree parsing into ehci_platform_reset().

> Alan Stern