From: Ronak Jain <ronak.jain@xilinx.com>
To: <michal.simek@xilinx.com>, <linux-kernel@vger.kernel.org>
Cc: <gregkh@linuxfoundation.org>, <corbet@lwn.net>,
<linux-arm-kernel@lists.infradead.org>, <arnd@arndb.de>,
<lakshmi.sai.krishna.potthuri@xilinx.com>, <radheys@xilinx.com>,
Ronak Jain <ronak.jain@xilinx.com>
Subject: [PATCH 4/4] firmware: xilinx: enable feature check for ZynqMP
Date: Wed, 6 Apr 2022 03:55:26 -0700 [thread overview]
Message-ID: <1649242526-17493-5-git-send-email-ronak.jain@xilinx.com> (raw)
In-Reply-To: <1649242526-17493-1-git-send-email-ronak.jain@xilinx.com>
Enable the feature check if the PM_FEATURE_CHECK API returns success
with the supported version for the ZynqMP. Currently, it is enabled
for Versal only.
Move get_set_conduit_method() at the beginning as the Linux is
requesting to TF-A for the PM_FEATURE_CHECK API version for which the
interface should be enabled with TF-A.
Signed-off-by: Ronak Jain <ronak.jain@xilinx.com>
---
drivers/firmware/xilinx/zynqmp.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
index 6ee94f31ac98..7977a494a651 100644
--- a/drivers/firmware/xilinx/zynqmp.c
+++ b/drivers/firmware/xilinx/zynqmp.c
@@ -1662,6 +1662,10 @@ static int zynqmp_firmware_probe(struct platform_device *pdev)
struct zynqmp_devinfo *devinfo;
int ret;
+ ret = get_set_conduit_method(dev->of_node);
+ if (ret)
+ return ret;
+
np = of_find_compatible_node(NULL, NULL, "xlnx,zynqmp");
if (!np) {
np = of_find_compatible_node(NULL, NULL, "xlnx,versal");
@@ -1670,11 +1674,14 @@ static int zynqmp_firmware_probe(struct platform_device *pdev)
feature_check_enabled = true;
}
- of_node_put(np);
- ret = get_set_conduit_method(dev->of_node);
- if (ret)
- return ret;
+ if (!feature_check_enabled) {
+ ret = do_feature_check_call(PM_FEATURE_CHECK);
+ if (ret >= 0)
+ feature_check_enabled = true;
+ }
+
+ of_node_put(np);
devinfo = devm_kzalloc(dev, sizeof(*devinfo), GFP_KERNEL);
if (!devinfo)
--
2.7.4
next prev parent reply other threads:[~2022-04-06 14:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 10:55 [PATCH 0/4] Add feature check support in ZU+ Ronak Jain
2022-04-06 10:55 ` [PATCH 1/4] firmware: xilinx: add support for IOCTL and QUERY ID feature check Ronak Jain
2022-04-29 8:35 ` Michal Simek
2022-04-06 10:55 ` [PATCH 2/4] firmware: xilinx: add new function for do_feature_check_call Ronak Jain
2022-04-29 8:35 ` Michal Simek
2022-04-06 10:55 ` [PATCH 3/4] firmware: xilinx: always check API version for IOCTL/QUERY Ronak Jain
2022-04-29 8:35 ` Michal Simek
2022-04-06 10:55 ` Ronak Jain [this message]
2022-04-29 8:36 ` [PATCH 4/4] firmware: xilinx: enable feature check for ZynqMP Michal Simek
2022-04-22 6:10 ` [PATCH 0/4] Add feature check support in ZU+ Ronak Jain
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=1649242526-17493-5-git-send-email-ronak.jain@xilinx.com \
--to=ronak.jain@xilinx.com \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=lakshmi.sai.krishna.potthuri@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=radheys@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®