mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nava kishore Manne <nava.kishore.manne@amd.com>
To: <michal.simek@xilinx.com>, <tanmay.shah@xilinx.com>,
	<mathieu.poirier@linaro.org>, <ben.levinsky@amd.com>,
	<claudiu.beznea@microchip.com>, <nava.kishore.manne@amd.com>,
	<ronak.jain@xilinx.com>, <marex@denx.de>,
	<roman.gushchin@linux.dev>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH] firmware: xilinx: Update the zynqmp_pm_fpga_load() API
Date: Wed, 3 May 2023 10:31:58 +0530	[thread overview]
Message-ID: <20230503050158.1936467-1-nava.kishore.manne@amd.com> (raw)

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


             reply	other threads:[~2023-05-03  5:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03  5:01 Nava kishore Manne [this message]
2023-05-12 11:22 ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230503050158.1936467-1-nava.kishore.manne@amd.com \
    --to=nava.kishore.manne@amd.com \
    --cc=ben.levinsky@amd.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mathieu.poirier@linaro.org \
    --cc=michal.simek@xilinx.com \
    --cc=roman.gushchin@linux.dev \
    --cc=ronak.jain@xilinx.com \
    --cc=tanmay.shah@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®