diff options
author | Jagan Teki <jagan@amarulasolutions.com> | 2020-04-23 22:30:55 +0530 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2020-04-30 22:34:20 +0530 |
commit | 25e4d94f45611bfc5f1ff71cf29a8d41bb6e9e9f (patch) | |
tree | 7aa2962fabe307353aee06eee8e6fd767152dbf1 /configs/clearfog_defconfig | |
parent | 622b913ea179645a37dc4fcb75cea6f54d3b505f (diff) |
spi: sifive: Fix QPP transfer
The guessed reason is that the existing logic of filling
tx fifo with data, rx fifo with NULL for tx transfer and
filling rx fifo with data, tx fifo with NULL for rx transfer
is not clear enough to support the Quad Page Program.
SiFive SPI controllers have specific sets of watermark
registers and SPI I/O directions bits in order to program
SPI controllers clear enough to support all sets of operating
modes.
Here is the exact programing sequence that would follow on this
patch and tested via SPI-NOR and MMC_SPI.
- set the frame format proto, endian
- set the frame format dir, set it for tx and clear it for rx
- TX transfer:
fill tx fifo with data.
wait for TX watermark bit to clear.
- RX transfer:
fill tx fifo with 0xff.
write nbytes to rx watermark register
wait for rx watermark bit to clear.
read the rx fifo data.
So, this patch adopts this program sequence and fixes the existing
I/O direction bit.
Cc: Vignesh R <vigneshr@ti.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Sagar Kadam <sagar.kadam@sifive.com>
Diffstat (limited to 'configs/clearfog_defconfig')
0 files changed, 0 insertions, 0 deletions