[PATCH 2/4] xilinx_spi: Switch to iomem functions and support little endian.

Richard Röjfors richard.rojfors at mocean-labs.com
Thu Nov 12 01:54:39 EST 2009


Josh Boyer wrote:
> On Wed, Nov 11, 2009 at 03:38:34PM +0100, Richard Röjfors wrote:
>> This patch changes the out_(be)(8|16|32) and in_(be)(8|16|32) calls to iowrite(8|16|32)
>> and ioread(8|16|32). This to be able to build on platforms not supporting the in/out calls
>> for instance x86.
>>
>> Support is also added for little endian writes. In some systems the registers should be
>> accessed little endian rather than big endian.
> 
> I wonder if you should make the endianness a config option.  Right now you
> have a conditional check for every read and write.  Does that impact
> performance at all?

It won't affect the performance noticeable.

In our case we need the possibility to run both endians using the same xilinx_spi module.

--Richard


More information about the Linuxppc-dev mailing list