summaryrefslogtreecommitdiff
path: root/drivers/fpga/zynq-fpga.c
diff options
context:
space:
mode:
authorIvan Bornyakov <i.bornyakov@metrotek.ru>2022-12-30 12:29:21 +0300
committerXu Yilun <yilun.xu@intel.com>2023-01-28 23:20:30 +0800
commit88e705697e801299a13ecaf2ba54599964fe711c (patch)
treed531ba682ac458b2a7cf59335a2b00a5c71b72ee /drivers/fpga/zynq-fpga.c
parent1da53d23a41c5f77963984d8da5623ed56918ada (diff)
fpga: microchip-spi: rewrite status polling in a time measurable way
Original busy loop with retries count in mpf_poll_status() is not too reliable, as it takes different times on different systems. Replace it with read_poll_timeout() macro. While at it, fix polling stop condition to met function's original intention declared in the comment. The issue with original polling stop condition is that it stops if any of mask bits is set, while intention was to stop if all mask bits is set. This was not noticible because only MPF_STATUS_READY is passed as mask argument and it is BIT(1). Fixes: 5f8d4a900830 ("fpga: microchip-spi: add Microchip MPF FPGA manager") Signed-off-by: Ivan Bornyakov <i.bornyakov@metrotek.ru> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20221230092922.18822-3-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Diffstat (limited to 'drivers/fpga/zynq-fpga.c')
0 files changed, 0 insertions, 0 deletions