linux_dsm_epyc7002/drivers/fpga
Luca Ceresoli 16b7856d94 fpga manager: xilinx-spi: fix write_complete timeout handling
If this routine sleeps because it was scheduled out, it might miss DONE
going asserted and consider it a timeout. This would potentially make the
code return an error even when programming succeeded. Rewrite the loop to
always check DONE after checking if timeout expired so this cannot happen
anymore.

While there, also add error checking for gpiod_get_value(). Also avoid
checking the DONE GPIO in two places, which would make the error-checking
code duplicated and more annoying.

The new loop it written to still guarantee that we apply 8 extra CCLK
cycles after DONE has gone asserted, which is required by the hardware.

Reported-by: Tom Rix <trix@redhat.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
2020-08-30 17:06:50 -07:00
..
altera-cvp.c
altera-fpga2sdram.c
altera-freeze-bridge.c
altera-hps2fpga.c
altera-pr-ip-core-plat.c
altera-pr-ip-core.c
altera-ps-spi.c
dfl-afu-dma-region.c
dfl-afu-error.c fpga: dfl: afu: add interrupt support for port error reporting 2020-07-06 21:34:46 -07:00
dfl-afu-main.c Linux 5.8-rc7 2020-07-27 11:49:37 +02:00
dfl-afu-region.c
dfl-afu.h
dfl-fme-br.c
dfl-fme-error.c fpga: dfl: fme: add interrupt support for global error reporting 2020-07-06 21:35:42 -07:00
dfl-fme-main.c fpga: dfl: fme: add interrupt support for global error reporting 2020-07-06 21:35:42 -07:00
dfl-fme-mgr.c
dfl-fme-perf.c fpga: dfl: change data type of feature id to u16 2020-08-19 21:05:47 -07:00
dfl-fme-pr.c
dfl-fme-pr.h
dfl-fme-region.c
dfl-fme.h
dfl-pci.c Linux 5.8-rc7 2020-07-27 11:49:37 +02:00
dfl.c fpga: dfl: change data type of feature id to u16 2020-08-19 21:05:47 -07:00
dfl.h fpga: dfl: change data type of feature id to u16 2020-08-19 21:05:47 -07:00
fpga-bridge.c
fpga-mgr.c
fpga-region.c
ice40-spi.c
Kconfig
machxo2-spi.c
Makefile
of-fpga-region.c
socfpga-a10.c
socfpga.c
stratix10-soc.c fpga: stratix10-soc: make FPGA task un-interruptible 2020-08-19 21:05:46 -07:00
ts73xx-fpga.c
xilinx-pr-decoupler.c
xilinx-spi.c fpga manager: xilinx-spi: fix write_complete timeout handling 2020-08-30 17:06:50 -07:00
zynq-fpga.c
zynqmp-fpga.c