spi: Send dummy clocks at boot
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 8 Jul 2020 06:13:27 +0000 (16:13 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 8 Jul 2020 06:41:52 +0000 (16:41 +1000)
commit3c2739e10af00199de3c206a18dbae07489c41c9
treefe7a32ac8b8879ccc0ec1e699560b1aca742095a
parentbf36ea365b9998f5cf8e1cb082fc1d8c78cb6721
spi: Send dummy clocks at boot

When using an FPGA which routes the SPI clock via STARTUPE2 as is
done on the Nexys Video (or optionally on Arty), the HW needs at
least 3 beats of that clock to complete the switch from the internal
config clock to the one we provide.

This works around it by having the SPI controller send 8 dummy
clocks at boot time with CS held high.

Without this, flash identification will fail those boards

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
spi_flash_ctrl.vhdl