From patchwork Fri Aug 30 10:00:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronak Jain X-Patchwork-Id: 13784873 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 70F6BCA0EFB for ; Fri, 30 Aug 2024 10:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=nwUe1wiEEwHlNaTFwBb4VovhLwYRkELxDhtsU1Sdj8k=; b=gBcJMKsSfW4hqd43bAL9KHkSQm gahMEbWNd3uYoVsaEP+/kvv5okRNDqikDQFXGPKTS6PkrkSBL+GWgnqtUj1jH27GtHQiK8IEJNKUh BawRu/2ng9xyniFp0Bp24OuP83C6yCxDxlrDP5ny84uZmW35LNJTyFgYsUrMePRvFsRr+SWEtA2RO IuidNl3T4hKiNA6hUui/2ihbmUowGoYTgRNhjoX+eayzwkDzCJtaeNn/myuKwDzUO6M1Aca4Wj5r9 N2zBoBLo5wi+44+0u44Um5z9hpqQaKtYdm478LADHbg8sulmMFFqrVHnZSqxTqUTMu53go/116g8q 5UEFjeBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjyUG-00000005hU3-3L3R; Fri, 30 Aug 2024 10:04:12 +0000 Received: from mail-co1nam11on20621.outbound.protection.outlook.com ([2a01:111:f403:2416::621] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjyR4-00000005g7H-3byL for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 10:00:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XnyicFmJxYlKt344di92k7zNtBjlpcqHFY8HlOvLmDBRJKpVHzUSRd22D8Jzd3pYHyOyBiBffBOxSKjJXRBlENT7SeIfpsWYmiYpkUKm54fXDtpxvOcx/JOS2edOyRG9Dzz+XI6xbb2v3fWLpPAsJ1hx7gNN8tRZrwIsbc3Rek1968aOtg9NH3zof/NSrfPx2GgCQq8Npe3S4e6HsOM+NelEEorNn7WTyzvkBzLeqabZ9leRtbXAy2laXQKpXAxy6KcMFGk8B8J9csT14cmPn0mR6s/ikDDRqQ2FtK7ZaWjPaw2MUni0JAuAKiFOdMoTgrnI6edELHRTeAxPqeeJoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=nwUe1wiEEwHlNaTFwBb4VovhLwYRkELxDhtsU1Sdj8k=; b=kSy6ijAwTgsU4KtHskVmjAxuGH9612lZkRRju9yt6Rt/y5Q3donz4F2K5cgL0iu4YpHAtxc4i9EFzCU8NpHeivMVlq/Zi0GyuKdfRNP9DU4Nk6Ry0N6EAwFwUEEtojv0yfCwky4wOW5S6if4xtSgt+O3knjupJ7/APy1PUCu1BFiTirnisAYXlVFLSw2t38R/6AEpYFG8WK69l1hVE7uV+IqGEm5Vv/ANjogZtELQpNhP8BQ7dJOgcBNaUUWV9panM7y7DtBF1R6lWYpqN4pYQDJc7cKCyTDhsisyGoOWTSRz6XjZHXEjAgHNRseVwd06AOHf02weYNpugR2UYF0rw== 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=nwUe1wiEEwHlNaTFwBb4VovhLwYRkELxDhtsU1Sdj8k=; b=GmMlbKP13VBnTUSD6EQj0OjcSv/xTQ1x4d2icfirAiPvGhjTfw7o0gJ3yae7oaB14VLgxBsxf1um3nraYhiIXJpmfEyo/sVCdwJVxwFCXnQ9N2AkjrLks0dSDuEpPmBsjhJPJbXOTnz+zn3sVBH9KElm1/b1Lhd0A3iac7TeaNA= Received: from DM6PR07CA0130.namprd07.prod.outlook.com (2603:10b6:5:330::22) by CH3PR12MB8307.namprd12.prod.outlook.com (2603:10b6:610:12f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.28; Fri, 30 Aug 2024 10:00:45 +0000 Received: from DS1PEPF0001708E.namprd03.prod.outlook.com (2603:10b6:5:330:cafe::d3) by DM6PR07CA0130.outlook.office365.com (2603:10b6:5:330::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20 via Frontend Transport; Fri, 30 Aug 2024 10:00:45 +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 DS1PEPF0001708E.mail.protection.outlook.com (10.167.17.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Fri, 30 Aug 2024 10:00:44 +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.39; Fri, 30 Aug 2024 05:00:43 -0500 Received: from xsjwillw50.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 30 Aug 2024 05:00:43 -0500 From: Ronak Jain To: CC: , Subject: [PATCH] firmware: xilinx: use u32 for reset ID in reset APIs Date: Fri, 30 Aug 2024 03:00:42 -0700 Message-ID: <20240830100042.3163511-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: DS1PEPF0001708E:EE_|CH3PR12MB8307:EE_ X-MS-Office365-Filtering-Correlation-Id: 76921770-72b7-4924-8781-08dcc8da9d81 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: GzLTArLdz9S3WICkg5cJ25K07I7RhSgc/CRHO4VnCKJm142YBeLQdkmAB2aV3vuP9ifzKppZlpGoVrurvQ+MOGWyOfMrjm3nQhK8nWvUrv8RoKG1qQiErUwgCfHGznUxveAl+Ac8ndm620hPWuD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Ddl5hKZ/SytPvXfkQLWJwfCfTUmQ4XARI2XWA56uEfwW6wfO9xWo/8BfistOGw/2oZ6cyPBo3C5XcCxnpcGYLJ2Ysp+oOVO5H3vYho4na+suaxcLSZ3HotOGyzGTapHO4sqqSu8wHCirH+NBlmxL/DgwoXKus53JjqyPOMyijCcZksI/EG5R3p18Il1cikQD4DaQQ5CwV1cDt8wjY+i/5bk3hoZWFHfRq/w5nyhxKSka2QV9 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:(13230040)(82310400026)(376014)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2024 10:00:44.7892 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 76921770-72b7-4924-8781-08dcc8da9d81 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: DS1PEPF0001708E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8307 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_030055_336587_EF3ED68D X-CRM114-Status: GOOD ( 12.29 ) 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 Refactors the reset handling mechanisms by replacing the reset ID's enum type with a u32. This update improves flexibility, allowing the reset ID to accommodate a broader range of values, including those that may not fit into predefined enum values. The use of u32 for reset ID enhances extensibility, especially for hardware platforms or features where more granular control of reset operations is required. By shifting to a general integer type, this change reduces constraints and simplifies integration with other system components that rely on non-enum-based reset IDs. Signed-off-by: Ronak Jain --- drivers/firmware/xilinx/zynqmp.c | 4 ++-- include/linux/firmware/xlnx-zynqmp.h | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index add8acf66a9c..c8be32d9c6af 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -920,7 +920,7 @@ int zynqmp_pm_set_boot_health_status(u32 value) * * Return: Returns status, either success or error+reason */ -int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset, +int zynqmp_pm_reset_assert(const u32 reset, const enum zynqmp_pm_reset_action assert_flag) { return zynqmp_pm_invoke_fn(PM_RESET_ASSERT, NULL, 2, reset, assert_flag); @@ -934,7 +934,7 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_reset_assert); * * Return: Returns status, either success or error+reason */ -int zynqmp_pm_reset_get_status(const enum zynqmp_pm_reset reset, u32 *status) +int zynqmp_pm_reset_get_status(const u32 reset, u32 *status) { u32 ret_payload[PAYLOAD_ARG_CNT]; int ret; diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 563382cf16f2..5b938fc2adad 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -557,9 +557,9 @@ int zynqmp_pm_get_pll_frac_data(u32 clk_id, u32 *data); int zynqmp_pm_set_sd_tapdelay(u32 node_id, u32 type, u32 value); int zynqmp_pm_sd_dll_reset(u32 node_id, u32 type); int zynqmp_pm_ospi_mux_select(u32 dev_id, u32 select); -int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset, +int zynqmp_pm_reset_assert(const u32 reset, const enum zynqmp_pm_reset_action assert_flag); -int zynqmp_pm_reset_get_status(const enum zynqmp_pm_reset reset, u32 *status); +int zynqmp_pm_reset_get_status(const u32 reset, u32 *status); unsigned int zynqmp_pm_bootmode_read(u32 *ps_mode); int zynqmp_pm_bootmode_write(u32 ps_mode); int zynqmp_pm_init_finalize(void); @@ -702,14 +702,13 @@ static inline int zynqmp_pm_ospi_mux_select(u32 dev_id, u32 select) return -ENODEV; } -static inline int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset, +static inline int zynqmp_pm_reset_assert(const u32 reset, const enum zynqmp_pm_reset_action assert_flag) { return -ENODEV; } -static inline int zynqmp_pm_reset_get_status(const enum zynqmp_pm_reset reset, - u32 *status) +static inline int zynqmp_pm_reset_get_status(const u32 reset, u32 *status) { return -ENODEV; }