fpga manager: xilinx-spi: check INIT_B pin during write_init
authorLuca Ceresoli <luca@lucaceresoli.net>
Mon, 22 Jun 2020 13:37:23 +0000 (15:37 +0200)
committerMoritz Fischer <mdf@kernel.org>
Fri, 26 Jun 2020 21:07:22 +0000 (14:07 -0700)
commitdd2784c01d93db20252a6416f3007cbbb89e4758
treee46c23b1dc348154f8d08993b676f64b72cba5d6
parenta5d0fbab4e0b42fb61b542b8c8c4c2ba50dc32d8
fpga manager: xilinx-spi: check INIT_B pin during write_init

The INIT_B pin reports the status during startup and after the end of the
programming process. However the current driver completely ignores it.

Check the pin status during startup to make sure programming is never
started too early and also to detect any hardware issues in the FPGA
connection.

This is optional for backward compatibility. If INIT_B is not passed by
device tree, just fallback to the old udelays.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
drivers/fpga/xilinx-spi.c