From patchwork Thu May 16 11:24:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronak Jain X-Patchwork-Id: 13666012 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 E015EC25B78 for ; Thu, 16 May 2024 11:25:31 +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:CC :To:From:Reply-To: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=Dx2EoLfSoddCYv fCcgQ+nNqhei7cvNNz4Co3HmyWJD/BXleALUMFzbKGAUOvfDk/5uDr1+wozWVw5sXJyLb2bTjvwD0 WRhuCIIgVBR2sAkKyNrAvnlqZV0DOzL+nSS6LgZvKXI3RDCtoub7vurO9gvmRlhm81ISca8exIGj5 mhJC7couwwEpgvnX7skL1MfbYTXhzdFeIh1MgkBqXzZWzNiPL4Q44xmi7rDCVxK9Z67RpQUu5T2TH VECKprvRqDg7rUJL1BGMEJJEpDw0o4osGKImCbwrwZvLOmIejcxmJd985ECnSaov7MVW+Cb/UdCf2 4wDMTihXlHhtUZlmkzow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7ZEf-00000004blL-2HEE; Thu, 16 May 2024 11:25:21 +0000 Received: from mail-bn7nam10on20600.outbound.protection.outlook.com ([2a01:111:f403:2009::600] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7ZEY-00000004bhi-3tdv for linux-arm-kernel@lists.infradead.org; Thu, 16 May 2024 11:25:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OtDvouiraIU42ip1N2jLV2Dq2x21vdqh+vF6RitiZPg5K9qxBuhlXmWrVEBjLXl/jU5Gh/8AWVVFIrHTASX3maA8q5adrXqnUF+I5G+XDOse/UFUv5locdXalDoB5w4BA1hdtc6mvZxAjIMLpXgwDFi2RbIKAcE8C2GTOKWTtNkF8XoREmCqIEmLDBcTBRnOUD3GitGqcp6vNVr2hHNTTIdQWsYKvVHIOt3BDxI84n0ZdJtRGgPzETPMLoF/+9RaAgxwMp+pB4oYPWJfNopR6kL5SNGJklTap8tscdcuLHINoWYneLT72XOH1sOh+Ix1wjg59owQ0YdnfKU+/LonZw== 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=nbJ1Dt7Im5iLUQDIXEVbi/ikofoIllGfOOnmNP7laCU4mnBxks94smwIEAZvliN8AKOyGYbH9UokB5ntxDX58zxlF1zOCU9fzj+MhWcONKaKXMEHVIDSg4xv73sr8+vEebQ3fGTvUSR9Rwmannl2Hgi4oRBy4pDLi1M221XxYkhNVv87LZSseCZ9A7Tu5SUsCY4ROmVL1gEzKLFnVw3h7M5uwdXZinYnkC5kTvvn5o+Y35BDHOhsnBxpIYRK0tLSghBPu8yOOeNgreLgj97Y6NR2ezjUxXo6zYEHs7d3JrY+oOQP/dph40PjhbKyTvQFT+7QMpIyyTbqt5XQQ0Ou4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.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=n5swDIUcKSmOd46TS0Bwv0y94XVPSkqlRpoEwqinS8ge5zMEl/ORd61V8e8C07hx0z9haJGKiAaZNAW9h6K/7O6fk6LaDGd9Xf/yQsPq8Pafa4nLxVFio1kikX0yImUDk4ZZVW8DdDvtlL4bRlevVZXnRuJNGKeDeoLpC9KqNRA= Received: from BYAPR02CA0031.namprd02.prod.outlook.com (2603:10b6:a02:ee::44) by PH7PR12MB6978.namprd12.prod.outlook.com (2603:10b6:510:1b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Thu, 16 May 2024 11:24:57 +0000 Received: from SJ1PEPF00001CE0.namprd05.prod.outlook.com (2603:10b6:a02:ee:cafe::8d) by BYAPR02CA0031.outlook.office365.com (2603:10b6:a02:ee::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28 via Frontend Transport; Thu, 16 May 2024 11:24:57 +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 SJ1PEPF00001CE0.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7587.21 via Frontend Transport; Thu, 16 May 2024 11:24:57 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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, 16 May 2024 06:24:56 -0500 Received: from xsjpmteam52.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 16 May 2024 06:24:56 -0500 From: Ronak Jain To: CC: , Subject: [PATCH RESEND] firmware: xilinx: Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h Date: Thu, 16 May 2024 04:24:55 -0700 Message-ID: <20240516112455.314898-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: SJ1PEPF00001CE0:EE_|PH7PR12MB6978:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f958394-6ec0-4af2-2b60-08dc759ad11a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|82310400017|1800799015|376005|36860700004; X-Microsoft-Antispam-Message-Info: EMrAFHmGBG9JQAU65CVi9yHr2A7upi66YxfNEKVnwlboPn6mqTBfAcbG6ePVDCG4+Gu4k2aqH1XzwKR4CdupAa1zDssmd7l8q8/C201Zr1Qx0HhtBl2serZEwqLb9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Zzg8aaslsSA0Zl1BrXx3/+XyN64kgUGga+K3GG0PtA0BRfWoinoX6TTwbFEXiZLOSXDYYkhtOTavDiqvRhXpDHmAm/2FY4WMgaG+WCFdrd9AkMkZw/29l5921y7/UQ9XkshxEdysHaN6O+25iOoHPct7jH1xG+pvoegx59KnoUDQRROjx5zhjP/wOrRJKJIF5WqsUrbc 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)(82310400017)(1800799015)(376005)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2024 11:24:57.2084 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f958394-6ec0-4af2-2b60-08dc759ad11a 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: SJ1PEPF00001CE0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6978 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240516_042515_002449_2DB92AE7 X-CRM114-Status: GOOD ( 13.00 ) 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