diff options
author | Nikita Kiryanov <nikita@compulab.co.il> | 2013-10-16 17:23:25 +0300 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2013-11-12 10:02:44 +0100 |
commit | 5753d09b1064a669e3be8f27e0f1fd008b96934a (patch) | |
tree | 03eb9c4427faed627d41802960f0c7c516e35203 /drivers/spi/omap3_spi.h | |
parent | 54a759c880a11a6dd93704f0adba40139b595e87 (diff) | |
download | u-boot-imx-5753d09b1064a669e3be8f27e0f1fd008b96934a.zip u-boot-imx-5753d09b1064a669e3be8f27e0f1fd008b96934a.tar.gz u-boot-imx-5753d09b1064a669e3be8f27e0f1fd008b96934a.tar.bz2 |
spi: omap3: add support for more word lengths
Current implementation only supports 8 bit word lengths, even though
omap3 can handle anything between 4 and 32.
Update the spi interface to support changing the SPI word length,
and implement it in omap3_spi driver to support the full range of
possible word lengths.
This implementation is backwards compatible by defaulting to the old
behavior of 8 bit word lengths.
Also, it required a change to the omap3_spi non static I/O functions,
but since they are not used anywhere else, no collateral changes are required.
Cc: Tom Rini <trini@ti.com>
Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Diffstat (limited to 'drivers/spi/omap3_spi.h')
-rw-r--r-- | drivers/spi/omap3_spi.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/omap3_spi.h b/drivers/spi/omap3_spi.h index 01537b6..ab7cd84 100644 --- a/drivers/spi/omap3_spi.h +++ b/drivers/spi/omap3_spi.h @@ -99,11 +99,11 @@ static inline struct omap3_spi_slave *to_omap3_spi(struct spi_slave *slave) return container_of(slave, struct omap3_spi_slave, slave); } -int omap3_spi_txrx(struct spi_slave *slave, unsigned int len, const u8 *txp, - u8 *rxp, unsigned long flags); -int omap3_spi_write(struct spi_slave *slave, unsigned int len, const u8 *txp, +int omap3_spi_txrx(struct spi_slave *slave, unsigned int len, const void *txp, + void *rxp, unsigned long flags); +int omap3_spi_write(struct spi_slave *slave, unsigned int len, const void *txp, unsigned long flags); -int omap3_spi_read(struct spi_slave *slave, unsigned int len, u8 *rxp, +int omap3_spi_read(struct spi_slave *slave, unsigned int len, void *rxp, unsigned long flags); #endif /* _OMAP3_SPI_H_ */ |