Subject: Re: USB support on mpc5200 broken

From: Grant Likely <[email-masked]>
Date: Mon, 29 Sep 2008 16:02:28 -0600

On Mon, Sep 29, 2008 at 05:04:22PM -0400, Jon Smirl wrote:
> On Mon, Sep 29, 2008 at 4:18 PM, Scott Wood <[email-masked]> wrote:
> > On Mon, Sep 29, 2008 at 10:14:18AM -0400, Jon Smirl wrote:
> >> Shouldn't the driver already know it is being used on a BE machine?
> >
> > No.  Endianness of the CPU is not necessarily the same as the endianness
> > of device registers.
> >
> > For example, PCI OHCI on a big-endian host.
> 
> Endianess is encoded in the specific compatible string.
> 
> compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci";
> This is BE.
> 
> inside PCI bus section
> compatible = "my-pci-ohci-card"
> This would be LE
> 
> The specifically loaded driver knows it's endianess.
> 
> But now you're tell me I need
> compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci",  "ohci-be"

No, we can't do that.

You're right about the current data in compatible being sufficient.
The kernel needs to deal with what firmware hands it,
either by fixups to the device tree data or by teaching the driver
what fsl,mpc5200b-ohci means.

g.