xilinx_spi: Switch to iomem functions and support little endian.
Subsystems (2)
PATCH v3 2/4 xilinx_spi: Switch to iomem functions and support little endian.
This patch changes the out_(be)(8|16|32) and in_(be)(8|16|32) calls to 32 bits ioread/iowrite.
The read and write function are attached to the internal struct as callbacks, callback is selected depending on endianess.
This will also build on platforms not supporting the in/out calls for instance x86.
Acked-by Grant Likely <[email protected]>
Tested-by John Linn <[email protected]>
Signed-off-by Richard Röjfors <[email protected]>
---
drivers/spi/Kconfig +1 -1
@@ -236,7 +236,7 @@ config SPI_TXX9 config SPI_XILINX tristate "Xilinx SPI controller" - depends on EXPERIMENTAL + depends on HAS_IOMEM && EXPERIMENTAL select SPI_BITBANG select SPI_XILINX_OF if (XILINX_VIRTEX || MICROBLAZE) help
drivers/spi/xilinx_spi.c +54 -42
202 lines not on this page · raw message
include/linux/spi/xilinx_spi.h +2 -0
@@ -4,11 +4,13 @@/** * struct xspi_platform_data - Platform data of the Xilinx SPI driver * @num_chipselect: Number of chip select by the IP +* @little_endian If registers should be accessed little endian or not * @devices: Devices to add when the driver is probed. * @num_devices: Number of devices in the devices array. */ struct xspi_platform_data {u16 num_chipselect; +bool little_endian;struct spi_board_info *devices;u8 num_devices; };