From patchwork Thu Apr 25 09:59:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronak Jain X-Patchwork-Id: 13643043 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 CE4E6C4345F for ; Thu, 25 Apr 2024 09:59:46 +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:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Hlhz1DCWNcWDTDVBDCuKUz4Dgj4ayc64h7xY/fiXjKI=; b=SO0UGzUXjcKTUJ tE7EQNglbjk+L4g4F8CB6dtcIE8mkiwp3B2ZISF1EYx5dOaPUeSN8KRRYPdd6JDSMzEG6VUk7Hj5v aXHsHTbpZK/q9yMlRB5U+ILt4YSPiW/D16D4AM8ZWerxPNT7hyy7ZIK3Fl+pYDH0WqjuGF3VoZCIH AurSFUbI5ltKUXS+0H/qACcG28rBaKRLK21BBl9poRcHQbJjDQMufmahVtftj/Ah4T/4fbE/reYOn obxXnhZS1osnnMde0hxUHSyxMIC9U/v6enXrO7AeZ7vx6MRrc+uNhdwTpNIu09hfUO09EzsOI9j13 0Wxk4Rt6edg0Uv2Gg/WQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzvt6-00000007jHC-1dxK; Thu, 25 Apr 2024 09:59:32 +0000 Received: from mail-mw2nam10on20601.outbound.protection.outlook.com ([2a01:111:f403:2412::601] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzvt3-00000007jF0-2Ez8 for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2024 09:59:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DUVtRHqRMwPuFO7JDJBltTfU2nRbzSinqGSUL+agUkYf4BALcAz0E7z0KcSptCb+ZPctCABukaesQIW7LElb9NeCaAn/OB52ZJvCWh/5rQTnsZcsznvpE7cMr9an/csQA8MAKah3MmTci7YMEoZqd5SeBt5KVkQMhf7QvnOUVBFQrwGNV8+AAYnQJopUkQFINitXxxQArLNGbH/xhTgPScHSC9W4ylmHI7bv6mGpwJH5WT6ficPP4AHDY9Ni93JA6n59orEHsHvT09lepNuJQ2IJ8EZCKGprEO78QxpQMSeiHSin643wDBvlEE/0pT0FeHCcuP+Up9xd0LFCwT4ESA== 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=sWhYMdm8lOQiPflkUhg0HOmWZiWhzRPD21nupTrWFfc=; b=BCqmNDZCJbyHh+uK0KWTK4V1wDdp6MVQHG8VAeAeNoJDhrs3/duZl+jufdJoFi/PFXOWJu7gfqxBxoW/ZHdSBffGgjtvMa/pMHJXD/peZ7s11kA2OUoyBkUeOdJug9rKhfRXe7DPco+MyyWSyfBQF1mTkOnyM62s0mDVagcIvvChpYRWcMw58Hz1GqIIGrsHjIxFlzZuWdgR+tKGh0g6Myi+/+WWsBrENiYEoO6ajt7DLZj+9FVzUO7MitNlhu+bA9PLcqMIjyvwotlZ5WjFDXHhy6B21p7x2Si/YBbBMXhNkXSOPUg8nQa0ivovT7Tp0Cv+7FEYfJLMZak8gVbflw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.infradead.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=sWhYMdm8lOQiPflkUhg0HOmWZiWhzRPD21nupTrWFfc=; b=dX2Dfu5mUhctyelFxi3mFyfG1p5DgjFU91qmGcmVsuSJrpFViVDvWgKzSBejRB8fHCrKbJ2w9P/bghk+uj40N/4Pd1DW6hbyTNCadl4BiA66HRn0uA1KM9L2lDXB6dFYEAW6VcGI4tBrsLf/Di8hQCVWUs+S6AyNKZJEZIHLh7Q= Received: from PH7P220CA0099.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:32d::23) by SA1PR12MB5637.namprd12.prod.outlook.com (2603:10b6:806:228::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22; Thu, 25 Apr 2024 09:59:20 +0000 Received: from SN1PEPF0002529D.namprd05.prod.outlook.com (2603:10b6:510:32d:cafe::4) by PH7P220CA0099.outlook.office365.com (2603:10b6:510:32d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.25 via Frontend Transport; Thu, 25 Apr 2024 09:59:19 +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 SN1PEPF0002529D.mail.protection.outlook.com (10.167.242.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Thu, 25 Apr 2024 09:59:19 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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.35; Thu, 25 Apr 2024 04:59:18 -0500 Received: from xsjpmteam52.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 25 Apr 2024 04:59:18 -0500 From: Ronak Jain To: , , Subject: [PATCH] firmware: xilinx: Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h Date: Thu, 25 Apr 2024 02:59:13 -0700 Message-ID: <20240425095913.919390-1-ronak.jain@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: ronak.jain@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002529D:EE_|SA1PR12MB5637:EE_ X-MS-Office365-Filtering-Correlation-Id: aa5bd509-c9d4-4b80-9ef2-08dc650e5ffd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|82310400014|1800799015|36860700004|376005; X-Microsoft-Antispam-Message-Info: eJdImQfaM0TRkba0wdDpaT3Xrbur6TMqUe/S80hopWbvleflZ9RXRjRK3ym3lDwzP+APznRBkY8MwqqVLch2q4Wz+IoqWSmCImr2nXIhB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SAZ+HgtQWLunXFK0sFa7XaX4EWFcbbze2TIV7vOff7d6aUMdXcdz56LWTB1MB5hmJkw2kcRuj+2n7p043bmBi/KujnzKm+uwC1aYnMi1YBwiAMAjtqbIxpvlO3FAnd0qhPvvBDtJSzIRMDH+bm05g1hVLz6hkky47WrgSpwqPVJWKN14wuAdNLz8udehkkn5PzFdwmavedgnuIrMlKo5w9gWic9b4zKuAVYu3tNVtdA 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)(82310400014)(1800799015)(36860700004)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2024 09:59:19.3547 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aa5bd509-c9d4-4b80-9ef2-08dc650e5ffd 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: SN1PEPF0002529D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB5637 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240425_025929_765767_F184E74E X-CRM114-Status: GOOD ( 12.70 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Move FIRMWARE_VERSION_MASK macro to xlnx-zynqmp.h so that other drivers can use it for verifying the supported firmware version. Signed-off-by: Ronak Jain Signed-off-by: Anand Ashok Dumbre Signed-off-by: Radhey Shyam Pandey --- drivers/firmware/xilinx/zynqmp.c | 3 --- drivers/soc/xilinx/xlnx_event_manager.c | 1 - include/linux/firmware/xlnx-zynqmp.h | 3 +++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index 9bc45357e1a8..add8acf66a9c 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -41,9 +41,6 @@ /* IOCTL/QUERY feature payload size */ #define FEATURE_PAYLOAD_SIZE 2 -/* Firmware feature check version mask */ -#define FIRMWARE_VERSION_MASK GENMASK(15, 0) - static bool feature_check_enabled; static DEFINE_HASHTABLE(pm_api_features_map, PM_API_FEATURE_CHECK_MAX_ORDER); static u32 ioctl_features[FEATURE_PAYLOAD_SIZE]; diff --git a/drivers/soc/xilinx/xlnx_event_manager.c b/drivers/soc/xilinx/xlnx_event_manager.c index 253299e4214d..9d89b5a40f97 100644 --- a/drivers/soc/xilinx/xlnx_event_manager.c +++ b/drivers/soc/xilinx/xlnx_event_manager.c @@ -35,7 +35,6 @@ static int event_manager_availability = -EACCES; #define MAX_BITS (32U) /* Number of bits available for error mask */ -#define FIRMWARE_VERSION_MASK (0xFFFFU) #define REGISTER_NOTIFIER_FIRMWARE_VERSION (2U) static DEFINE_HASHTABLE(reg_driver_map, REGISTERED_DRIVER_MAX_ORDER); diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 1a069a56c961..d7d07afc0532 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -52,6 +52,9 @@ #define API_ID_MASK GENMASK(7, 0) #define MODULE_ID_MASK GENMASK(11, 8) +/* Firmware feature check version mask */ +#define FIRMWARE_VERSION_MASK 0xFFFFU + /* ATF only commands */ #define TF_A_PM_REGISTER_SGI 0xa04 #define PM_GET_TRUSTZONE_VERSION 0xa03