diff options
author | Michal Simek <michal.simek@xilinx.com> | 2020-10-05 15:23:28 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2020-10-27 08:13:31 +0100 |
commit | 5690128f70a1a4038629be0465d0aa53e7b05f27 (patch) | |
tree | fc5a4ec089c1e1b47a9c72560bfbc37fdac5ed61 /drivers/firmware | |
parent | 5d5984c70e0e162ff09f055a15386ab21152aae1 (diff) | |
download | u-boot-5690128f70a1a4038629be0465d0aa53e7b05f27.zip u-boot-5690128f70a1a4038629be0465d0aa53e7b05f27.tar.gz u-boot-5690128f70a1a4038629be0465d0aa53e7b05f27.tar.bz2 |
firmware: zynqmp: Swap addr_hi/low when PM_FPGA_LOAD is called
Don't know reason but in regular flow addr_hi/low are swapped in ATF. It
means when fpga load is done from EL3 there is a need to swap it for PMUFW
to load bitstream.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/firmware-zynqmp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c index 7583f24a..d4dc856 100644 --- a/drivers/firmware/firmware-zynqmp.c +++ b/drivers/firmware/firmware-zynqmp.c @@ -165,6 +165,14 @@ int __maybe_unused xilinx_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2, */ u32 regs[] = {api_id, arg0, arg1, arg2, arg3}; + if (api_id == PM_FPGA_LOAD) { + /* Swap addr_hi/low because of incompatibility */ + u32 temp = regs[1]; + + regs[1] = regs[2]; + regs[2] = temp; + } + ipi_req(regs, PAYLOAD_ARG_CNT, ret_payload, PAYLOAD_ARG_CNT); #else return -EPERM; |