xilinx_spi: add support for the DS570 IP.
Subsystems (2)
PATCH v2 3/4 xilinx_spi: add support for the DS570 IP.
This patch adds in support for the DS570 IP.
It's register compatible with the DS464, but adds support for 8/16/32 SPI.
The 8/16/32 support is added by attaching callbacks reading/writing the proper amount of data. To indicate to the driver which amount of bits to use a new field is introduced in the platform data struct.
---
drivers/spi/Kconfig +3 -1
@@ -235,7 +235,7 @@ config SPI_TXX9 SPI driver for Toshiba TXx9 MIPS SoCs config SPI_XILINX - tristate "Xilinx SPI controller" + tristate "Xilinx SPI controller common module" depends on HAS_IOMEM && EXPERIMENTAL select SPI_BITBANG help
@@ -244,6 +244,8 @@ config SPI_XILINX See the "OPB Serial Peripheral Interface (SPI) (v1.00e)" Product Specification document (DS464) for hardware details. + Or for the DS570, see "XPS Serial Peripheral Interface (SPI) (v2.00b)" + config SPI_XILINX_OF tristate "Xilinx SPI controller OF device" depends on SPI_XILINX && (XILINX_VIRTEX || MICROBLAZE)
drivers/spi/xilinx_spi.c +90 -33
205 lines not on this page · raw message
drivers/spi/xilinx_spi_of.c +1 -0
@@ -75,6 +75,7 @@ static int __init xilinx_spi_of_probe(struct of_device *ofdev,return -EINVAL ; } ofdev->dev.platform_data->num_chipselect = *prop; + ofdev->dev.platform_data->bits_per_word =8 ; master =xilinx_spi_init (&ofdev->dev, r_mem, r_irq->start,-1 );if (!master)return -ENODEV ;
include/linux/spi/xilinx_spi.h +4 -2
@@ -3,14 +3,16 @@/** * 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 +* @num_chipselect: Number of chip select by the IP. +* @little_endian: If registers should be accessed little endian or not. +* @bits_per_word: Number of bits per word. * @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; +u8 bits_per_word;struct spi_board_info *devices;u8 num_devices; };
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july