summaryrefslogtreecommitdiff
path: root/drivers/spi/xilinx_spi.c
diff options
context:
space:
mode:
authorJason Wu <jason.wu@petalogix.com>2012-11-23 15:05:08 +1000
committerMichal Simek <michal.simek@xilinx.com>2013-02-04 12:09:49 +0100
commit85e9c65f8a9615ac11257939e5dbd601ee811be4 (patch)
treeda0a56263a9daa5033feb7cf978cf5d8c03ca095 /drivers/spi/xilinx_spi.c
parent9fc6a06ad36994db21ca77013a8ba1c2a88e359c (diff)
downloadu-boot-imx-85e9c65f8a9615ac11257939e5dbd601ee811be4.zip
u-boot-imx-85e9c65f8a9615ac11257939e5dbd601ee811be4.tar.gz
u-boot-imx-85e9c65f8a9615ac11257939e5dbd601ee811be4.tar.bz2
spi: xilinx_spi: Perform software reset during slave setup
to make sure it is in the clear state. Signed-off-by: Jason Wu <huanyu@xilinx.com>
Diffstat (limited to 'drivers/spi/xilinx_spi.c')
-rw-r--r--drivers/spi/xilinx_spi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 52a4134..db01cc2 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -99,6 +99,8 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
debug("%s: bus:%i cs:%i base:%p mode:%x max_hz:%d\n", __func__,
bus, cs, xilspi->regs, xilspi->mode, xilspi->freq);
+ writel(SPISSR_RESET_VALUE, &xilspi->regs->srr);
+
return &xilspi->slave;
}