[U-Boot] [PATCH V2 2/6] spi: omap3: add support for more word lengths

Anatolij Gustschin
2013-11-12T09:18:11Z

On Wed, 16 Oct 2013 17:23:25 +0300
Nikita Kiryanov <nikita@compulab.co.il> wrote:

> 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>
> ---
> Changes in V2:
> - Removed semicolon from #define SPI_DEFAULT_WORDLEN (Gerhard Sittig,
> Igor Grinberg)
> - Moved wordlen to generic spi_slave struct, and added generic
> implementation for spi_set_wordlen which only updates the struct without
> touching the hardware (Igor Grinberg)
> - Update wordlen in hardware just before doing SPI transactions, not
> when changing wordlen (Igor Grinberg)
> - OMAP3 specific check of wordlen value from old implementation of
> spi_set_wordlen moved to xfer. It refines the more general check done
> in the new spi_set_wordlen.
> - Fixed comment style in spi.h following a rebase on top of latest
> U-Boot
>
> drivers/spi/omap3_spi.c | 69 +++++++++++++++++++++++++++++++++++--------------
> drivers/spi/omap3_spi.h | 8 +++---
> drivers/spi/spi.c | 13 ++++++++++
> include/spi.h | 16 ++++++++++++
> 4 files changed, 82 insertions(+), 24 deletions(-)

applied to u-boot-video/master, thanks!

Anatolij