mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-14 06:26:13 -04: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
@ -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__,
|
debug("%s: bus:%i cs:%i base:%p mode:%x max_hz:%d\n", __func__,
|
||||||
bus, cs, xilspi->regs, xilspi->mode, xilspi->freq);
|
bus, cs, xilspi->regs, xilspi->mode, xilspi->freq);
|
||||||
|
|
||||||
|
writel(SPISSR_RESET_VALUE, &xilspi->regs->srr);
|
||||||
|
|
||||||
return &xilspi->slave;
|
return &xilspi->slave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +119,9 @@ struct xilinx_spi_reg {
|
|||||||
#define SPIRFOR_OCYVAL_POS 0
|
#define SPIRFOR_OCYVAL_POS 0
|
||||||
#define SPIRFOR_OCYVAL_MASK (0xf << SPIRFOR_OCYVAL_POS)
|
#define SPIRFOR_OCYVAL_MASK (0xf << SPIRFOR_OCYVAL_POS)
|
||||||
|
|
||||||
|
/* SPI Software Reset Register (ssr) */
|
||||||
|
#define SPISSR_RESET_VALUE 0x0a
|
||||||
|
|
||||||
struct xilinx_spi_slave {
|
struct xilinx_spi_slave {
|
||||||
struct spi_slave slave;
|
struct spi_slave slave;
|
||||||
struct xilinx_spi_reg *regs;
|
struct xilinx_spi_reg *regs;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user