spi: cadence: Ensure data lines set to low during dummy-cycle period
authorWitold Sadowski <wsadowski@marvell.com>
Wed, 29 May 2024 07:40:32 +0000 (00:40 -0700)
committerMark Brown <broonie@kernel.org>
Wed, 29 May 2024 12:43:02 +0000 (13:43 +0100)
commit4a69c1264ff41bc5bf7c03101ada0454fbf08868
tree151485c8d49501546a0f72f64ea62437a5e72e29
parent3aac9f4885922ad0fc01b86f85903768219475a3
spi: cadence: Ensure data lines set to low during dummy-cycle period

During dummy-cycles xSPI will switch GPIO into Hi-Z mode. In that dummy
period voltage on data lines will slowly drop, what can cause
unintentional modebyte transmission. Value send to SPI memory chip will
depend on last address, and clock frequency.
To prevent unforeseen consequences of that behaviour, force send
single modebyte(0x00).
Modebyte will be send only if number of dummy-cycles is not equal
to 0. Code must also reduce dummycycle byte count by one - as one byte
is send as modebyte.

Signed-off-by: Witold Sadowski <wsadowski@marvell.com>
Link: https://msgid.link/r/20240529074037.1345882-2-wsadowski@marvell.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence-xspi.c