[PATCH] firmware: zynqmp-fpga: do not load PL with ONLY_BIN flag unless necessary

Matthias Fend matthias.fend at emfend.at
Sun May 1 11:26:07 PDT 2022


Since pmu-fw release 2018.3, the ZYNQMP_FPGA_BIT_ONLY_BIN flag is no
longer used. This wasn't a problem for a while, but in newer versions a
validation sequence will fail if this flag is set. This means that the PL
can no longer be loaded.

Do not set the ZYNQMP_FPGA_BIT_ONLY_BIN flag unless absolutely necessary
to avoid this problem.

Signed-off-by: Matthias Fend <matthias.fend at emfend.at>
---
 drivers/firmware/zynqmp-fpga.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/zynqmp-fpga.c b/drivers/firmware/zynqmp-fpga.c
index 63d7398fd..db34ac2be 100644
--- a/drivers/firmware/zynqmp-fpga.c
+++ b/drivers/firmware/zynqmp-fpga.c
@@ -261,9 +261,10 @@ static int fpgamgr_program_finish(struct firmware_handler *fh)
 		goto err_free_dma;
 	}
 
-	if (mgr->features & ZYNQMP_PM_FEATURE_SIZE_NOT_NEEDED)
+	if (mgr->features & ZYNQMP_PM_FEATURE_SIZE_NOT_NEEDED) {
+		flags &= ~ZYNQMP_FPGA_BIT_ONLY_BIN;
 		buf_size = body_length;
-	else
+	} else
 		buf_size = addr + body_length;
 
 	status = mgr->eemi_ops->fpga_load((u64)addr, buf_size, flags);
-- 
2.25.1




More information about the barebox mailing list