u-boot/drivers/spi
Jagan Teki 25e4d94f45 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>
2020-04-30 22:34:20 +05:30
..
altera_spi.c
atcspi200_spi.c
ath79_spi.c common: Move clock functions into a new file 2020-01-17 13:27:29 -05:00
atmel_spi.c dm: gpio: Allow control of GPIO uclass in SPL 2019-12-15 08:52:29 +08:00
atmel_spi.h
atmel-quadspi.c spi: atmel-quadspi: Add verbose debug facilities to monitor register accesses 2020-04-02 17:17:09 +05:30
bcm63xx_hsspi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
bcm63xx_spi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
bcmstb_spi.c
cadence_qspi_apb.c spi: cadence-qspi: Add support for Cadence Octal SPI controller 2020-01-27 22:27:22 +05:30
cadence_qspi.c spi: cadence-qspi: Move ref clock calculation to probe 2020-04-29 01:44:35 +05:30
cadence_qspi.h spi: cadence-qspi: Add direct mode support 2020-01-27 22:27:22 +05:30
cf_spi.c
davinci_spi.c
designware_spi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
exynos_spi.c common: Move get_ticks() function out of common.h 2019-12-02 18:23:13 -05:00
fsl_dspi.c
fsl_espi.c
fsl_qspi.c spi: Transform the FSL QuadSPI driver to use the SPI MEM API 2020-04-29 01:44:35 +05:30
ich.c spi: ich: Drop while loop in hardware sequencing erase case 2020-02-04 01:19:28 +08:00
ich.h spi: ich: Add Apollo Lake support 2019-12-15 11:44:24 +08:00
Kconfig spi: nxp_fspi: new driver for the FlexSPI controller 2020-01-27 22:27:21 +05:30
kirkwood_spi.c
lpc32xx_ssp.c
Makefile spi: nxp_fspi: new driver for the FlexSPI controller 2020-01-27 22:27:21 +05:30
meson_spifc.c
mpc8xx_spi.c
mpc8xxx_spi.c spi: mpc8xxx_spi: fix missing dev_err definition 2020-04-24 16:40:09 -04:00
mscc_bb_spi.c
mt7621_spi.c spi: mt7621-spi: restore default register value after each xfer 2019-10-25 17:20:44 +02:00
mtk_snfi_spi.c
mvebu_a3700_spi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
mxc_spi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
mxs_spi.c common: Move ARM cache operations out of common.h 2019-12-02 18:24:58 -05:00
nxp_fspi.c dm: core: Drop the inclusion of linux/compat.h in dm.h 2020-02-05 21:48:22 -07:00
omap3_spi.c
pic32_spi.c
pl022_spi.c
renesas_rpc_spi.c
rk_spi.c spi: rk: Limit transfers to (64K - 1) bytes 2019-12-27 17:47:26 +05:30
rk_spi.h
sandbox_spi.c spi: Add support for memory-mapped flash 2019-11-03 07:20:26 +08:00
sh_qspi.c
sh_spi.c
sh_spi.h
soft_spi_legacy.c
soft_spi.c spi: soft_spi: Fix data abort if slave is not probed 2019-09-16 08:09:22 +05:30
spi-emul-uclass.c
spi-mem-nodm.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
spi-mem.c spi: spi-mem: Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum 2020-04-29 01:44:35 +05:30
spi-sifive.c spi: sifive: Fix QPP transfer 2020-04-30 22:34:20 +05:30
spi-sunxi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
spi-uclass.c mtd: spi-nor-core: Add octal mode support 2020-01-27 22:27:22 +05:30
spi.c
stm32_qspi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
stm32_spi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
tegra20_sflash.c common: Move get_ticks() function out of common.h 2019-12-02 18:23:13 -05:00
tegra20_slink.c common: Move get_ticks() function out of common.h 2019-12-02 18:23:13 -05:00
tegra114_spi.c common: Move get_ticks() function out of common.h 2019-12-02 18:23:13 -05:00
tegra210_qspi.c qspi: t210: Use dev_read calls to get FDT data like base, freq 2020-04-02 14:30:02 -07:00
tegra_spi.h
ti_qspi.c dm: core: Require users of devres to include the header 2020-02-05 19:33:46 -07:00
uniphier_spi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
xilinx_spi.c
zynq_qspi.c
zynq_spi.c common: Move get_ticks() function out of common.h 2019-12-02 18:23:13 -05:00
zynqmp_gqspi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00