From patchwork Fri Feb 2 11:38:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Praveen Teja Kundanala X-Patchwork-Id: 195836 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp377476dyc; Fri, 2 Feb 2024 04:05:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoizaGaHMcw82o9AYLohq5LyFTB/euh1Cpw05ferFOTuJUWRZF6Pi/LsERCchPv6EgTVdc X-Received: by 2002:a17:90a:9206:b0:294:bb78:3972 with SMTP id m6-20020a17090a920600b00294bb783972mr7169456pjo.14.1706875511200; Fri, 02 Feb 2024 04:05:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX61KzeJoPpMFw/dAug7lR2MqMP9xQfwYe7pHWYwHTpFSZYg8aNxY7uGKxZn6fl/vusSlV4RoVN+zAHYtbHj+XjChNGdA== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id np1-20020a17090b4c4100b002964a91a43asi561387pjb.179.2024.02.02.04.05.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 04:05:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49767-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=5e0xLKI1; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-49767-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49767-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 74B99B29C40 for ; Fri, 2 Feb 2024 11:40:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70875140782; Fri, 2 Feb 2024 11:39:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="5e0xLKI1" Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2047.outbound.protection.outlook.com [40.107.237.47]) (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 0C32913DB89; Fri, 2 Feb 2024 11:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706873958; cv=fail; b=ZM8RDoHPhaR5F1GDiMXl1CHfNFe849EFajnsbE1aYpWSBS3e/UibVJ+aE83KZdIf8GgFiO6+bCnMwS92UfhpkiQWoWzNnlCy2MDvSj85oUs71xP+pWKJ4mI81RM+z4nGarfNqb7gUe4lmTWm17AgEDCIKBCM3GfV1npHk85Guxc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706873958; c=relaxed/simple; bh=oTrAwxaDhw58YZJ3+UoujQkVyfPZVJdvcn9ODfXTzqo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ik9PxW8vsl+GHp64SlmbpLKwGN5LKy8nmyO+GSV3H29ErajbnLpKb5buNZoKS1B4Im/ZvlclQWdIfW4IY/CDT8v9Yrum2PChZsNuHViTC0ryN6Ml8XTxiQ4fRnWPSzG87iuaHzRFtEGntwWNEIBBDed+SS2tLaTwxRLOCxL+K54= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=5e0xLKI1; arc=fail smtp.client-ip=40.107.237.47 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=jFqSkt9s13MOQA224u/aOnB1msljWjtv9Gy9NcHG8vJb2KFwfovkD6OPG3clE6+O1uwjXtBwi7QbD1xGUgQkzTMml8PdNDy0uo5Poda/q4arKLgyfGfHGIqMgk9z0nbAqlHn5CNeXix/5UcYX4LjOxeo5Ezgm0Keec4FYn5r9wugUzKOOGJzYMk4c5FC63VCCHAcVM3ESXmc72+L4MvF+bRGakSOqq5rvM5pduI0mLkc6yHfkah8iBCDOtQOKCN3+kDv2Jca6ZbGQJqnQQwtrosHf7YwMewQt5UR+aRLTQJ0KlMOnTCj+pOArKCfrkvYKTTfevxhCjuMz0h5kb+63w== 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=/3g1/2cNqEtc8zRKF3VCwz+IRclreZquaPZCwmmVGtk=; b=lznSxvkTKZYLKFjrc6CqeUha4s2oicGdmmj1lUG91fDYCdzx1dYSfH6/8MvVVyvWbR/lyqDc0cub81i7RU+A40OD2nqWxtqeFhSmCqoacp0Qz8D7PgXfein9bkBnDcvMz6ZdWRZyzNe0vooPifpeKmIVSrFD4Xmg768Cmt9vpHaHad7zUJH+KDtOfAhX39c4lqRX+KaF0B4mSfbvKTvDOmVowTxTMFhsriLhqm3FPdHYPaDDgEtw64uD4qPwJ73+QPeWFOruvsYXHssRjO86tDaDw/1L6CuA2DsCMmDEOfKlpI3T7rgK1gjpvneP6I0lgHmG6/NEN9CKY4/vBBYpDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.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=/3g1/2cNqEtc8zRKF3VCwz+IRclreZquaPZCwmmVGtk=; b=5e0xLKI10++fr9qj0hk4/yXSlEHoGCdHoO2jRFNIJ+JqIxA06TwdbfrWSsHWaKiqqAmtCe28JAh45sc0EqBCKzydNQGTPcJhgVedG9PmtLRcL7Y2cc9n3wfvcAXRDTvLc6OGxNym19TwVqs+YQbkl9Nz0Rh/ZajBUHzreiDQSUs= Received: from DS7PR07CA0012.namprd07.prod.outlook.com (2603:10b6:5:3af::20) by DM4PR12MB6398.namprd12.prod.outlook.com (2603:10b6:8:b5::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.22; Fri, 2 Feb 2024 11:39:14 +0000 Received: from SN1PEPF0002BA4D.namprd03.prod.outlook.com (2603:10b6:5:3af:cafe::48) by DS7PR07CA0012.outlook.office365.com (2603:10b6:5:3af::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.29 via Frontend Transport; Fri, 2 Feb 2024 11:39:14 +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 SN1PEPF0002BA4D.mail.protection.outlook.com (10.167.242.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Fri, 2 Feb 2024 11:39:14 +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.34; Fri, 2 Feb 2024 05:39:13 -0600 Received: from xhdbharathm40.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; Fri, 2 Feb 2024 05:39:11 -0600 From: Praveen Teja Kundanala To: , , , , , CC: Subject: [PATCH V4 1/4] firmware: xilinx: Add ZynqMP efuse access API Date: Fri, 2 Feb 2024 17:08:40 +0530 Message-ID: <20240202113843.17999-2-praveen.teja.kundanala@amd.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20240202113843.17999-1-praveen.teja.kundanala@amd.com> References: <20240202113843.17999-1-praveen.teja.kundanala@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: SN1PEPF0002BA4D:EE_|DM4PR12MB6398:EE_ X-MS-Office365-Filtering-Correlation-Id: 733aef1d-85a2-4f99-9cc6-08dc23e394dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vWMHXcBp7YZ9lZpD+sRMWZQMMNeQgVWsgiBlYj5FGplRAtxoqONeTJtXKh+k4F+ORBlNj+V51zWSy9iSNYATdvUr+o5N3spzKIpNuQKwBW5aFEPepI+fFXrj2O33FnyQQolivosobWwtdVYPgwHGyLB+EKWselj9Nm83XyF13agHFiK2wy36Fs1CUPzbjrgNlntlUeJTScPh59t7czp4OKsYby0IUQhN16jkcrovIJ+TiT4+p0hb9Gi8yEwPeMxPAHFEftTuOh6nq48tNWoTsiCvMYxGwjIBhLCUJeSjJ49HQkTv4FOLqU/qh84AlYO4gEUFzMYJMtyWVgDV5QG4U63AeUvOz7wKhXz0Ya7e2OqYipChcFpoDCwWdqIu3LghPlf95Vw/z/XBzr/TGr8K9yyoQP7XhCtiCh86qFULUCd5o786/Y9970XqeyxUPeGwPRcxk7IkGBDLsJ3j1bdcDSieMIqxl5a+ryIhHts1qIZysdJwkm/cKgI4vWznDJSr5Ls6c1UtupyH1gx0fRDkmUFVu5bOiCCsuQkFWPxNKORWmPSSWqgGvKbkdCX3aLGldKOxT+nUNHgRQtgesLZ/SO9wLT+TZmfAv8FQZeEJZsiawoQ0NKx2/VDG0F9Mkfmv5mdzLh9WOI95f13MbEs2GIOxRZEtKBUZYDUdK3qckTNc9tLWev7AfEWzMtcl+6U5+3ZSBaqzFyvOvc39+HjFj9wHvcuKBB3i719L1yaO7TLYaq8mSSSVN7yxNaz5wYvNIIcX2mH1p/9TfeclsI4BEA== 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)(39860400002)(346002)(376002)(396003)(136003)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(82310400011)(36840700001)(46966006)(40470700004)(40480700001)(336012)(426003)(1076003)(40460700003)(26005)(2616005)(316002)(41300700001)(36756003)(36860700001)(47076005)(6666004)(478600001)(82740400003)(356005)(81166007)(83380400001)(86362001)(8936002)(103116003)(70206006)(70586007)(5660300002)(8676002)(110136005)(2906002)(4326008)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 11:39:14.1333 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 733aef1d-85a2-4f99-9cc6-08dc23e394dc 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: SN1PEPF0002BA4D.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6398 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789788695948882911 X-GMAIL-MSGID: 1789788695948882911 Add zynqmp_pm_efuse_access API in the ZynqMP firmware for read/write access of efuse memory. Signed-off-by: Praveen Teja Kundanala Acked-by: Michal Simek --- drivers/firmware/xilinx/zynqmp.c | 25 +++++++++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 8 ++++++++ 2 files changed, 33 insertions(+) diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index 79789f0563f6..9bc45357e1a8 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -3,6 +3,7 @@ * Xilinx Zynq MPSoC Firmware layer * * Copyright (C) 2014-2022 Xilinx, Inc. + * Copyright (C) 2022 - 2023, Advanced Micro Devices, Inc. * * Michal Simek * Davorin Mista @@ -1384,6 +1385,30 @@ int zynqmp_pm_aes_engine(const u64 address, u32 *out) } EXPORT_SYMBOL_GPL(zynqmp_pm_aes_engine); +/** + * zynqmp_pm_efuse_access - Provides access to efuse memory. + * @address: Address of the efuse params structure + * @out: Returned output value + * + * Return: Returns status, either success or error code. + */ +int zynqmp_pm_efuse_access(const u64 address, u32 *out) +{ + u32 ret_payload[PAYLOAD_ARG_CNT]; + int ret; + + if (!out) + return -EINVAL; + + ret = zynqmp_pm_invoke_fn(PM_EFUSE_ACCESS, ret_payload, 2, + upper_32_bits(address), + lower_32_bits(address)); + *out = ret_payload[1]; + + return ret; +} +EXPORT_SYMBOL_GPL(zynqmp_pm_efuse_access); + /** * zynqmp_pm_sha_hash - Access the SHA engine to calculate the hash * @address: Address of the data/ Address of output buffer where diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 9a7e52739251..1a069a56c961 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -3,6 +3,7 @@ * Xilinx Zynq MPSoC Firmware layer * * Copyright (C) 2014-2021 Xilinx + * Copyright (C) 2022 - 2023, Advanced Micro Devices, Inc. * * Michal Simek * Davorin Mista @@ -171,6 +172,7 @@ enum pm_api_id { PM_CLOCK_GETPARENT = 44, PM_FPGA_READ = 46, PM_SECURE_AES = 47, + PM_EFUSE_ACCESS = 53, PM_FEATURE_CHECK = 63, }; @@ -562,6 +564,7 @@ int zynqmp_pm_set_requirement(const u32 node, const u32 capabilities, const u32 qos, const enum zynqmp_pm_request_ack ack); int zynqmp_pm_aes_engine(const u64 address, u32 *out); +int zynqmp_pm_efuse_access(const u64 address, u32 *out); int zynqmp_pm_sha_hash(const u64 address, const u32 size, const u32 flags); int zynqmp_pm_fpga_load(const u64 address, const u32 size, const u32 flags); int zynqmp_pm_fpga_get_status(u32 *value); @@ -749,6 +752,11 @@ static inline int zynqmp_pm_aes_engine(const u64 address, u32 *out) return -ENODEV; } +static inline int zynqmp_pm_efuse_access(const u64 address, u32 *out) +{ + return -ENODEV; +} + static inline int zynqmp_pm_sha_hash(const u64 address, const u32 size, const u32 flags) { From patchwork Fri Feb 2 11:38:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Praveen Teja Kundanala X-Patchwork-Id: 195823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp365739dyc; Fri, 2 Feb 2024 03:40:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGrCZ1d3z2y6PG+Z0xFRHBd7nH/X4HHF+5P3BKvEwXs0AseqIqjlzqHYevY9zyEFtxBlrBc X-Received: by 2002:a17:906:681:b0:a35:84fa:6d85 with SMTP id u1-20020a170906068100b00a3584fa6d85mr1272310ejb.72.1706874056341; Fri, 02 Feb 2024 03:40:56 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWPeFRzrwjIurUTP4Fqqsf5Tm4CB/SWvkz4cjUo661Mlmd/TW/PNDVCFItgRYLS0KGwcU3AiWBPrmFYTFeai8RuZ0154w== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n17-20020a170906379100b00a36cdcee3desi734787ejc.964.2024.02.02.03.40.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 03:40:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49768-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="tsCIC1/4"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-49768-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49768-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 C08861F28752 for ; Fri, 2 Feb 2024 11:40:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA114141983; Fri, 2 Feb 2024 11:39:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="tsCIC1/4" Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2083.outbound.protection.outlook.com [40.107.223.83]) (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 46EFA13F01D; Fri, 2 Feb 2024 11:39:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706873962; cv=fail; b=joruorabF62LhAN26Nc1j6nhHjnjN0DA7FZM3Uda2f2M7T3cDfZT4FiB9TvW3Gh+wZ6Lwt38JcNXJpiUb5nC83JwJBFniURBQkwmfrHDpXpWY1YjaTu2sONjR45xgGp5ocWG8F0YArmcvoudUJEcKecy5hA1AxOno+3KZi18CQ4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706873962; c=relaxed/simple; bh=Uz0ApcAA6JiQkZUd0ilM0lA24O9DEmvRDAhS3oZ+fN4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tRYAl/TKiEDYz506Ip9CL7XHufk+TU0yo+1hstcKT7dZBZWkv3NAQTJ+cmBTCf9XeVNwZ7h0EZtc8Lc7xaRfpxOchPrVzUZYQM/gO6q4xa9OmiLeWeC+MSAo/CSsYGAtxLcBUuBIg9Sxa9vTofiYvP9+BrKc9IoVWqGuawpJUkw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=tsCIC1/4; arc=fail smtp.client-ip=40.107.223.83 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=FF2Rqa+kqxgtIuWlgm27El8DLOLnkHspx40h4Zwaa/zSYaCw5f0ym//U+EOUrDVWEVO+uG5YgaDNc79yZy9GS7q32qUkTbtaZjOjSwie8TiEacDruZmK0KiiGfnPCzOubGVAoRjQ/Y78D+4jhddiq68QWJAQctCOB7E8Ykj8beytTOknzSsaqecCw2GF533pnLOFFVR/U9O5cVi58I8at7HguYv21tcpoVRnD8RX9U8nwBFDXG7yBuHuotRqEPLpdMTymSZ66/hFXbtXN7v0wOFBvBtXAbTqmwlE3EfOu5mha4Ic3ckIkAWIhkiqZHghhbG9i/8UO/1xJqzZ1T3jnQ== 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=zThMBt7dUMB9H92U+RpcfLi0BqyoRA95TFerElYN2JU=; b=N+3PaX6GZZbvWAuuSG+Oh6NALL0IsouH1Y6g7I3DqFdE8Dln7tXPj4Z0ybr4kAgh7K9uti+QbU8i2Lekuhc+gUJFpVw/3NAia8ksFjxwTMLQESm4TETpoQURJlAx0tu/enKkO7UbzwMFTAu2jcng29pUPBqdSKgFEw39U2Yi3eCt/WQJvoQ2isU3KTIxDiO+uxAzx3K00Airzmc/lPbSXeetcEc8B2rISaXtI8qHgrXtV+Xm3hyos6QVhmmVDop7ovZb4kQ1MioDEcR+PauqtxYtKkh8JG5hMGkinafljJO70/WVAfFlM6hZLu7250ZwHz1UfYfikGftPffmtAlYoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.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=zThMBt7dUMB9H92U+RpcfLi0BqyoRA95TFerElYN2JU=; b=tsCIC1/4UqY1LFJiy313su0b4EzYEbI+77tDDvDJwFanV3FGC3hZI69JCeGJ3oemOgxOg6PjAxhxItCfd5tn+Kzm5nrGP1dXeLPXr6EtgUoSgWyIJuEvflne35LSzyKX5S9lj6FitDAbWPVVxLkh7yK3QIAPVnMKlz+GYQ6rjYI= Received: from SN1PR12CA0054.namprd12.prod.outlook.com (2603:10b6:802:20::25) by DS0PR12MB7772.namprd12.prod.outlook.com (2603:10b6:8:138::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.9; Fri, 2 Feb 2024 11:39:16 +0000 Received: from SN1PEPF0002BA4E.namprd03.prod.outlook.com (2603:10b6:802:20:cafe::df) by SN1PR12CA0054.outlook.office365.com (2603:10b6:802:20::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.26 via Frontend Transport; Fri, 2 Feb 2024 11:39:16 +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 SN1PEPF0002BA4E.mail.protection.outlook.com (10.167.242.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Fri, 2 Feb 2024 11:39:16 +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.34; Fri, 2 Feb 2024 05:39:15 -0600 Received: from xhdbharathm40.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; Fri, 2 Feb 2024 05:39:14 -0600 From: Praveen Teja Kundanala To: , , , , , CC: Subject: [PATCH V4 2/4] nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup Date: Fri, 2 Feb 2024 17:08:41 +0530 Message-ID: <20240202113843.17999-3-praveen.teja.kundanala@amd.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20240202113843.17999-1-praveen.teja.kundanala@amd.com> References: <20240202113843.17999-1-praveen.teja.kundanala@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: SN1PEPF0002BA4E:EE_|DS0PR12MB7772:EE_ X-MS-Office365-Filtering-Correlation-Id: efea9808-db15-4370-962d-08dc23e3964b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z+OI8M3kYy0zM08NgA6T2AhA/9YDtzB1JIH2ItB2JwfwSZIeqy91FBpS/6hvtQKS5pJZt7ij5/0IslMFMnC0D80Rx/1KROmAWARyz75tgFu2swFykGzpHUW/XyRALxVkv7SLofkCLxzEZntDsHGSZcmEoEfaBaeH0ewni8QIeVrhcW4nBXrf6nMN8sOVyvMdJ6yXDypq3p2srQr0WlGArtcFHnzLDCnrhKXlAWF5cxuBlYbMArTtieanDCwVyClbpXzerYSGA6Erbn9EBim5AMAlXQi3AbdEASJqm7nnRp2I5U2CF6mndhP7B5ddN8yKvuQsgqs8Ww3Qfup+dkIbaeFiHnWYK/VxpqcYHTGK08M3lTR/4SqH3kPhr/92kz2Lo6UShfFGgfE7weCZ0VaGI66+dub3ra5MHbr5Qer5wgfQKfjhSwSDzdBkdRtildHcs7WkyaI+/Rf4hgh5jUdpC31jFWjdYFelAeXZau5qw6tWN3wFJgFqSRNMbmW26TE4CF0lFT1YKLQWFQCmDisiyo8qnIUh5PuREnyDlq7+aoJsIgo6TZJ2hNTpsJHHHPY7Fj+14Jj9ztjigQ4YH8vBd2umXK2cgdIjRFDbb9hx8MiHMvTEiHhvV9CJwOrWfkusiSvN1dY/8YubhZABpVUPJ5J3SvxAx2duXWB2eLG4OFkSNC8Ypj3I1LsZEsSD61AkzzaV+Jz6vetZnpJvk+Thkwsdd1+WoGk/+RIRwKc11gFleup8fIHrMrzNI9Ci8clU3OEJXfy96mOnuPOyEYslVA== 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)(39860400002)(396003)(376002)(136003)(346002)(230922051799003)(64100799003)(451199024)(82310400011)(186009)(1800799012)(36840700001)(46966006)(40470700004)(1076003)(8676002)(8936002)(4326008)(5660300002)(86362001)(103116003)(2906002)(70206006)(70586007)(110136005)(36756003)(81166007)(316002)(356005)(36860700001)(478600001)(47076005)(82740400003)(83380400001)(6666004)(426003)(41300700001)(26005)(336012)(2616005)(40480700001)(40460700003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 11:39:16.5227 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: efea9808-db15-4370-962d-08dc23e3964b 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: SN1PEPF0002BA4E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7772 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789787170554511059 X-GMAIL-MSGID: 1789787170554511059 - Remove static nvmem_config declaration - Remove zynqmp_nvmem_data Signed-off-by: Praveen Teja Kundanala Acked-by: Kalyani Akula --- drivers/nvmem/zynqmp_nvmem.c | 37 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/drivers/nvmem/zynqmp_nvmem.c b/drivers/nvmem/zynqmp_nvmem.c index 7f15aa89a9d0..391d8e88b270 100644 --- a/drivers/nvmem/zynqmp_nvmem.c +++ b/drivers/nvmem/zynqmp_nvmem.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2019 Xilinx, Inc. + * Copyright (C) 2022 - 2023, Advanced Micro Devices, Inc. */ #include @@ -11,36 +12,25 @@ #define SILICON_REVISION_MASK 0xF -struct zynqmp_nvmem_data { - struct device *dev; - struct nvmem_device *nvmem; -}; static int zynqmp_nvmem_read(void *context, unsigned int offset, void *val, size_t bytes) { + struct device *dev = context; int ret; - int idcode, version; - struct zynqmp_nvmem_data *priv = context; + int idcode; + int version; ret = zynqmp_pm_get_chipid(&idcode, &version); if (ret < 0) return ret; - dev_dbg(priv->dev, "Read chipid val %x %x\n", idcode, version); + dev_dbg(dev, "Read chipid val %x %x\n", idcode, version); *(int *)val = version & SILICON_REVISION_MASK; return 0; } -static struct nvmem_config econfig = { - .name = "zynqmp-nvmem", - .owner = THIS_MODULE, - .word_size = 1, - .size = 1, - .read_only = true, -}; - static const struct of_device_id zynqmp_nvmem_match[] = { { .compatible = "xlnx,zynqmp-nvmem-fw", }, { /* sentinel */ }, @@ -50,21 +40,18 @@ MODULE_DEVICE_TABLE(of, zynqmp_nvmem_match); static int zynqmp_nvmem_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct zynqmp_nvmem_data *priv; + struct nvmem_config econfig = {}; - priv = devm_kzalloc(dev, sizeof(struct zynqmp_nvmem_data), GFP_KERNEL); - if (!priv) - return -ENOMEM; - - priv->dev = dev; + econfig.name = "zynqmp-nvmem"; + econfig.owner = THIS_MODULE; + econfig.word_size = 1; + econfig.size = 1; econfig.dev = dev; econfig.add_legacy_fixed_of_cells = true; + econfig.read_only = true; econfig.reg_read = zynqmp_nvmem_read; - econfig.priv = priv; - - priv->nvmem = devm_nvmem_register(dev, &econfig); - return PTR_ERR_OR_ZERO(priv->nvmem); + return PTR_ERR_OR_ZERO(devm_nvmem_register(dev, &econfig)); } static struct platform_driver zynqmp_nvmem_driver = { From patchwork Fri Feb 2 11:38:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Praveen Teja Kundanala X-Patchwork-Id: 195827 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp368787dyc; Fri, 2 Feb 2024 03:48:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGpL5ezqL9vGMxPJHHuZ0xVTWA1GZK93gT6T6t/aS+Wy8VqhLFamXS55re/ReaxvFIdzyCm X-Received: by 2002:a05:6a00:3d53:b0:6df:f6a2:508d with SMTP id lp19-20020a056a003d5300b006dff6a2508dmr2291096pfb.22.1706874484109; Fri, 02 Feb 2024 03:48:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX/3lDLv5DZVq30hSXBkLX6VLqKKjpXarhgypsuXZWzCExPnxYLc2IBLWYSkYO2Tj/vv+ue8kHw1c4nZu8rFPEbhymuoA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2-20020aa78e42000000b006ddc82d274asi1430721pfr.187.2024.02.02.03.48.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 03:48:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49769-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=peoti+4H; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-49769-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49769-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 00C9E28C0AF for ; Fri, 2 Feb 2024 11:41:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD18E1420D0; Fri, 2 Feb 2024 11:39:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="peoti+4H" Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) (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 2E68714078F; Fri, 2 Feb 2024 11:39:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706873965; cv=fail; b=mVO09UQv1DPC9uZGU/r6c85XvdqDVtS2RAzQZhV80jj7lgr/rRoOWblP8CDnefNO0jQhvSrdgOQRm4Nb6V3PPm+ZrHPIja2beJF+rsci/KrVfcgTwTKUf7TlY+P0ct4WzYWgLgcu3q/vkR0/fmaJPWFOhHUxqkdp90nkpWalqXE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706873965; c=relaxed/simple; bh=WVTpUF6lr7OOUcZb25Jy9nufIQNXCZSCJWS88wlpWpM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kesLpLzcDdPLdds9Tqs1OlUoBBHcdQ2jmt0R4o4YSlnZQMl5F/FQ5lJ50y+oA87Kpb7isjsPU70ccVG6fh8htLnTYIWb74ao4ajs/xfgVSvCKHBRcbkNiCXe0nOJFQqYLjKGEa3eBe+o1Npf+hWKsTnQAu0iwsPRqIytwUWQT+g= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=peoti+4H; arc=fail smtp.client-ip=40.107.236.40 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=loXGbOAojIdWL3bi9dQpQVQ2drC1+Z2LN+Buf8zRaoh/SHa6K1ubs7fveD6jLF94GppXcFJvUxB23kp8B76uJEQeyUwYjcG5QV5M/NJAQc40Tbolz9OTRqPYkQTa5KoNHFj/5VLqSN56VdLGjgNtrYBM2Ys9aLx8OMVf8UU3lA90YemSAK+9+ncbtPndvAqTEWgYbaPSUI0+lhWc01w/XDuT2RW9zoBUtboVVYzbvurL3lBqNqtkjoPTrRw9FVh9twnSYDXxDDCkRx3G5obU4FEFn0qeUxHg2WAgX+gj60G1B/Lg9+GhRXdMdS0lNdBqCvldPVNH3Yp/XS0+GYR9oQ== 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=N2+6k1dAPykebW78rDXHC8q5YjqCp4KU6kCHtB1JTWY=; b=amqsxcI1ZrThU9ZUw3dIAU81tr2tnM86wFeWVgi1FUOgiwTjddZWQM6T0KqiYR9kCxDrOIv40CGyNvRuHdikUsF4Gt3nkZvXvwfD3aP9Y0Fibkox4c0MmDjRhYmODy6q5gP9xn5xn/Fqn6b9p7Wzm/nOz0WrbAAQDlyFyLmKTnDEsGkp9ZzhOGFVzvmT7Hg79wGDbfqGGadzfItfWgL9Npxf4U4bHEHyIqguJvvznEmT+M5Iq02STBUVvtgXJRH2acafcZF54NOAZxAQZ/aufWrtBMB3Pfqn7PT3j6Ch63oishBijFSLabcpc1hxrVC1KUtVBu+CL4DeuWed7Vzzuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.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=N2+6k1dAPykebW78rDXHC8q5YjqCp4KU6kCHtB1JTWY=; b=peoti+4HC55YhICcP5z5fhJze8tPB7TWi0bDIigz2+lE2Fw/sjgb8tA621OfpDmRw+u3ewEtn8G+BMs8rUXo8fnt53VxEDcp/xUyXkc8ULppO2kupDPrn/D+WbHEPwltulIRCoDVc/1KKQy92h3PSl76T2a75Yc1BzBFVBQfNl4= Received: from PH8PR07CA0001.namprd07.prod.outlook.com (2603:10b6:510:2cd::26) by DS0PR12MB8561.namprd12.prod.outlook.com (2603:10b6:8:166::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.34; Fri, 2 Feb 2024 11:39:19 +0000 Received: from SN1PEPF0002BA4C.namprd03.prod.outlook.com (2603:10b6:510:2cd:cafe::98) by PH8PR07CA0001.outlook.office365.com (2603:10b6:510:2cd::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.30 via Frontend Transport; Fri, 2 Feb 2024 11:39: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 SN1PEPF0002BA4C.mail.protection.outlook.com (10.167.242.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Fri, 2 Feb 2024 11:39:18 +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.34; Fri, 2 Feb 2024 05:39:18 -0600 Received: from xhdbharathm40.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; Fri, 2 Feb 2024 05:39:16 -0600 From: Praveen Teja Kundanala To: , , , , , CC: Subject: [PATCH V4 3/4] nvmem: zynqmp_nvmem: Add support to access efuse Date: Fri, 2 Feb 2024 17:08:42 +0530 Message-ID: <20240202113843.17999-4-praveen.teja.kundanala@amd.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20240202113843.17999-1-praveen.teja.kundanala@amd.com> References: <20240202113843.17999-1-praveen.teja.kundanala@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: SN1PEPF0002BA4C:EE_|DS0PR12MB8561:EE_ X-MS-Office365-Filtering-Correlation-Id: 5503b8d8-6aea-4f1c-a4c6-08dc23e397ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UcxyHNT+syXmRqf5ZbgvqJ9sHxe9/qLzy+PVEHLNjeUhfL2z3v1RlGXcgxDqwxsIGn6mDQRcejASsqHA+kSXreCN0eXPnt0HwXbDo7XQH6cDmEoc1fMAcL+yThAGuxyXh8rdDOyaOnszmn18crpJFsOLGjhgM9qUvxS7tywkpY/ze6/kV+ZT8OFkVbDy2u0ULq/Xoa3CMKxqhClFjc7H7oozAr3H99UMSn33tnO70MAotasesxXW1GuJZrtvGL77H+uebi42WnhNNCRcYTCK/8YBr18s6haojI61K5WDNGlZWcCdAtI7ZEZJs5AM/+93pkhYiybWZR7de4MYjENiyA4w7VdsvwqzPOUcbFzgDeqBAAmObLj2HyRRAEl1xwm4xIMhhYpOwSp5Sk5YWxXGQKHyjFJNuF6DMuMD8H0RLIGz0G31otSreWEqpqmyZWM8YCJ6RoXgZhiYS6hvY5mAQv4w5naVNwSnbIpwVQbgedA9SooqE05Rj4Oxn5kLq6JTjTa36rD4maKyAiKqPD279KxkGVfaoWBzphE7PJly+i6/kNfhDysBedXk0sW8RVhu9n/+lt7s6XhokXkHZls44/95sHOdU69EPWPJx7U90UccHVsl5fwgJLgen6iFE73u1gDzcf9yuvTjlkRnj4L6K5nCzmTYuak9Bd2Q+w1wxNJD4zYP4HuZSzQRRFvmhuPNQ3ZDyKx1199eEHu9sl2cPIvVaKNdmi7QDSsO34Wlde5h1UPzjjPHW5DO12ezV0ZXLRLiV2P1/lGcep7sbCA0Gw== 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)(396003)(376002)(39860400002)(346002)(230922051799003)(82310400011)(64100799003)(1800799012)(451199024)(186009)(46966006)(40470700004)(36840700001)(36860700001)(5660300002)(4326008)(2616005)(8676002)(8936002)(103116003)(40480700001)(40460700003)(82740400003)(81166007)(83380400001)(110136005)(86362001)(336012)(41300700001)(47076005)(70206006)(26005)(2906002)(1076003)(36756003)(478600001)(6666004)(70586007)(316002)(356005)(426003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 11:39:18.9282 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5503b8d8-6aea-4f1c-a4c6-08dc23e397ba 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: SN1PEPF0002BA4C.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8561 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789787618810466120 X-GMAIL-MSGID: 1789787618810466120 Add support to read/write efuse memory map of ZynqMP. Below are the offsets of ZynqMP efuse memory map 0 - SOC version(read only) 0xC - 0xFC -ZynqMP specific purpose efuses 0x100 - 0x17F - Physical Unclonable Function(PUF) efuses repurposed as user efuses Signed-off-by: Praveen Teja Kundanala Acked-by: Kalyani Akula --- drivers/nvmem/zynqmp_nvmem.c | 186 +++++++++++++++++++++++++++++++++-- 1 file changed, 176 insertions(+), 10 deletions(-) diff --git a/drivers/nvmem/zynqmp_nvmem.c b/drivers/nvmem/zynqmp_nvmem.c index 391d8e88b270..8682adaacd69 100644 --- a/drivers/nvmem/zynqmp_nvmem.c +++ b/drivers/nvmem/zynqmp_nvmem.c @@ -4,6 +4,7 @@ * Copyright (C) 2022 - 2023, Advanced Micro Devices, Inc. */ +#include #include #include #include @@ -11,24 +12,189 @@ #include #define SILICON_REVISION_MASK 0xF +#define P_USER_0_64_UPPER_MASK GENMASK(31, 16) +#define P_USER_127_LOWER_4_BIT_MASK GENMASK(3, 0) +#define WORD_INBYTES 4 +#define SOC_VER_SIZE 0x4 +#define EFUSE_MEMORY_SIZE 0x177 +#define UNUSED_SPACE 0x8 +#define ZYNQMP_NVMEM_SIZE (SOC_VER_SIZE + UNUSED_SPACE + \ + EFUSE_MEMORY_SIZE) +#define SOC_VERSION_OFFSET 0x0 +#define EFUSE_START_OFFSET 0xC +#define EFUSE_END_OFFSET 0xFC +#define EFUSE_PUF_START_OFFSET 0x100 +#define EFUSE_PUF_MID_OFFSET 0x140 +#define EFUSE_PUF_END_OFFSET 0x17F +#define EFUSE_NOT_ENABLED 29 +/* + * efuse access type + */ +enum efuse_access { + EFUSE_READ = 0, + EFUSE_WRITE +}; + +/** + * struct xilinx_efuse - the basic structure + * @src: address of the buffer to store the data to be write/read + * @size: read/write word count + * @offset: read/write offset + * @flag: 0 - represents efuse read and 1- represents efuse write + * @pufuserfuse:0 - represents non-puf efuses, offset is used for read/write + * 1 - represents puf user fuse row number. + * + * this structure stores all the required details to + * read/write efuse memory. + */ +struct xilinx_efuse { + u64 src; + u32 size; + u32 offset; + enum efuse_access flag; + u32 pufuserfuse; +}; + +static int zynqmp_efuse_access(void *context, unsigned int offset, + void *val, size_t bytes, enum efuse_access flag, + unsigned int pufflag) +{ + struct device *dev = context; + struct xilinx_efuse *efuse; + dma_addr_t dma_addr; + dma_addr_t dma_buf; + size_t words = bytes / WORD_INBYTES; + int ret; + int value; + char *data; + + if (bytes % WORD_INBYTES != 0) { + dev_err(dev, "Bytes requested should be word aligned\n"); + return -EOPNOTSUPP; + } + + if (pufflag == 0 && offset % WORD_INBYTES) { + dev_err(dev, "Offset requested should be word aligned\n"); + return -EOPNOTSUPP; + } + + if (pufflag == 1 && flag == EFUSE_WRITE) { + memcpy(&value, val, bytes); + if ((offset == EFUSE_PUF_START_OFFSET || + offset == EFUSE_PUF_MID_OFFSET) && + value & P_USER_0_64_UPPER_MASK) { + dev_err(dev, "Only lower 4 bytes are allowed to be programmed in P_USER_0 & P_USER_64\n"); + return -EOPNOTSUPP; + } + + if (offset == EFUSE_PUF_END_OFFSET && + (value & P_USER_127_LOWER_4_BIT_MASK)) { + dev_err(dev, "Only MSB 28 bits are allowed to be programmed for P_USER_127\n"); + return -EOPNOTSUPP; + } + } + + efuse = dma_alloc_coherent(dev, sizeof(struct xilinx_efuse), + &dma_addr, GFP_KERNEL); + if (!efuse) + return -ENOMEM; -static int zynqmp_nvmem_read(void *context, unsigned int offset, - void *val, size_t bytes) + data = dma_alloc_coherent(dev, sizeof(bytes), + &dma_buf, GFP_KERNEL); + if (!data) { + ret = -ENOMEM; + goto efuse_data_fail; + } + + if (flag == EFUSE_WRITE) { + memcpy(data, val, bytes); + efuse->flag = EFUSE_WRITE; + } else { + efuse->flag = EFUSE_READ; + } + + efuse->src = dma_buf; + efuse->size = words; + efuse->offset = offset; + efuse->pufuserfuse = pufflag; + + zynqmp_pm_efuse_access(dma_addr, (u32 *)&ret); + if (ret != 0) { + if (ret == EFUSE_NOT_ENABLED) { + dev_err(dev, "efuse access is not enabled\n"); + ret = -EOPNOTSUPP; + } else { + dev_err(dev, "Error in efuse read %x\n", ret); + ret = -EPERM; + } + goto efuse_access_err; + } + + if (flag == EFUSE_READ) + memcpy(val, data, bytes); +efuse_access_err: + dma_free_coherent(dev, sizeof(bytes), + data, dma_buf); +efuse_data_fail: + dma_free_coherent(dev, sizeof(struct xilinx_efuse), + efuse, dma_addr); + + return ret; +} + +static int zynqmp_nvmem_read(void *context, unsigned int offset, void *val, size_t bytes) { struct device *dev = context; int ret; + int pufflag = 0; int idcode; int version; - ret = zynqmp_pm_get_chipid(&idcode, &version); - if (ret < 0) - return ret; + if (offset >= EFUSE_PUF_START_OFFSET && offset <= EFUSE_PUF_END_OFFSET) + pufflag = 1; + + switch (offset) { + /* Soc version offset is zero */ + case SOC_VERSION_OFFSET: + if (bytes != SOC_VER_SIZE) + return -EOPNOTSUPP; + + ret = zynqmp_pm_get_chipid((u32 *)&idcode, (u32 *)&version); + if (ret < 0) + return ret; + + dev_dbg(dev, "Read chipid val %x %x\n", idcode, version); + *(int *)val = version & SILICON_REVISION_MASK; + break; + /* Efuse offset starts from 0xc */ + case EFUSE_START_OFFSET ... EFUSE_END_OFFSET: + case EFUSE_PUF_START_OFFSET ... EFUSE_PUF_END_OFFSET: + ret = zynqmp_efuse_access(context, offset, val, + bytes, EFUSE_READ, pufflag); + break; + default: + *(u32 *)val = 0xDEADBEEF; + ret = 0; + break; + } + + return ret; +} + +static int zynqmp_nvmem_write(void *context, + unsigned int offset, void *val, size_t bytes) +{ + int pufflag = 0; + + if (offset < EFUSE_START_OFFSET || offset > EFUSE_PUF_END_OFFSET) + return -EOPNOTSUPP; - dev_dbg(dev, "Read chipid val %x %x\n", idcode, version); - *(int *)val = version & SILICON_REVISION_MASK; + if (offset >= EFUSE_PUF_START_OFFSET && offset <= EFUSE_PUF_END_OFFSET) + pufflag = 1; - return 0; + return zynqmp_efuse_access(context, offset, + val, bytes, EFUSE_WRITE, pufflag); } static const struct of_device_id zynqmp_nvmem_match[] = { @@ -45,11 +211,11 @@ static int zynqmp_nvmem_probe(struct platform_device *pdev) econfig.name = "zynqmp-nvmem"; econfig.owner = THIS_MODULE; econfig.word_size = 1; - econfig.size = 1; + econfig.size = ZYNQMP_NVMEM_SIZE; econfig.dev = dev; econfig.add_legacy_fixed_of_cells = true; - econfig.read_only = true; econfig.reg_read = zynqmp_nvmem_read; + econfig.reg_write = zynqmp_nvmem_write; return PTR_ERR_OR_ZERO(devm_nvmem_register(dev, &econfig)); } From patchwork Fri Feb 2 11:38:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Praveen Teja Kundanala X-Patchwork-Id: 195837 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp378276dyc; Fri, 2 Feb 2024 04:06:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTTgbaP3AF6b1F3KdamR9TkkaOtsRtpn31oEApXQwSMroXfCirEkhg/fHXKLFvLxSFQCrb X-Received: by 2002:a17:903:124d:b0:1d8:a93f:a5b2 with SMTP id u13-20020a170903124d00b001d8a93fa5b2mr8864801plh.12.1706875587715; Fri, 02 Feb 2024 04:06:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXqhXrlfx90hooCGWPcFF91y+8xqOE0gU9GcUDBLOrbC1JAJp43uTj4W4UQ0jYsAZI5DdgRVlqKs45ANgHzsqcXhjb5ig== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id jg3-20020a17090326c300b001d8ac7882b6si1558060plb.561.2024.02.02.04.06.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 04:06:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49770-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=NS7Chs2L; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-49770-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49770-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 C68C0B2AE1C for ; Fri, 2 Feb 2024 11:41:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68B651420CA; Fri, 2 Feb 2024 11:39:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="NS7Chs2L" Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2044.outbound.protection.outlook.com [40.107.220.44]) (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 49960140797; Fri, 2 Feb 2024 11:39:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706873965; cv=fail; b=Y8EF5iqzT6PAuJ2KwGn/+NJ7Td2MHjpOgpuAgGfxQMZwOdYTKbZb7RWrjgs12LZjpdeW1fqm25ummTmlnVT8gO/yojw2KNPD4Cl/5wyVYHzaqUMwhDvIzzAjhZoCxuoLT1ebKnfoZMjxBWpP7zU+x6Szo4c4lWl7yGzNGSbv2AM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706873965; c=relaxed/simple; bh=WFGcpeS7ktarcaNtMAN7aQNrUMbtH+5LShTUeF86Kaw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PKGoZ0ACvjAYOsRNblflP63LSW40Sm/COECxJ2SCAdDZgzAUw+IK8z6T9J1OBZcqEQSGSbCtsAfF9IVIVR03F1e651hpoN8jqyj+MfJdvsXgF2Jnl0PugBoEvpncIh4EXQdx32bQXRDMNxs/9Snk+oapbINj3Fp5DWquRxr4FI4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=NS7Chs2L; arc=fail smtp.client-ip=40.107.220.44 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=cP9WYoFlFWTSl7wNdPrzZ/bovf17q8AxU2tKzcPy5jAsKCQ6+81/W5sHijNWIch6sC0SdkQ6IX0dxawhFsSJ/SZLdu7OpaKgESnZJICcvTFQU0NB8CAohs3DPhSklRhLChzpw0TwRaXE9EDp89L5tXu2m8js223yUEpeYWHqHqTsCU9cJkICdSK3Z8wOeLWZhlVuXuXnAXqOGTRJnWSi5VQwbNRz3Gd+SOhwLFjleDaSzTN9C1++fsVIpoLGhGxVVALHjcB3ekzD2DAKIk7+CJ/6eRXzPYErIqSxjzLQJUPeiWA/lVcbzgRgn8GSqxScrkjKaYjRKCe3JvA3hctJlQ== 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=FZz7eupGvLzz7ZD/jQ9T923lPBviWonhFPdvhDFGwpU=; b=XYHm5YGqLunShVtMizqSDd5uFjneGxFeiskAEx3pBjvUZQVraJeZkMWG4pWkLa7ErqB3NGC+JNr2OOjgCyQm7Hp4qk9AueUx+LET0M5TDacAZkSaTSfWjgAHZjD/cqwrEzbx021490n0aWFPrVmYKk2kmFq+RVJmifUeLNMnxdEnGFse+CLXk4XA0OE2JhkNjpoDbx+sp56fRSq0XNuCdDfTMXjjRix8g3ZGdl2wnXVfWqTGVEt+Gefdy51zlyJt254V68qj4EPkFCt0MHhl5hWiLw2RKhbUaso1BfzWzzcqhbcPr80TohzBkA/W+fG+y3YKFJBbZ5y3YLOW1CVZbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.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=FZz7eupGvLzz7ZD/jQ9T923lPBviWonhFPdvhDFGwpU=; b=NS7Chs2Lu3oMJ0GosBwMWKISogArgTucVWPClpHB+X2hjgbcDBxj3C6pwF0i9s1Om3WdmyrKNMwdYe7PqGNyPqS4TgVS5CiwYv7+IV1m7mYUebyaNoC8T9VMd0563sNdtEYqRaerVLO0AQ0DiAW7RLQRFI8Sh/1y0m5dh4JgxrA= Received: from CYZPR05CA0012.namprd05.prod.outlook.com (2603:10b6:930:89::22) by MN2PR12MB4287.namprd12.prod.outlook.com (2603:10b6:208:1dd::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.22; Fri, 2 Feb 2024 11:39:21 +0000 Received: from CY4PEPF0000E9D2.namprd03.prod.outlook.com (2603:10b6:930:89:cafe::86) by CYZPR05CA0012.outlook.office365.com (2603:10b6:930:89::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.14 via Frontend Transport; Fri, 2 Feb 2024 11:39:21 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CY4PEPF0000E9D2.mail.protection.outlook.com (10.167.241.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Fri, 2 Feb 2024 11:39:21 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 2 Feb 2024 05:39:20 -0600 Received: from xhdbharathm40.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; Fri, 2 Feb 2024 05:39:18 -0600 From: Praveen Teja Kundanala To: , , , , , CC: Subject: [PATCH V4 4/4] MAINTAINERS: Add maintainers for ZynqMP NVMEM driver Date: Fri, 2 Feb 2024 17:08:43 +0530 Message-ID: <20240202113843.17999-5-praveen.teja.kundanala@amd.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20240202113843.17999-1-praveen.teja.kundanala@amd.com> References: <20240202113843.17999-1-praveen.teja.kundanala@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: CY4PEPF0000E9D2:EE_|MN2PR12MB4287:EE_ X-MS-Office365-Filtering-Correlation-Id: a33eb591-8cf6-4ab3-7296-08dc23e3993b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h3zovQj89Vnf/0+pA/BLM8oPxrMIxJCfhMRGItPNVGoHWzWkz4vlWz09b3UbIPki4L2KM0194c9HNHqYF6ShXzFCnh1rzmn9zNg5qB4xJjFo1HPltdkiUHyAg83OyEWDKvrwfuvt5rV/NDUWsHcSNfeDrPV11mz8JD6q61/ld01HcVu1xv6UTBU/SvBOz+ztKFbJ2QbAd24bUcrwCoqYPnbdFL7L+oP7RDTsOQUPn8K5EZyEF3KMP8OI8kP8Ndy+fchg4yS+kuru5USCvATmrFocF36ZNDeRWUq8ty05/xnsSKj07nENEDaybuugGBLr15y6b8y9LvY/sNcslvug0YMsgfwLCgZiKJKj4Ht5x0GKQccRbYTxisSpNn++YoaNseeAt6t1XoSorRVA4++uxfy/R5pLr8lqw4kYjS5g9G8mH6D9EuoHWG/S41qd2e7EON224w59BKXbEEPsBaxvmdIyY14OYlBYgaJZeVoK3ldxVj0i8pz+jKWAZUjFozKwIkn6gNFKSfOpZD09Q9vQdpEPzyWBGaKcfdk00hEvQEbYvEnpj4rsYtVSWp/fRmKzpCdyWisq/ivEmE4UUChYKJEsh0iq+3P1yMuo/cAKFN26NnFkmrKO5HlvDlGUdJX2isogSJz/E8jMBjULcMBlx/AhnGudx0ZDt8uKZflCPrsCks0DA88I0mC3M6rTm1CDO61sqcLJv3XaUP37uZ1MrXHAkb5aLD4uqsZHCMdlqTiADtW4liEeuXlj82SaVUgDPVm1qWXe1yRaXnEH/BRrvg== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(346002)(396003)(136003)(376002)(230922051799003)(64100799003)(451199024)(82310400011)(186009)(1800799012)(46966006)(40470700004)(36840700001)(1076003)(426003)(336012)(2616005)(40460700003)(40480700001)(316002)(41300700001)(26005)(36756003)(478600001)(356005)(6666004)(82740400003)(47076005)(81166007)(36860700001)(103116003)(2906002)(86362001)(8936002)(70586007)(70206006)(8676002)(110136005)(4744005)(5660300002)(4326008)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 11:39:21.4188 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a33eb591-8cf6-4ab3-7296-08dc23e3993b 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4287 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789787963583163991 X-GMAIL-MSGID: 1789788776233066020 Add maintainers for ZynqMP NVMEM driver and driver document. Signed-off-by: Praveen Teja Kundanala --- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8d1052fa6a69..b3103e03015e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -24233,6 +24233,14 @@ M: Harsha S: Maintained F: drivers/crypto/xilinx/zynqmp-sha.c +XILINX ZYNQMP NVMEM DRIVER +M: Praveen Teja Kundanala +M: Kalyani Akula +R: Michal Simek +S: Maintained +F: Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml +F: drivers/nvmem/zynqmp_nvmem.c + XILLYBUS DRIVER M: Eli Billauer L: linux-kernel@vger.kernel.org