summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-07-07 10:16:39 -0600
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>2014-08-06 00:18:01 +0530
commit22052c6236cbebc446ffd51ac69271fe063c654a (patch)
treed1620dd86f989f4481a760fa4c41b684ba6896ab /drivers/spi
parenta4e29db2571144a05ad09380b3674fe5b492f693 (diff)
downloadu-boot-imx-22052c6236cbebc446ffd51ac69271fe063c654a.zip
u-boot-imx-22052c6236cbebc446ffd51ac69271fe063c654a.tar.gz
u-boot-imx-22052c6236cbebc446ffd51ac69271fe063c654a.tar.bz2
spi: Support half-duplex mode in FDT decode
This parameter should also be supported. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Ajay Kumar <ajaykumar.rs@samsung.com> Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 7ddea9b..7d81fbd 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -53,6 +53,8 @@ struct spi_slave *spi_base_setup_slave_fdt(const void *blob, int busnum,
mode |= SPI_CPHA;
if (fdtdec_get_bool(blob, node, "spi-cs-high"))
mode |= SPI_CS_HIGH;
+ if (fdtdec_get_bool(blob, node, "spi-half-duplex"))
+ mode |= SPI_PREAMBLE;
return spi_setup_slave(busnum, cs, max_hz, mode);
}
#endif