diff options
author | Tom Rini <trini@konsulko.com> | 2021-11-29 12:00:57 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-11-29 12:00:57 -0500 |
commit | 2402c93130c09b881f9cc1369459fb49d9fa0f74 (patch) | |
tree | b98fcb4632c62e8693d8ee1acfa3af55c52f634a /drivers/firmware | |
parent | c087b5ad974441d1408c028eb7087d86b6d127e9 (diff) | |
parent | ade37460a944aed36ae6ee634c4d4a9a22690461 (diff) | |
download | u-boot-2402c93130c09b881f9cc1369459fb49d9fa0f74.tar.gz |
Merge tag 'v2022.01-rc3' into next
Prepare v2022.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/firmware-zynqmp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c index d4dc856baf..b44fede307 100644 --- a/drivers/firmware/firmware-zynqmp.c +++ b/drivers/firmware/firmware-zynqmp.c @@ -29,6 +29,10 @@ static int ipi_req(const u32 *req, size_t req_len, u32 *res, size_t res_maxlen) { struct zynqmp_ipi_msg msg; int ret; + u32 buffer[PAYLOAD_ARG_CNT]; + + if (!res) + res = buffer; if (req_len > PMUFW_PAYLOAD_ARG_CNT || res_maxlen > PMUFW_PAYLOAD_ARG_CNT) @@ -164,6 +168,7 @@ int __maybe_unused xilinx_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2, * firmware API is limited by the SMC call size */ u32 regs[] = {api_id, arg0, arg1, arg2, arg3}; + int ret; if (api_id == PM_FPGA_LOAD) { /* Swap addr_hi/low because of incompatibility */ @@ -173,7 +178,10 @@ int __maybe_unused xilinx_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2, regs[2] = temp; } - ipi_req(regs, PAYLOAD_ARG_CNT, ret_payload, PAYLOAD_ARG_CNT); + ret = ipi_req(regs, PAYLOAD_ARG_CNT, ret_payload, + PAYLOAD_ARG_CNT); + if (ret) + return ret; #else return -EPERM; #endif |