[alsa-devel] [PATCH 4/4] ASoC: fsl: make fsl_ssi driver compilable on ARM/IMX

Timur Tabi timur at freescale.com
Sat Feb 25 00:38:11 CET 2012

Russell King - ARM Linux wrote:

> So, to go around the loop a little further: to make this driver work
> _unaltered_ on ARM, we'd need an in_32be() that read the register
> _without_ doing the byte swapping.
> But then, such an implementation of in_32be() would be absurd because
> it's not doing what it says.


> So, the driver needs to change its accessor method.  There is no
> accessor in existance at present which does the right thing.

Yes, that is my assessment.

> And then I went on to explain that there's more complicated cases too,
> where it seems that in theory you can end up with the same IP connected
> in BE mode and sitting behind a PCI bus, which presents the need for
> accessors which know the bus type by some means.

And since most PCI devices are little-endian, I think that's why readl()
is always little-endian.

We might be able to modify the PowerPC version of ioread32() to be
native-endian without too much difficulty, but that's something that Ben
Herrenschmidt would need to approve.

Timur Tabi
Linux kernel developer at Freescale

More information about the Alsa-devel mailing list