mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] firmware: xilinx: Update the zynqmp_pm_fpga_load() API
@ 2023-05-03  5:01 Nava kishore Manne
  2023-05-12 11:22 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Nava kishore Manne @ 2023-05-03  5:01 UTC (permalink / raw)
  To: michal.simek, tanmay.shah, mathieu.poirier, ben.levinsky,
	claudiu.beznea, nava.kishore.manne, ronak.jain, marex,
	roman.gushchin, linux-arm-kernel, linux-kernel

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>
---
 drivers/firmware/xilinx/zynqmp.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
index ce86a1850305..398ab86e2bec 100644
--- a/drivers/firmware/xilinx/zynqmp.c
+++ b/drivers/firmware/xilinx/zynqmp.c
@@ -942,8 +942,16 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_reset_get_status);
  */
 int zynqmp_pm_fpga_load(const u64 address, const u32 size, const u32 flags)
 {
-	return zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address),
-				   upper_32_bits(address), size, flags, NULL);
+	u32 ret_payload[PAYLOAD_ARG_CNT];
+	int ret;
+
+	ret = zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address),
+				  upper_32_bits(address), size, flags,
+				  ret_payload);
+	if (ret_payload[0])
+		return -ret_payload[0];
+
+	return ret;
 }
 EXPORT_SYMBOL_GPL(zynqmp_pm_fpga_load);
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] firmware: xilinx: Update the zynqmp_pm_fpga_load() API
  2023-05-03  5:01 [PATCH] firmware: xilinx: Update the zynqmp_pm_fpga_load() API Nava kishore Manne
@ 2023-05-12 11:22 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2023-05-12 11:22 UTC (permalink / raw)
  To: Nava kishore Manne, michal.simek, tanmay.shah, mathieu.poirier,
	ben.levinsky, claudiu.beznea, ronak.jain, marex, roman.gushchin,
	linux-arm-kernel, linux-kernel



On 5/3/23 07:01, Nava kishore Manne wrote:
> 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>
> ---
>   drivers/firmware/xilinx/zynqmp.c | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index ce86a1850305..398ab86e2bec 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -942,8 +942,16 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_reset_get_status);
>    */
>   int zynqmp_pm_fpga_load(const u64 address, const u32 size, const u32 flags)
>   {
> -	return zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address),
> -				   upper_32_bits(address), size, flags, NULL);
> +	u32 ret_payload[PAYLOAD_ARG_CNT];
> +	int ret;
> +
> +	ret = zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address),
> +				  upper_32_bits(address), size, flags,
> +				  ret_payload);
> +	if (ret_payload[0])
> +		return -ret_payload[0];
> +
> +	return ret;
>   }
>   EXPORT_SYMBOL_GPL(zynqmp_pm_fpga_load);
>   

Applied.
M

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-12 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-03  5:01 [PATCH] firmware: xilinx: Update the zynqmp_pm_fpga_load() API Nava kishore Manne
2023-05-12 11:22 ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®