From patchwork Mon Dec 18 09:40:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Buddhabhatti, Jay" X-Patchwork-Id: 180233 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1130797dyi; Mon, 18 Dec 2023 01:51:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2FP34YKWKdkITza0Mu8maBio7DJsOhbuWdIoYRK1oazsThrddBSU5jFOn/PYNOcEpkOYg X-Received: by 2002:a05:651c:610:b0:2cc:695a:ab4f with SMTP id k16-20020a05651c061000b002cc695aab4fmr611153lje.104.1702893093935; Mon, 18 Dec 2023 01:51:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702893093; cv=pass; d=google.com; s=arc-20160816; b=NgvTG0Oqjps4IbKaUh5Z7cpkXjxDw57CK9L5UeLrs2IMfYHPkKoWGCcSIPBUA/LVe5 4e0hmV24hcTzzkWFbAMr6b16eUgaLIpUKeA59b8CmPHkTvUBihHBKkm6g/zy9ucVgPa7 9vT12WX7nOo9sPzchKUh4noazGc/IcLTy7VXF3Vbm+IDOk1riIwUzT0ZsWsJDOWp+wj/ wwmVd6wCmZn/sDb+pVY/VX5ipF2ET1TW/6e/KikHjEvWQKz0Entlpp0c8QXNPLTHVirx KDNIw6o7QlZETwyDLd34nJ5sPsDlKOTdSAGo7NIAwQcdIEdlfJqFR6mJAO52CddnlD82 3sHw== 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=rsbW/AsTtaf8wrlKDMBtnUPyobohRINlwq7twwWo413e/HHSSVwmwEEyG2Qvx80/Jj hUF0VKpWhY8Wb4VRqdQeuwK7/y5IAX+FddQ2q9Ux2W5Atg4S2aml1ObC59sVc9zdTkcv bjMs/+ProLhH8MB6DkCBenLcsgx2PYENsBEJHvOtu4HERDbhS7elUI7hd4ev+k65Nk66 jPzNGqi18LIVhh4F30Cy3X9gHh5YbKerKHROw28IEZOcpCl8paH9PGKVicRQrV0BkZed j5Q9BvbdtlsUbliwLN83bKvqWtqCujG+BahneROE/X7DOSPOPJpWw4Rrq277niCIAyi2 bMfA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=AD9Fjw2l; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-3260-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3260-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n2-20020a509342000000b005519a444a65si5684039eda.215.2023.12.18.01.51.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 01:51:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3260-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=AD9Fjw2l; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-3260-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3260-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7D9BF1F237FD for ; Mon, 18 Dec 2023 09:42:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AB02134C5; Mon, 18 Dec 2023 09:41:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="AD9Fjw2l" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2058.outbound.protection.outlook.com [40.107.92.58]) (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 731BF12B9C for ; Mon, 18 Dec 2023 09:41:44 +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=BLIgHpRlx/wz6ToUuCpKSwJsPHBxdhzcl/0A2dtE8HWvmmJIgoQ76stMLjGcDcYGhEcbltD9u8IfLd5RMdaUDkS09wxlaE9y435h5m63vgDDmo5jMMbJzzn2kmzpMikS/64fl49iASfzV0pJrHdn4Mb78HNvUor35AvxbxbSsKX5WReJg6Qb0IBgmlkZqd2EDAD7lo79+L76mf6sRNKHZwMn40+FcSHt7kvJUnv4sldNIRHbr/WudIG1A+anTmmLmTSIcWYy5mwo/0+l60e9Vs4v+a1gR0f3Jz928SaDNM0yxnaElG0o2fTwDoc1FzxRrxifPWNUhlSl+lARBfZewA== 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=m3tPWq0JwdtScV8innP/B2mavVOjHJuYAsyxAfO9jSnzVmArB+MfgEw92SSytOu3lh7LBbMTYHr4MFjwGS7owVCX/+jE5w65opBPsUqTcvAUKg/Qc/aN1S+rTBozkIBLKzbPnD5+ES+rO88ksEvN3w7Qold8+pn3HQ1XRFqHZ9nBX1TJGu0XjZbBzUqcQfvI0bOH3n3l2C2SBm3mANZLFgVZsvyWkD2nlVJi3Cb03g1P6y788KxX/IMKYVBZ8kxEWdrUfsW35/hHUpaZNMP5EeAebpG5HSmMQKnaRBJ1f3ASbc0fUpoGni4YB6PosS+seUy3B9PgWTprgpas9IxqdQ== 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=AD9Fjw2lRyoS2K5kOXBjz4dD/gjwz7wHAnTMbn9pdS6xYS3kpMRjUFPc8DHYRacvTbEhl9oR+Lcszm0oTTjQ+JZJbnjhqhhmY1/wVjEgDH2LI8E90fH1dw/Md6cRwl+JRTLcuNAfjvp3PPC7wT0yQ/p1/xxR+QMzQtUipCi7AMs= Received: from DM6PR03CA0056.namprd03.prod.outlook.com (2603:10b6:5:100::33) by MN0PR12MB5810.namprd12.prod.outlook.com (2603:10b6:208:376::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Mon, 18 Dec 2023 09:41:40 +0000 Received: from DS3PEPF000099DE.namprd04.prod.outlook.com (2603:10b6:5:100:cafe::24) by DM6PR03CA0056.outlook.office365.com (2603:10b6:5:100::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37 via Frontend Transport; Mon, 18 Dec 2023 09:41:40 +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 DS3PEPF000099DE.mail.protection.outlook.com (10.167.17.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Mon, 18 Dec 2023 09:41:39 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) 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 03:41:34 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) 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 03:41:07 -0600 Received: from xsjarunbala50.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Mon, 18 Dec 2023 03:41:06 -0600 From: Jay Buddhabhatti To: , , , , , , , , , , CC: , , Jay Buddhabhatti Subject: [PATCH 1/2] firmware: xilinx: Export function to use in other module Date: Mon, 18 Dec 2023 01:40:08 -0800 Message-ID: <20231218094009.13528-2-jay.buddhabhatti@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231218094009.13528-1-jay.buddhabhatti@amd.com> References: <20231218094009.13528-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: DS3PEPF000099DE:EE_|MN0PR12MB5810:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f2424c4-4e67-4406-f79a-08dbffad8941 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1qo1U9FlaCEGB8DtMMWqpREA18mJiUPsGuFya6XKeRmHAzAHcAOlEiPberAJT4eEdqJ6MSKzHfc6o2SlRVi0bfsOWYjqjdgNSaGY9yVH59QRELChoMjjMGsxkY8BnkuJqpEovOM/kdNfTDuih5UxBwQEXvOG9tCNtZeTeWnFmXw06FYSLkfN2wAnz4U9wiLQf4J4wBVAaoEvMsidgqdZbOIMt8n0+id4lK5td88C5BZB0kxi8LaGeaxrd5jAsTtdyfvVcn2e2Rnls1mQk38KVFPgNk5UeR8jIlrz5wmpdDdCxzOO9fvcBag3CpraxQiIJds0UlxU2ExV7l2QqADgVywmiG4IviDZxnHsFYKWxNueLpAYs2mHjrOvPTeIk4Q1AtVJ0hB2cOV3nl4nxYk4JnKRG0NJ2VeTuGNt99smi8I3UE6nPasYE386fS5VA6ysLc5MLx8j2KOAkqusznIAuitOTtg4nnnYfzUcoHCO67QNRhQmqEx88vddtrLHB6ZacgXjJAklRrFslmNzpkrvemQaVXj2EZ0GLhJm9n+yuqrJxGARgNXa0vQY2BvyLHheuhN4LfUqZk17lq+ruq5BU3OIf5osK93q+Ll69Bfp3P4vZjkb2A+Mmf73oo0TU69gqFA2AfTZcZ6UIjLKP46z8QDK4Q90HZwVOKjgWP5zCiU9SdRwjCDYJjWyDeJRbZqY0l815+eLSSa0Spw5Al83YX6KgEV1A87WaPKR93AN1j2eXJXrQtv1vTKreaA+lfjRLet1N1WbQTqYsYxEgc8jYuKj0c1ddVJoKINu/5z1b/w= 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)(136003)(376002)(346002)(39860400002)(396003)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(82310400011)(46966006)(40470700004)(36840700001)(40460700003)(1076003)(26005)(336012)(2616005)(426003)(36860700001)(83380400001)(47076005)(5660300002)(44832011)(2906002)(41300700001)(478600001)(316002)(54906003)(8676002)(8936002)(4326008)(70206006)(70586007)(110136005)(6636002)(356005)(82740400003)(81166007)(36756003)(86362001)(921008)(40480700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2023 09:41:39.9502 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f2424c4-4e67-4406-f79a-08dbffad8941 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: DS3PEPF000099DE.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5810 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785612829219508907 X-GMAIL-MSGID: 1785612829219508907 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) { From patchwork Mon Dec 18 09:40:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Buddhabhatti, Jay" X-Patchwork-Id: 180225 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1127669dyi; Mon, 18 Dec 2023 01:42:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQxRk0Dq/tsqhi/14w4/3+GzP5wh097glltw7F3HPGqE/aCa3RGCJZXNHIEqK+dIMswB7O X-Received: by 2002:a17:902:b216:b0:1d0:a2b2:6b0d with SMTP id t22-20020a170902b21600b001d0a2b26b0dmr7532286plr.4.1702892550192; Mon, 18 Dec 2023 01:42:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702892550; cv=pass; d=google.com; s=arc-20160816; b=GhpS/MdQNIH3ubIH+U2yN/4FLHYZeHAhiKkK2cNbHHz68vOK5NDArU0A3rYwFPyoM2 MtlkZsklzdp7YN9UpC8xpXFcdXPQ6w5MrOBRPck+L5tCfdHp2lfxzE0v8MF8IBBkg/F5 L6CdEtWedr00AhZ7syZB6JOC5ju7GSdLC+OGeBuY9AL4tw/XM2yK7CHPq1xAV47U9ZBc R2E/BRe5RKWuwgdjFucED2X7Fu7Ah0EYaeNxAL7oxrwAIoFPLRpglb+OALmsrplcYHva pSURGH9OIAWtMhL7el5fEWxLzspgzwXElwfNzQPvyMswutS61DHPgNYbSHglW5axC1+2 L5Kg== 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=uTdFTDH34zqFL+os6DSLDnQ6k9aq/OmzQzh+OzCCuSQ=; fh=EIRa5T5ig935kMTrBjMilyNn1EaRTjENIPYXRvLBmKY=; b=ivWWLYZkCX99dICqr+zU9qoMMq6DdDiifaob8c9H3OcQIwztSJN+o90DWUFXILu/PR hP3zpE3BvydnWXIDt36qVfqK5yRzReGRseIIKoUzXnAEN79FTvY+u3+Ei2GWt92Jozt+ Mq5pBPr2Kw0TABHm8+1G6JPkPpBzu1SetUEUcyU8FHZnLgsuyvaOOdusqmMru9AGP0OF RCH9f5kLhRZy/GsguKyCPab9g620yAPm9f9lWCAp4nrhkU7pHPJBeDHBHPifUBs80uDB JBdmEukUsL1+Sd9De0NVIfls8SWTbmDwH8lObFIf/1WGGLmuosG9XL0WeGR7vfKxKR5g ojSg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Oe3RVOw7; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-3259-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3259-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o6-20020a170902d4c600b001d376614fa0si2177087plg.607.2023.12.18.01.42.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 01:42:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3259-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Oe3RVOw7; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-3259-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3259-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 32FB4B2175A for ; Mon, 18 Dec 2023 09:42:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFD5F12B8D; Mon, 18 Dec 2023 09:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Oe3RVOw7" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2064.outbound.protection.outlook.com [40.107.243.64]) (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 768EE11CA6 for ; Mon, 18 Dec 2023 09:41:39 +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=GNXpjuuNiwrg+pItMC7Pb1O5rwG3ZM4la6zCd9joRkH5S3blvUZnH8PiEoJBlhonuWEcmoKnVIJx1sbIES5xL0/qGe+ICdIS7/R2OFGdsH3AMiIZPGX4ymo3gI2GZ++IiBl/wV7KbhMDHXQ6Q5La5Bu92eSv57TmygoqzoXWAie6V/g2MvdAe4ZNsxzSao4ek68tfhTtlnzfOSdv6tHx7R8IFyiTsh633zGw3W5N+fJit7kxsKli34TFtULYkhmgG+xhI/xmxhgEyMN6smXph7xsjr67SwC7DSZ6TFtPdcrbTPjzoSNRyctaZ+x3oge1CjW+BfV3GZ8IZJ1rVMM2Wg== 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=uTdFTDH34zqFL+os6DSLDnQ6k9aq/OmzQzh+OzCCuSQ=; b=kOWpuWBd1qW0RIY/Du+hdx6XjN9Xd8TC9ijxMPrkDE4pULprR3ZDalZY5PjrfpKShhMpHpf6nPFIvwSvPug1lZ4k7QR6FY+DKC8RO36jvcv/bAl95iL6ef9wjnsWlMxUxUOqvjGNaYGvGO+EnNNUsWrYUBHKG9+6y3J0kWIiCd5SVAjpHVDmZgsk5OXJi8/lAW3RMV42BbuvhK8RLfgTv6c/6UDEkfWIqT7S8h9cHhusVGVxTHw0m7ORh7XLNaK9dse8Xm4SMuZpKT5YD/j5LO1bWrSGB4SaHoj+iPqxt577l1vD/CMvjS5S+A2mk2jQyEsGt+vXqimt7XoN9f7m3g== 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=uTdFTDH34zqFL+os6DSLDnQ6k9aq/OmzQzh+OzCCuSQ=; b=Oe3RVOw7eP6KuvTlLWgQH3CuTDInWqrFhIq9pB/j3svFcrsstXs7YMpgUeQtuhqVVc6qngapRppdM2xrpOzy54aB31w0vUErhrYtzkD4+0gzssLMOHdaeuN6w8ZZnXIgt6Dc0oqe6jBODSSDQf38hDcAt6eXrHpXmG2d1iT0S4M= Received: from DM6PR03CA0043.namprd03.prod.outlook.com (2603:10b6:5:100::20) by DS0PR12MB7873.namprd12.prod.outlook.com (2603:10b6:8:142::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Mon, 18 Dec 2023 09:41:35 +0000 Received: from DS3PEPF000099DE.namprd04.prod.outlook.com (2603:10b6:5:100:cafe::a5) by DM6PR03CA0043.outlook.office365.com (2603:10b6:5:100::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37 via Frontend Transport; Mon, 18 Dec 2023 09:41:35 +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 DS3PEPF000099DE.mail.protection.outlook.com (10.167.17.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Mon, 18 Dec 2023 09:41:35 +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 03:41:34 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) 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 03:41:08 -0600 Received: from xsjarunbala50.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Mon, 18 Dec 2023 03:41:07 -0600 From: Jay Buddhabhatti To: , , , , , , , , , , CC: , , Jay Buddhabhatti Subject: [PATCH 2/2] drivers: soc: xilinx: add check for platform Date: Mon, 18 Dec 2023 01:40:09 -0800 Message-ID: <20231218094009.13528-3-jay.buddhabhatti@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231218094009.13528-1-jay.buddhabhatti@amd.com> References: <20231218094009.13528-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: DS3PEPF000099DE:EE_|DS0PR12MB7873:EE_ X-MS-Office365-Filtering-Correlation-Id: 03b171a2-0b9a-4c0c-da91-08dbffad86bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AGhuAjGA4W20HKOxPrJ0z+nPJ34xcl0Aaj+VKzVsKtvRVAB2TQXrOwI+inZcxLrhpS41/6VCHskl7BonJ+BkmHWw20cSzJo8uTXzkCEU5TTCdSx4LCoAHOtyJyN0ib391rjZ0lecrXInrWaGKyYLWb/sBC5+zCTvtXtcFJ+qkQ2aA00BDmDe2qZOA1IoT5heYNw0q0Zio0iwBo1RGHRJh68rA1UdfGGJVOjcDbMfhCDHD/B1Rq+auXUR4PjtIIO4YqhNLzV0GdFgcYC5yYHUaEgUDlSQj33D68OUneUTzCsw9ZaVAwrlH+BeIRBfr+YJErCVH1NoJSi5W8/G/NmUV0V5Tc7GSjk4OCHCUJxW1FCh+iEIPhc+8LztCP65aPKkloSe8CXiJ8feSIUxhR0+9F9T1o9jVGa7ra8dpPMcoUAEJZS3s37dvvVqoQtTyW0NeANVyjYVYZCuM8RtuqhxFKHR6M0lzJkrx49C3FPih1kzPn/C6c/Kwr6YbNSQ6t53IdeKPF+HTn11ToGnQtf1sGwpxyh5JOuQ7Ocr3XlJ9SeCOJUG81Cgdw/6Z+QXf0KVSC67VuPkcVXIHK+o1CFgG23h85HDnmOfSiFazeHbpSgr2CFZeGLjnCoSTsikEiWmS/kBGH+4bAlRIoSiauCKVuYjFrZpBk62FMs3oNRH9yw5QyYmo7FtJQTARRjUZHl63+TArI7T4wpri91DLjBNdFhkazwwMl2zmN/A07jBSptbcJ3SOTcjPJugm0zzx7hFXhXpKtXfLWVVr5w+pZ5AdtifuZBNruyA/3hVnUQQz50= 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)(136003)(39860400002)(376002)(396003)(346002)(230922051799003)(186009)(82310400011)(64100799003)(451199024)(1800799012)(36840700001)(46966006)(40470700004)(921008)(40480700001)(40460700003)(70206006)(70586007)(6636002)(81166007)(356005)(82740400003)(36756003)(86362001)(36860700001)(1076003)(336012)(26005)(426003)(83380400001)(2616005)(2906002)(316002)(8676002)(8936002)(54906003)(110136005)(478600001)(5660300002)(47076005)(44832011)(41300700001)(4326008)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2023 09:41:35.7159 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 03b171a2-0b9a-4c0c-da91-08dbffad86bb 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: DS3PEPF000099DE.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7873 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785612258688741518 X-GMAIL-MSGID: 1785612258688741518 Some error event IDs for Versal and Versal NET are different. Both the platforms should access their respective error event IDs so use sub_family_code to check for Versal or Versal NET platform and check error IDs for respective platforms. Signed-off-by: Jay Buddhabhatti --- drivers/soc/xilinx/xlnx_event_manager.c | 25 ++++++++++++++++++++----- include/linux/firmware/xlnx-zynqmp.h | 16 ++++++++++++---- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/drivers/soc/xilinx/xlnx_event_manager.c b/drivers/soc/xilinx/xlnx_event_manager.c index 86a048a10a13..78f9a3c6ae11 100644 --- a/drivers/soc/xilinx/xlnx_event_manager.c +++ b/drivers/soc/xilinx/xlnx_event_manager.c @@ -77,11 +77,26 @@ struct registered_event_data { static bool xlnx_is_error_event(const u32 node_id) { - if (node_id == EVENT_ERROR_PMC_ERR1 || - node_id == EVENT_ERROR_PMC_ERR2 || - node_id == EVENT_ERROR_PSM_ERR1 || - node_id == EVENT_ERROR_PSM_ERR2) - return true; + u32 pm_family_code, pm_sub_family_code; + + zynqmp_pm_get_family_info(&pm_family_code, &pm_sub_family_code); + + if (pm_sub_family_code == VERSAL_SUB_FAMILY_CODE) { + if (node_id == VERSAL_EVENT_ERROR_PMC_ERR1 || + node_id == VERSAL_EVENT_ERROR_PMC_ERR2 || + node_id == VERSAL_EVENT_ERROR_PSM_ERR1 || + node_id == VERSAL_EVENT_ERROR_PSM_ERR2) + return true; + } else { + if (node_id == VERSAL_NET_EVENT_ERROR_PMC_ERR1 || + node_id == VERSAL_NET_EVENT_ERROR_PMC_ERR2 || + node_id == VERSAL_NET_EVENT_ERROR_PMC_ERR3 || + node_id == VERSAL_NET_EVENT_ERROR_PSM_ERR1 || + node_id == VERSAL_NET_EVENT_ERROR_PSM_ERR2 || + node_id == VERSAL_NET_EVENT_ERROR_PSM_ERR3 || + node_id == VERSAL_NET_EVENT_ERROR_PSM_ERR4) + return true; + } return false; } diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 2375ce9b38df..2cfd78f232dc 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -91,10 +91,18 @@ /* * Node IDs for the Error Events. */ -#define EVENT_ERROR_PMC_ERR1 (0x28100000U) -#define EVENT_ERROR_PMC_ERR2 (0x28104000U) -#define EVENT_ERROR_PSM_ERR1 (0x28108000U) -#define EVENT_ERROR_PSM_ERR2 (0x2810C000U) +#define VERSAL_EVENT_ERROR_PMC_ERR1 (0x28100000U) +#define VERSAL_EVENT_ERROR_PMC_ERR2 (0x28104000U) +#define VERSAL_EVENT_ERROR_PSM_ERR1 (0x28108000U) +#define VERSAL_EVENT_ERROR_PSM_ERR2 (0x2810C000U) + +#define VERSAL_NET_EVENT_ERROR_PMC_ERR1 (0x28100000U) +#define VERSAL_NET_EVENT_ERROR_PMC_ERR2 (0x28104000U) +#define VERSAL_NET_EVENT_ERROR_PMC_ERR3 (0x28108000U) +#define VERSAL_NET_EVENT_ERROR_PSM_ERR1 (0x2810C000U) +#define VERSAL_NET_EVENT_ERROR_PSM_ERR2 (0x28110000U) +#define VERSAL_NET_EVENT_ERROR_PSM_ERR3 (0x28114000U) +#define VERSAL_NET_EVENT_ERROR_PSM_ERR4 (0x28118000U) /* ZynqMP SD tap delay tuning */ #define SD_ITAPDLY 0xFF180314