]> git.baikalelectronics.ru Git - uboot.git/commit
socfpga: arria10: Wait for fifo empty after writing bitstream
authorPaweł Anikiel <pan@semihalf.com>
Fri, 17 Jun 2022 10:47:25 +0000 (12:47 +0200)
committerTien Fong Chee <tien.fong.chee@intel.com>
Fri, 1 Jul 2022 06:57:14 +0000 (14:57 +0800)
commitc3ae6fab0ee69aa2507a4bca83ab2e6417337bdf
tree7e99ca4fa54643bb05acbdc634fb1e669b8d19df
parent48e958293ce8c43049a5d34bb81c5638a9ca4938
socfpga: arria10: Wait for fifo empty after writing bitstream

For some reason, on the Mercury+ AA1 module, calling
fpgamgr_wait_early_user_mode immediately after writing the peripheral
bitstream leaves the fpga in a broken state (ddr calibration hangs).
Adding a delay before the first sync word is written seems to fix this.
Inspecting the fpgamgr registers before and after the delay,
imgcfg_FifoEmpty is the only bit that changes. Waiting for this bit
(instead of a hardcoded delay) also fixes the issue.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/fpga/socfpga_arria10.c