From patchwork Mon Apr 29 06:28:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 793156 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2070.outbound.protection.outlook.com [40.107.14.70]) (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 DD8F71758C; Mon, 29 Apr 2024 06:31:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.14.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714372307; cv=fail; b=Tg0dOa7/tBJaSKVFHtQnk791twQAb5h/d4ZnEyWvD+VT1lX5r7ZrW1ZSvJrxZUPVrPATdvxVgnojJQyvDGGNFUYMSG/Cljeetb/s/fqT9u7P9CslBVaf2FXKp3yGqKaHReYp2zO0hP0s9/bGe+NrL1oyMMTCyGdT+vIT+WZmJ14= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714372307; c=relaxed/simple; bh=ILCWX4RI5bLypu+q7jOillTXLN9PM6fM5Bjf9Hqihzo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=CrmbEBlJGaCgyx/9uIIjKW8uxcHNTKbvd65BWXUQLeQQ1LGiUBu2AylwnPdKTstvQJT1+EDMUWnQkJBczEvwevzjuRRLjRvs/agistgJ0gPmoTmb6kJ57T8yybwEHB/dFxQ8RFcXpQO8+zgPP8fnaSMmtarkFsSyW87y/kt4Mao= 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=eaeTOZdl; arc=fail smtp.client-ip=40.107.14.70 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="eaeTOZdl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hZS2FlQmmGv3C7x6n0jUk/lfaM5T2VgqFe+ZyYbiaCfr3rYuqQmsJG77kk2raAKr3RhW6NTNUMkiGi0+UMgkfSQvpD6iQ4mbALHNOGysanWoFTlEjoJlX4g8qCryd7n350upTbVwWtHuTAGWv9Ef/j/PuXGcq3xRzHRVYkrRzRXXSpMw6iSH2rbl42PZvBecQ9s8VpzMWNT3eBdKuM5wWsA7U/zsSTMHFULjFBvZkCHDMoNKSIrIYcWr8DRfja/I2+TDtbv1QU+TmvYCsMJTIF3E7+tR+cKGDY5JXMvGxDyHkf/rz11PRyl33N69q3ef/oVTDF7sxurn7uMv6uL6IA== 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=HxIHsDRBWnpo7+015IIgbQ6xTNuXTHMcX4yNlVG4sawpHTdRQvHwYk3gj2Gqmp74TAEp2XQswxDjgdWWn66mUeSL3yT6d0zJdTh/JEh6se9ekURp8usebZwWK0FeR7SZOcp87PUF3v/p0XVE8fUMEC90lucZoaHiTwt4YdaejHuLUyMnN0jMbYGBeMfhMNu8OYvnqG0i7fnDGF487KsD4Jpvb0IVbQNNG/MTDU+9T+xi+N6FmikJ8+KLgKnbgr7rllz1OYEoxbH9vRxLsqpCez5B/kz6vNtEI46qJQhlG2cB2iuL7UixK22VDodV+nrtbQPjYUdl5pWRBvNfBqwY4A== 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=eaeTOZdlDN056p4LDNJtVGWxGlcmKDF3dbb55mSd4RnA4MSZKIz1rqABAQsI0l12JuMKbXCcCVr8XBuD9CGCW3cGJ6yQYqopGKtcNMaa0BooLDmCRl9h+cyW8xKt6dVRvaEXmoUJrJM8mGg1UgDuJNpakEhcGnu2oP2wiobsd60= 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 DUZPR04MB9919.eurprd04.prod.outlook.com (2603:10a6:10:4d9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 29 Apr 2024 06:31:42 +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:42 +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:54 +0530 Message-Id: <20240429062855.923595-5-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> 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_|DUZPR04MB9919:EE_ X-MS-Office365-Filtering-Correlation-Id: 4677a5ce-f89f-4bc1-afad-08dc6816089d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|52116005|1800799015|376005|366007|38350700005; X-Microsoft-Antispam-Message-Info: vw5t76QsUehL0grWk8848Q5Ag6iGt9WtOPcubuiVlWt/tLzoNyivV5+JG9dAypmbBgSYq4Bfbq4FNBGaIGGjkaU5iufXlLgMh+h/76gw2qeH04MbLInAbydCnZ5cQBUfZR3F3k3KRVhAzvtGzZGrwq77OR4RVaDuJ7lxOAde0sN8G22sEZ7R410q8NDDeBznsxk/gTrUKurCDtpU5yHNO7eJumUIsAhhriEcgrs+S/Pu71F87oEDXX7nSp6tkfxeahZKd8WJOhfsX+XJX+scJVICbeQFx5HkvocMTCaSRHjfzrar9yG6wHkVCxVzDweRtg1WBpXTtQ30GIHWYmMLLJGQd05gupjLTPCQ0+aEnoDOhCpqB+C2RFbuMze+wwmihmZlZ120s916C2X4npsFXNbUvhMho6+OIMC6Jk/s370iNq3gQYJ1qZxbTNK43C67ROH6gTnGHjIGiFEExZjj+/tl/rOLNCTs2arYSm7DSJHcOhaG1FggkPh6exujb3JJ9PQkepC+fxurqzypZYzwAZJp2ebEXYb2DISE0nH9rrvGjWItJkrOIHUnVpVjep3tYlaLv44PUP0dayz2FLKsuLZWPAq3FZWieBmXO3dJVPT2L1klKZ0QNQhkyBdANE6BDKgOlmeiZxP5PvJFvw+mJFoYzUN7Z7EEG3nYMpalWlpFYlONAMkQ3KFUOYO8LwOV/AEpFhwGXXvqHFsQXOUbSu2sRPP65sHsCPJ9q/2HaG7SLsdqU8PLnycCFNKGzv2uXDXb5pBHRtHz4hPkDs5H8D+XkP6XA3/6gBLn6srmJGYRmR5ss4xXWkCLg4ELcZLphyuGM5E9fsQJPpj9xrRi57QDaNaNcCFjG8poP2CTm1Li5EdUC0KzBLMdI36fv7LiM4gkDjcQepVkU+F/v3P8R55btA+ZM3oEKNrC2sw3LvTFNrToj9j0yBnVI3E4MKAdS/pI6PbhpQ8URwSuglzJ1EdwjoMFLzUqP7qLg8+dfs5swBwY36yX2A/loh6nJ+a+19Mb9J3opyBShO32MzZAEIE9qXwIWQ5dWtfi7kpDiTS9u8R6H9trN07/F+jsYFUsX9WyFlqKc1cOc+fWMUeuugEIWc785E5RfIgWnygcAaujqipu6dxBkBFDiI9nH8f8M2Jl4rp96phnXXLqrgyiFeMN/Ukb8CJ63BDD1fSnei62kFdDV95qi1vwnxr73+EotTwom4ZLWfoXcTDK0E/rHDgCzJWZLv7jnTl1sGdU7J36eI5uMN7mvYAp2WG4WXccRLqKdp6UlFyZ6F9hEloV2sfQdUAQwXr9IWFlODZY+9buLggQfsXZZTnaRGxge9jM14KszEEYlNCgT5qtSRNPhg== 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)(52116005)(1800799015)(376005)(366007)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: clYDG54REMKOlUghuSJJFzde2k2bdiiDd0sc84DYDCnw3a5NT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HbCd4FO92XMkHTQYpUYiWwsS5pV7d1z1uVIkuDSCrJ+WPFplJsToAJ668WAZVcrBeGO+xVff2mHZPUSrH5TvvIYKcvuC7NlF4R1EXTIvpZOlI6lKVYzDCT8CfnA/Ha9MTxTfz7bSlKsLqCeedRtA+pL+kytbjuY9SbVUqLbzE/tXMmKzjlpDJbg9ArFpsuvUFjzN7f9X9Mm+UFVmLFe8RfMPFR6LflFH78XCbtB7DZKQFpnawrKTFAuldkvvXN61hiRzVkMEbpNjWvgZHmyN5YSUu+7nMKGe1k1iFvHAQHg3Eb7wd1P5pZjjDeNZkyjMHKZ/ggEIzO04m8On9vFOnN522LkVoEEss5+2gcTrD91VG6Iv60rkOY83Oq3F8yZ/dM0gidAibFYwSDUSnoNuS97CTYg0Jor/KIqKefObOFMDB8n3N+qvhqMF6oNjSo0x3xZhHp41m4stwy5/XVDyI9kGv X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4677a5ce-f89f-4bc1-afad-08dc6816089d 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:42.4576 (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: 4LQVceg/6jNIgztsw1eubob0IVMhIdArmzx/0B8/3G+bJEkEJWBR54BmOyRgeXBzZTcEojkTCrrhxYi769KrmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR04MB9919 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 */ }