mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
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>
This commit is contained in:
parent
9fc6a06ad3
commit
85e9c65f8a
2 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,6 +119,9 @@ struct xilinx_spi_reg {
|
|||
#define SPIRFOR_OCYVAL_POS 0
|
||||
#define SPIRFOR_OCYVAL_MASK (0xf << SPIRFOR_OCYVAL_POS)
|
||||
|
||||
/* SPI Software Reset Register (ssr) */
|
||||
#define SPISSR_RESET_VALUE 0x0a
|
||||
|
||||
struct xilinx_spi_slave {
|
||||
struct spi_slave slave;
|
||||
struct xilinx_spi_reg *regs;
|
||||
|
|
Loading…
Add table
Reference in a new issue