From patchwork Tue Dec 19 05:50:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Buddhabhatti, Jay" X-Patchwork-Id: 180763 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1734896dyi; Mon, 18 Dec 2023 21:51:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEog6s0y7WFJIJ/6wrQdhSLWLflLdmOsY9gqZqa9k5LNPkP3HpPPl1sqraIi5WF8ljmOs1j X-Received: by 2002:a17:90b:1d02:b0:28b:3bb9:ddf6 with SMTP id on2-20020a17090b1d0200b0028b3bb9ddf6mr3106404pjb.88.1702965104601; Mon, 18 Dec 2023 21:51:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702965104; cv=pass; d=google.com; s=arc-20160816; b=uiPg6Exo7WpNn/ZSpa7F8YG1MNOmVfxBtS5xrBmEE5KDsl0JSlHhaM2ointUHteimU LcXk3DZNaHVrUX9DrocXY0efEan8IKkoIv13t0ZgTqEFXZvbG8gzpODIqiHNAJSGHheU Cu8Xb7UpRL0+T2HpSVy0uDzeibevav+7mJ9fGB/mmxuIu/dLodXp/RNw+yWY/E4xPsvG ezllkkZ9hF0fqmlaSnn1ARnD41JGUQSVb9v5SOLyjyQex7BSSvPDedxsi/ycS7B/YwJU OXih0FSY5JqA9lS24XDY+NzBA6MM8lkYXxHQ6r8UIMKlO1NkR+QoRYQCwNmI+Rcp5PVp BU0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XmqG0n32ktuAdZDprmZUiMMAlDSZyICjmp1qpej5fqw=; fh=EIRa5T5ig935kMTrBjMilyNn1EaRTjENIPYXRvLBmKY=; b=RH+grwA6LASM9zjJdPiBHUJA1/MwlE2QHTpOVoPkm6SkE28ba5CLreQqWMqlNgrsba p+nH9HNw9T6hizGtufl73YN4vAeQQ/noDLtoe3oqvESQZiLffAPNWvISZg1EX4D3rJMw NCgrvmKVRRY5k3goBOOb97dADyVSMVRaKkrnBytCGRGrznNcPBq5hMn1sbh1Z2S2iJFC cr2DmJUmRpN2Fp8uhZro72xaP32hjSRQ0cNc70hGftax4yi3DhWsmuZR+iX7PM6GXIxU PD3N8YQx7t2PsCx6AY4QU7LO0DE4Kh3qaDN2MQ7lfMfWOby6pX8EY3DXekk4yletOUsl wCkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=OLkwRozU; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-4719-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4719-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l14-20020a17090a660e00b00286861858e1si621380pjj.26.2023.12.18.21.51.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 21:51:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4719-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=OLkwRozU; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-4719-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4719-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5C5FA285CD1 for ; Tue, 19 Dec 2023 05:51:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC6B1D2E6; Tue, 19 Dec 2023 05:51:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="OLkwRozU" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2042.outbound.protection.outlook.com [40.107.96.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78D458F4D for ; Tue, 19 Dec 2023 05:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WmSfd4vUn7psRWHSCcLOXH9zqmL2dDYptLhod3XPnEq+oAaRzbTSneXAHdBQuakrEtyfhPBZTGh85bwSHzvZBfMnAJg+R1DlTDonwKmS29y0sMOjJRLJi3h8Rx2kBaD8YtXcV0qFApTNQ8v8hYE1ThTx36YW2x/fPXEH3yHu9aofStbGZs8M8Ey9IDyQ6ogxFHMIX2WYz49VnJ4X/zp2LuwmZO+qAlvSJHAQkCg9EIkFq66tmHfb87u/+LddHb2ARg4p5b3Yb8UpJLSqnAYfDKu3/wR8WhPkqkWjNpzLlDhdwytmYE7pIy4bWK80L8FyOJOKvKrpnqZYz2JjqHGUbQ== 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=XmqG0n32ktuAdZDprmZUiMMAlDSZyICjmp1qpej5fqw=; b=eRmZTKjAKZAo12t2N/jqn7Kq8ktuyXAPioLfoKd1UrzxcVpoECz0AuZFxvmXmKmi4bmuWX+KypLr9KkUADZrlmraRmaFCwSVaBnexMB9wo6u1LNmeVgEFGzxdLTGOfmY093lvB6f9OpyNdNjnqWXNAR7x7+LqKm+P4eIEmPf2J2xxjA90QQWbVzTU5iGhT6zD06BelgLawAXf2/DGIHopVbIGC25a+mvJ6v4Hez5XsB7/1OhdRW0IJMXm0a3f6iPDnXlX8pgn34V16l+yK0HKhaYpOYgYB6itZbMqWASJJDHuddoTEJVDUlrelNDQ57g4PBn+6Jrs9FarVm36S4IqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linuxfoundation.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XmqG0n32ktuAdZDprmZUiMMAlDSZyICjmp1qpej5fqw=; b=OLkwRozUR/8gY4ZxWGLgShxXYXWFgJYAPfF062qSSL9rkWF2jxo+VKJKchsHZPWXYvHnSV0d0eZZKWAbBoeKd9+I/5j/JSWAqjkBQqNHQD2vz02FvGPSR9YgEoeLvLWJ8TG7rqX1smo4L3iVXlWTez0SLx1wga2GTH2FhLyrRk0= Received: from DM6PR01CA0023.prod.exchangelabs.com (2603:10b6:5:296::28) by PH7PR12MB7140.namprd12.prod.outlook.com (2603:10b6:510:200::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 05:50:48 +0000 Received: from DS3PEPF000099D8.namprd04.prod.outlook.com (2603:10b6:5:296:cafe::2) by DM6PR01CA0023.outlook.office365.com (2603:10b6:5:296::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38 via Frontend Transport; Tue, 19 Dec 2023 05:50:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS3PEPF000099D8.mail.protection.outlook.com (10.167.17.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Tue, 19 Dec 2023 05:50:48 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 18 Dec 2023 23:50:48 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 18 Dec 2023 23:50:47 -0600 Received: from xsjarunbala50.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Mon, 18 Dec 2023 23:50:46 -0600 From: Jay Buddhabhatti To: , , , , , , , , , , CC: , , Jay Buddhabhatti Subject: [PATCH V2 1/2] firmware: xilinx: Export function to use in other module Date: Mon, 18 Dec 2023 21:50:24 -0800 Message-ID: <20231219055025.27570-2-jay.buddhabhatti@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231219055025.27570-1-jay.buddhabhatti@amd.com> References: <20231219055025.27570-1-jay.buddhabhatti@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099D8:EE_|PH7PR12MB7140:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c5090ba-00b1-445a-9e17-08dc00567385 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d7eTF5YU7gHQ4cDTLw4QHQrLs4Mp2KEq85BOnLmI+n5PDOmwCwzyEctVd6uOz51Hjb++GVk7tWiEQaO24IID/0Nq0y1ExZri8X1lEXfJsBCcEtUylRcBAuSDpGPwpQAmfiKaI+Waz6LINhTlE9ZrBJlnNsZqkv/qKDysOsAFnywz6yy0jldAY/FsWRGzCqIjD2fsjTJqs0Naw+om4tj6jTToKk8YSdGPT7QcknGzlCRrynSWp/NU0NUSm+cpoYmTwyn8WBK218FZPvKEPc3hwzYfdxRIVTcSWDleiLLupvezg16NvJlZ5Q0EoFMY+obN8LHK4tPQGKyJhShme58GG2NHXgzLGHCxFkitVoJ54tlulz1P+YbRFi+uJXncFwNS5SYgl/JkKFcms6duX8POCOABYc8oBncuFX3XuQgzFQiEzuUJlKPu3R16tUFiDHIT4/oUK+k7pPvmfflNsJbe6tHURejLaZWStBoCZi7Fg5ehTvnhyVjgEvb8jHr90zE4q9q742XIn8BKCvGfIJW8EQ7tVzHnK+Pl2z6uUW8wdWwNXtesSmNW6p/JzhbuQbfXK1dgz4KXzYnc2jr5xBrDNZ7RXERMHwdfWzFtaoy1n3qr8+ZsJ7MqUY0B7SO9eVuSOfsYodpqXoQ2opKbCbmubTjpnwhuipAQTK9gnuQNX371kZdwKunrheSetY2G6qbHP9W8xbpdGwY1oLCGjgEFtS2ehCGmcXwff9afUyRgWNk2Ald2vo1RPJsG3EJMUamZyo3Ht74pSD6y6gSNKs4FjqKQovwwkwl4FZp9s01J1v0= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(39860400002)(396003)(376002)(136003)(230922051799003)(82310400011)(64100799003)(186009)(451199024)(1800799012)(36840700001)(46966006)(40470700004)(40480700001)(86362001)(81166007)(356005)(36756003)(82740400003)(40460700003)(6666004)(478600001)(41300700001)(54906003)(6636002)(70206006)(70586007)(921008)(1076003)(336012)(26005)(2616005)(47076005)(83380400001)(426003)(2906002)(110136005)(44832011)(5660300002)(36860700001)(316002)(8936002)(8676002)(4326008)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 05:50:48.4310 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9c5090ba-00b1-445a-9e17-08dc00567385 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099D8.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7140 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785688337432597098 X-GMAIL-MSGID: 1785688337432597098 Export zynqmp_pm_get_family_info() to access and find family information in other module. Signed-off-by: Jay Buddhabhatti --- drivers/firmware/xilinx/zynqmp.c | 3 ++- include/linux/firmware/xlnx-zynqmp.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index b0d22d4455d9..313965f79dd7 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -414,7 +414,7 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_get_chipid); * * Return: Returns status, either success or error+reason */ -static int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily) +int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily) { u32 ret_payload[PAYLOAD_ARG_CNT]; u32 idcode; @@ -439,6 +439,7 @@ static int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily) return 0; } +EXPORT_SYMBOL_GPL(zynqmp_pm_get_family_info); /** * zynqmp_pm_get_trustzone_version() - Get secure trustzone firmware version diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index d1ea3898564c..2375ce9b38df 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -515,6 +515,7 @@ int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 arg0, u32 arg1, #if IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE) int zynqmp_pm_get_api_version(u32 *version); int zynqmp_pm_get_chipid(u32 *idcode, u32 *version); +int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily); int zynqmp_pm_query_data(struct zynqmp_pm_query_data qdata, u32 *out); int zynqmp_pm_clock_enable(u32 clock_id); int zynqmp_pm_clock_disable(u32 clock_id); @@ -596,6 +597,11 @@ static inline int zynqmp_pm_get_chipid(u32 *idcode, u32 *version) return -ENODEV; } +static inline int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily) +{ + return -ENODEV; +} + static inline int zynqmp_pm_query_data(struct zynqmp_pm_query_data qdata, u32 *out) {