From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Tue, 12 Nov 2013 10:18:11 +0100 Subject: [U-Boot] [PATCH V2 2/6] spi: omap3: add support for more word lengths In-Reply-To: <1381933409-8127-3-git-send-email-nikita@compulab.co.il> References: <1381933409-8127-1-git-send-email-nikita@compulab.co.il> <1381933409-8127-3-git-send-email-nikita@compulab.co.il> Message-ID: <20131112101811.50cb192f@crub> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 16 Oct 2013 17:23:25 +0300 Nikita Kiryanov 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 > Cc: Jagannadha Sutradharudu Teki > Cc: Igor Grinberg > Signed-off-by: Nikita Kiryanov > --- > 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