Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1174208lqa; Sun, 28 Apr 2024 23:32:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3/axzRniB5TU8NZJSp/fjsrLW+58kw9csujDTBqpSKcYskUX+LC7p/zQ5X1StgDsYvSS3RUBFXfSXQ9+KQRzLAxRc/+q1GiPo/oLTZQ== X-Google-Smtp-Source: AGHT+IGyOeNvbN+VEqB6yuxM+ICHovYGpl9wyCEngcLTtKsJYd+CqZscaSxYy/AEBkvvHp4Gc396 X-Received: by 2002:a05:6402:5204:b0:572:68d8:dc37 with SMTP id s4-20020a056402520400b0057268d8dc37mr4772134edd.30.1714372376878; Sun, 28 Apr 2024 23:32:56 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f6-20020a50d546000000b00571b9a6254csi14234883edj.291.2024.04.28.23.32.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 23:32:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3920-linux.lists.archive=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=@nxp.com header.s=selector2 header.b=UQCBaPJE; arc=fail (signature failed); spf=pass (google.com: domain of linux-crypto+bounces-3920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.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 28DE61F22071 for ; Mon, 29 Apr 2024 06:32:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22B4A1773A; Mon, 29 Apr 2024 06:31:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="UQCBaPJE" X-Original-To: linux-crypto@vger.kernel.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2049.outbound.protection.outlook.com [40.107.7.49]) (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 E4E6C125AE; Mon, 29 Apr 2024 06:31:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.49 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714372310; cv=fail; b=GEm8SQPzWyV9zj09NGHPxgAljmHhMQ+PtYhrIpRfU1lbtFLiK7H1f0KJRYBradSoJIMDXnT7jyYDvD47h3fvdeqwQArAVo3jVcCOag0w1wz3JrlId23uHC+61Ee+hLf4bHpQbZRg16axoEsk/+Jck3liZAZw/JpdlkCJEYxWDmE= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714372310; c=relaxed/simple; bh=ILCWX4RI5bLypu+q7jOillTXLN9PM6fM5Bjf9Hqihzo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=rKgGLpu9iO+uWHFhNKuz3zWFqdSEC4zRQHa06PiwIpoSkaQpvM3GKzKl9fN5pQ3I+ttO5VJ83lNyESE86xwoqN3Y6jSmw/gIu7TWxuFgM0SEnj1JzGTVorRgqlecyIxIINASNWEK2OpXb+L1J43yXGYr31ReLViD5Wwh33BpdaU= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=UQCBaPJE; arc=fail smtp.client-ip=40.107.7.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dXZzTvLMZSVmMLeVzURW+o+64NGwDpwu7DuuFxnC/2RiBQmOwfDhy6uEd2ybTj4Ff2iAzJ53NpMg6c7EsTt5Qw9ecVngICyXUvanPs6pDrBCQ7fVDFRZkkXDKcZNr7/xjkbeDpDyRCwt/wLog/yCG+e5PRTGOz2g68drMhG1iN8nu1aBTcfPm5B+JiK8tBI9CNUN/m1+22dhbnv/x5kKG0c1EgRXGBEZUP5GRcKbP7GYi/mbrZRJp7qrdAngIz34BWAis/kNOYJOpE+W7mnZW7vRMfA9j3MhstbE/BlMYdCfIAOiDHbQxo62W0UY4G6xVC9NLjCbNYPrvDNSqMyqVQ== 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=tWHZk3m8zovg7GLehv8w9ehZe3UBbtoFImeKn+T3wcE=; b=JBQd3LbQZNiPtOktA7hqEGTRLKG7+HJ1AbhCkbJjCo0bUGyBHfJ5j/EWU4n36W5qu1LvWgSNtVLMsITnWQUm7Oc34oYoZhMbMZhp8zWDIrBV819YKtWJ9SdJ3sNSzdgfx3IFoO6jD4Qrq/pquyAiRc9f7vtaOMdIstcGgyIXuPRjjZHDlNXbY/Fv981z6E/R8TSkWN6pfKQj/MbhP8PHSz3nETbxCFe5+ljXgaV4X8rZx3nCnn7O5mBDOvOjMk7dpQM1tJ5F/ddlaCzqyGVtc9lt4/GUUjg1R63pJzsnv/w549k7nI6/SrMBfqkQc9YBglD6dKbAw5R910vXzaxF/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tWHZk3m8zovg7GLehv8w9ehZe3UBbtoFImeKn+T3wcE=; b=UQCBaPJEvG/JHVyNZqZWRDnYtaG5VVsqtgaS8Jpyf/EdPf7HOIV4WygK12BEyHEddSMnlIdz3z6G3ElkF7Y/uxPjA9fzbUrEcSVgMDFgMRrcVvyeZuNK/jizF8+OV7LJYoFKgfo5zmVh079sSrjxAz7yIpvuei0CVFxzH61olMA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB8604.eurprd04.prod.outlook.com (2603:10a6:20b:43b::21) by DB8PR04MB6859.eurprd04.prod.outlook.com (2603:10a6:10:119::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.35; Mon, 29 Apr 2024 06:31:46 +0000 Received: from AM9PR04MB8604.eurprd04.prod.outlook.com ([fe80::33cc:db75:c850:63a4]) by AM9PR04MB8604.eurprd04.prod.outlook.com ([fe80::33cc:db75:c850:63a4%2]) with mapi id 15.20.7519.031; Mon, 29 Apr 2024 06:31:46 +0000 From: Pankaj Gupta To: gaurav.jain@nxp.com, horia.geanta@nxp.com, V.Sethi@nxp.com, herbert@gondor.apana.org.au, davem@davemloft.net, iuliana.prodan@nxp.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Cc: Pankaj Gupta Subject: [PATCH v4 2/2] drivers: crypto: caam: i.MX8ULP donot have CAAM page0 access Date: Mon, 29 Apr 2024 11:58:55 +0530 Message-Id: <20240429062855.923595-6-pankaj.gupta@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240429062855.923595-1-pankaj.gupta@nxp.com> References: <20240429062855.923595-1-pankaj.gupta@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0008.apcprd01.prod.exchangelabs.com (2603:1096:4:191::10) To AM9PR04MB8604.eurprd04.prod.outlook.com (2603:10a6:20b:43b::21) Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8604:EE_|DB8PR04MB6859:EE_ X-MS-Office365-Filtering-Correlation-Id: f945166f-1112-4f6a-feb4-08dc68160aca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|52116005|1800799015|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?bnv8AstIPHCz76BLa+kuRaxebVkdGJOAuy8gQZOkwslyE36WcUgdqXgG2CL6?= =?us-ascii?Q?94weaRkPMhSeU8jAA7TOFaoYlVgiePaT0YUaMB1i3y6f1Cx0z7txPAXwBCcp?= =?us-ascii?Q?r6AoW6KgwnfgvOMeNvlf7gANTbFDncmbPa5MyPtJTDC9pQpzp15irNaK6Gmf?= =?us-ascii?Q?7Wny3W1MdqBZjQ5w+lqc1IC9T0WRQs7aMF5jG3fxG8icnu6y4IJrOmeNIM7o?= =?us-ascii?Q?gYJ2MrFtpsqwQrDnlKiCTeNQZPT1VmgophAvRo7RKSHw47vVg85koeBTsty5?= =?us-ascii?Q?+EPq+qVAhqacpQmbHzpex4Fb/vKVWQ5eA0hvOb+dXi+vaNj489pH53XB+MMj?= =?us-ascii?Q?8twkys11+W8670u1wvy+5ebcPBtMxOZZrMlx/7jflh5yTwbi+P+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e3NYg5NHKVLlsQVP6a3Nq6YG+JnP8bxci7Ymh?= =?us-ascii?Q?z06SMtmVfhzpmECNImiwYU4Dy2yqwTcGl+wloD4J6iI0Hw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8604.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(366007)(52116005)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?rBB8W4eDQDSnXaeUc43a6QWUlBOh7LTTefYVkzp3vgeCC6PIoTMTx/Fltq4/?= =?us-ascii?Q?stYQFrzYmaoaknCMM7kNxHoFFzGwy4zA0wFWVOi2We18NXepXQ6rjj0XJK37?= =?us-ascii?Q?2gDZvOzpuA9uyZyPjSAPH6POQWLW9ujHrXzgurFu2W9+naaPV/IRjlQBwbf+?= =?us-ascii?Q?zCpxXQj3/UP35ePPrShi6zOvIFw279/yir9odWMbokoI+10I9x27SQC8BZi4?= =?us-ascii?Q?A1BNvpbJf6CHNqz/GCwoSPQ7NZpyc/p7YWXCDBmRDfaZ6ck3zXkptvYdWwuu?= =?us-ascii?Q?C8KkonoiXskhb1MI2TrUN9YswZfWUpmizNEkyf9wuTHCBJYtsAgYRKnjuTmR?= =?us-ascii?Q?BjbnG8B/TcHECc5WAY39yM4b/8+wp73HEEfkXN1YrBclymZ1/LiqRYVdrlX9?= =?us-ascii?Q?PQe2vtxTK7/UL+6MOQolbh4+HyzyE1eauGUWYg7qvoQveHJxgtqRBnO3VNzj?= =?us-ascii?Q?qcMjjuh8NTH1bezTDxcHZC80oINTaIaiyZmBLcF0euNGo70QQsn8/jZNjX6z?= =?us-ascii?Q?nyxcXX6AmhN+h2NuMQMJzrw0owQyKW7FHRuRNg9pro8QM8BjzrbSK0D9RjfJ?= =?us-ascii?Q?Mf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sCM?= =?us-ascii?Q?oCFxwjCYCNfI4K0hRtiJeCNnCk4M5lfEusWY9rdUL35776xtUi99DW+I4c7q?= =?us-ascii?Q?BIvSUoYuMc3f/LXv7gqwlqiNVfwoYjeVN/u4PQA+?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f945166f-1112-4f6a-feb4-08dc68160aca X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 06:31:46.1326 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aNEfKaRLWhJWSKD84clbE9YIQ71ksUHqgclGzIGX3OvIbSNWGh/KXarcFmv33Ho9lb8s+MYPld35l6gdqCdL0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6859 iMX8ULP have a secure-enclave hardware IP called EdgeLock Enclave(ELE), that control access to caam controller's register page, i.e., page0. At all, if the ELE release access to CAAM controller's register page, it will release to secure-world only. Clocks are turned on automatically for iMX8ULP. There exists the caam clock gating bit, but it is not advised to gate the clock at linux, as optee-os or any other entity might be using it. Signed-off-by: Pankaj Gupta Reviewed-by: Gaurav Jain Reviewed-by: Horia Geanta --- drivers/crypto/caam/ctrl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 02363c467cf3..bd418dea586d 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -563,11 +563,14 @@ static const struct caam_imx_data caam_vf610_data = { .num_clks = ARRAY_SIZE(caam_vf610_clks), }; +static const struct caam_imx_data caam_imx8ulp_data; + static const struct soc_device_attribute caam_imx_soc_table[] = { { .soc_id = "i.MX6UL", .data = &caam_imx6ul_data }, { .soc_id = "i.MX6*", .data = &caam_imx6_data }, { .soc_id = "i.MX7*", .data = &caam_imx7_data }, { .soc_id = "i.MX8M*", .data = &caam_imx7_data }, + { .soc_id = "i.MX8ULP", .data = &caam_imx8ulp_data }, { .soc_id = "VF*", .data = &caam_vf610_data }, { .family = "Freescale i.MX" }, { /* sentinel */ } -- 2.34.1