Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 97276C433EF for ; Wed, 6 Apr 2022 10:59:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L2ojT3cp1ik4k+ivNiU7NV+S3dBpNB4tTunwY5Jz6HE=; b=BGQ0kT7k9El3ex gVqN9TcVrPS7cljoUEXlQ3/21ILbWHmcjReUpNFK+4+Q17cwR3w6huqV91Pg2piANKOuRen9Bpzsw 1v/OXZbHs8A4mqphx4Ge4Wa0I3T5XAT+PRf8tK0KEU2i908mJYnbFgRo0cT69SYYcAytfqeaJVaBt eDYqqOKQOMZo6H2f56yEtf9jhf4AC251/O5fypFlVw3XGewUS1/unGS0NFNMCKbjJ0FdPHSWcsOcF WZ7gDo6bU7GMtOL2Pgs4dDcDzDGpBM5j2e7ykixF7eRJwRI3+FnY0VBAfmEGhtTtVlIjEA6BudiWC j2C71kEobKG4wT3w/WSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nc3MF-005bMr-G2; Wed, 06 Apr 2022 10:57:53 +0000 Received: from mail-dm6nam12on20629.outbound.protection.outlook.com ([2a01:111:f400:fe59::629] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nc3KW-005abM-MW for linux-arm-kernel@lists.infradead.org; Wed, 06 Apr 2022 10:56:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vz10Dy+89MLxg18JfYmzCtx6Kz1MXMYGcBdcILuzAkfk6rwS8ZJOssbnDSHzMdSLhkhcnyRr+SP2zYaczKUq4/4dpFYxcXIKiBB5WoH8yX5Z9hnO8SPSbxtZpSgln2Rf+EI+M/RGDr/g7YCGrz95+o1PBphrb60mXKZ6blQT12OLH6agfmULyUgH86dnpm23/vugkdQLj246Bub7vZoVLSCgsaO0oK+hOXGpv4nV/nIMqr6ol+xnRwGHwuhoiQNMppK99TJnge30R8le20GhgkdFRC6ZvjM+3NxrXCFNdV9oGwt6g3E+4PFiHlUlEXDCvLj3nRbvl+++lR3RNxIyyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rFVW/PsGy90COQ1+V+xVBCjd5AF8+iTJMoukAU8I5EE=; b=fEpzJzS2QwmlVGV6Aijao0R582D8ww65ermCUxQ2xYnElY1q9JUNcPuQymW6mkfu1IkcspH54cCIXPfKZgIlcAi6CpM53TYF6nmMgZug05tqBFuGJc8yRSnQ1JyoVYgG+euannjxmVWHB64NWf7FX1qr8H4mCn7FcJ0W6SS9v7zPz0RWXuMANIzYLBvtrDsUucQvwqnT7vtigDWh4kQhj2DL2oZvn8WyumiArmBOldxtQbXaqCIF6wAbJ/72tk3b9yLx51RxoOGqCOwoPgAqM5Av6a6A9AHsY8a49kP4WkRhcs+8cwNtrEg1efSbinPMBgK84CHP5CG9EOTeyUXR0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rFVW/PsGy90COQ1+V+xVBCjd5AF8+iTJMoukAU8I5EE=; b=hEHPrUi8TLUEzSNiDX4zgjvP/lFnq8sGgiNpBX51XJZCl+IKAlgSkFR+seN04SWVDbih/FuptvqajFmqTrmJ9biArUQRA1nBXvO9nb3sNxYfiB3goyp1e8yx4k0DvAVJJXAuSSUnGi7UHaQ7J+79cY3RDPmhgHpQ8VGdUA1ayDs= Received: from SA9PR03CA0027.namprd03.prod.outlook.com (2603:10b6:806:20::32) by SN4PR0201MB3566.namprd02.prod.outlook.com (2603:10b6:803:51::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31; Wed, 6 Apr 2022 10:55:59 +0000 Received: from SN1NAM02FT0036.eop-nam02.prod.protection.outlook.com (2603:10b6:806:20:cafe::bc) by SA9PR03CA0027.outlook.office365.com (2603:10b6:806:20::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31 via Frontend Transport; Wed, 6 Apr 2022 10:55:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0036.mail.protection.outlook.com (10.97.4.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5144.21 via Frontend Transport; Wed, 6 Apr 2022 10:55:59 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Wed, 6 Apr 2022 03:55:33 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Wed, 6 Apr 2022 03:55:33 -0700 Received: from [172.19.2.243] (port=36060 helo=xsjwillw50.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nc3K1-0007fI-Ic; Wed, 06 Apr 2022 03:55:33 -0700 From: Ronak Jain To: , CC: , , , , , , Ronak Jain Subject: [PATCH 4/4] firmware: xilinx: enable feature check for ZynqMP Date: Wed, 6 Apr 2022 03:55:26 -0700 Message-ID: <1649242526-17493-5-git-send-email-ronak.jain@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1649242526-17493-1-git-send-email-ronak.jain@xilinx.com> References: <1649242526-17493-1-git-send-email-ronak.jain@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0165b6cd-4197-4a5f-bd4c-08da17bc08cc X-MS-TrafficTypeDiagnostic: SN4PR0201MB3566:EE_ X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5pff+5lqmCjoYU+vqoEtY0AY0/L+99X2iNLnyfhHnq/ZIhRW8abK51ZnN+pzjo0Nv53Ihvc2AeTXeiwIeSr0fdXnBv68o4hQT1VkixyqplGc4WD0tmtCL0TuZRXKcq9/EzDcy52vXvbgjU7DvZu+xlNd03134lJVYCN9c+wNYThsRLoiW5B0pkkq/VKZfm4woCqAfVWGreNEsZlpjlP925sHuKl4C5tatD85mJyBZ8AZGySHb5WOOCHgI0HZTFgYra6wvy9qlRUiFZQgMayWFrDlbnfWLw3rJiu8odllWt8X5PZCFa5PBxvWqaLaB5TuVRc7vuyl8IQKa6NHgxqw/4HDZhExMJX8NEmCBgV5x3qh+GwSO/ah/OstN5ce0nVIcibC8aK0NDWL/O8F73TNhlsdjBz9RC+SOnq0xaYhSrR7ovZESaBR5HR3CckzyN+/b6XUfgI/gtQy5KMuk42u4SmwEYTl1mXM4QW+ZrjK6z1ngHCohXGeMUL54qdkmtgWFQlAKheHORKWFjGZJR4UBBbSB9CC94Vj90u6AGWvlAB6x+lwInGh3pUbP+O/+dVEpoNxo/1qXZA0vh0RJiJ6VFnvf3HAr6ZchVhlppTYolFEmbNWcas/Y/f2ewe1+saXsRfh3QIzqGYHi/Yb8r+HqP0mw/ysXKxYNgV57gqwMd1VBdbvwif2rXI+26KQjSXIbcFGfzJJp+up2MYfIkqUJg== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(186003)(54906003)(47076005)(316002)(36756003)(7696005)(40460700003)(2616005)(508600001)(110136005)(336012)(26005)(107886003)(4326008)(2906002)(8936002)(356005)(70206006)(82310400005)(8676002)(70586007)(44832011)(36860700001)(9786002)(6666004)(426003)(5660300002)(7636003)(83380400001)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2022 10:55:59.4491 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0165b6cd-4197-4a5f-bd4c-08da17bc08cc X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0036.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0201MB3566 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220406_035604_784127_55DD32E1 X-CRM114-Status: GOOD ( 12.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel