summaryrefslogtreecommitdiff
path: root/drivers/spi/davinci_spi.c
diff options
context:
space:
mode:
authorNick Thompson <nick.thompson@ge.com>2010-07-05 20:00:40 -0400
committerSandeep Paulraj <s-paulraj@ti.com>2010-07-05 20:00:40 -0400
commitdce6538f5d21a0def8a4df5328d536abed3e136a (patch)
tree1b6ff024747eb7c68eb7355a039952d0220d8502 /drivers/spi/davinci_spi.c
parent89716964d947805337e82bbf652f13b9a972e47b (diff)
downloadu-boot-imx-dce6538f5d21a0def8a4df5328d536abed3e136a.zip
u-boot-imx-dce6538f5d21a0def8a4df5328d536abed3e136a.tar.gz
u-boot-imx-dce6538f5d21a0def8a4df5328d536abed3e136a.tar.bz2
Davinci: SPI: add the missing v2 patch changes
Two Indentation fixes. Catch requests for full-duplex transfers when driver configured for half-duplex operation only. Signed-off-by: Nick Thompson <nick.thompson@ge.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'drivers/spi/davinci_spi.c')
-rw-r--r--drivers/spi/davinci_spi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 4518ecb..13aca52 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -173,7 +173,7 @@ static int davinci_spi_read(struct spi_slave *slave, unsigned int len,
}
static int davinci_spi_write(struct spi_slave *slave, unsigned int len,
- const u8 *txp, unsigned long flags)
+ const u8 *txp, unsigned long flags)
{
struct davinci_spi_slave *ds = to_davinci_spi(slave);
unsigned int data1_reg_val;
@@ -237,7 +237,7 @@ static int davinci_spi_read_write(struct spi_slave *slave, unsigned int len,
#endif
int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
- const void *dout, void *din, unsigned long flags)
+ const void *dout, void *din, unsigned long flags)
{
unsigned int len;
@@ -266,6 +266,10 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
#ifndef CONFIG_SPI_HALF_DUPLEX
else
return davinci_spi_read_write(slave, len, din, dout, flags);
+#else
+ printf("SPI full duplex transaction requested with "
+ "CONFIG_SPI_HALF_DUPLEX defined.\n");
+ flags |= SPI_XFER_END;
#endif
out: