Skip to content

Commit e2ebc05

Browse files
Nava kishore Mannemichalsimek
authored andcommitted
firmware: xilinx: Update the zynqmp_pm_fpga_load() API
Update the zynqmp_pm_fpga_load() API to handle the firmware error’s properly. Signed-off-by: Nava kishore Manne <nava.kishore.manne@amd.com> Link: https://lore.kernel.org/r/20230503050158.1936467-1-nava.kishore.manne@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
1 parent c58da0b commit e2ebc05

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

drivers/firmware/xilinx/zynqmp.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,16 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_reset_get_status);
942942
*/
943943
int zynqmp_pm_fpga_load(const u64 address, const u32 size, const u32 flags)
944944
{
945-
return zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address),
946-
upper_32_bits(address), size, flags, NULL);
945+
u32 ret_payload[PAYLOAD_ARG_CNT];
946+
int ret;
947+
948+
ret = zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address),
949+
upper_32_bits(address), size, flags,
950+
ret_payload);
951+
if (ret_payload[0])
952+
return -ret_payload[0];
953+
954+
return ret;
947955
}
948956
EXPORT_SYMBOL_GPL(zynqmp_pm_fpga_load);
949957

0 commit comments

Comments
 (0)