xilinx_spi in linux-next
[cc'ing linux-kernel & linux-embedded]
Quoted 12 lines · Richard Röjfors
Quoted 10 lines · Andrew Morton
Breaks sparc64 allmodconfig:
drivers/spi/xilinx_spi.c: In function `xspi_write32_be':drivers/spi/xilinx_spi.c:108: error: implicit declaration of function `iowrite32be'drivers/spi/xilinx_spi.c: In function `xspi_read32_be':drivers/spi/xilinx_spi.c:113: error: implicit declaration of function `ioread32be'
Quoted 6 lines
I did a quick grep in the sparc's arch tree and the big endian versions of io(read/write) are not implemented. So the driver can not be compiled on sparc,
I think we have to put harder limits in theKconfig. The driver has not worked on sparc
before anyway.
I can easily tighten up the Kconfig limits (ARM has the same problem), but I'd like to know what the right thing to do here is to write a portable driver. This device is implemented on a Xilinx FPGA, so it is totally feasable it to be wired up to any architecture, especially on embedded stuff. So far it works with PowerPC, Microblaze and x86, and it will most likely show up on ARM in the near future.
The most likely deviation is byte lane ordering either being big or little endian, hence the driver using both io{read,write}32() and io{read,write}32be(), but the 'be' variants aren't implemented on all architectures. What's a driver author to do when trying to write portable code?
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.