From patchwork Thu Apr 29 14:02:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Alice Guo (OSS)" X-Patchwork-Id: 12231361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33851C433ED for ; Thu, 29 Apr 2021 14:04:43 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 93F9161400 for ; Thu, 29 Apr 2021 14:04:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93F9161400 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=oQklOA2kLVkH433pb7kKwPHftAoTNB+jg1jBD+U64tA=; b=LunSVGR6obztDD841sbX7MdUzU czWWtFj70x5yLLlTdTNX/z90mW1Qwa8E5GDopnXUOCbOKzl1+I4cLN2XehZ5AIf9g0NZi5Vg5EqMt 1RxWwKtXPxGs2OFb9W1aQaZyfHjBIDJCFrAMQdzLWy0/28EY+vZzD9r+aq8Yysd7r/hAo4IHP7tEj YF0Lx7qb0AgPx8MMFIxtROjogqkQ6rW7g46W3GLRntFsKwFBdHlPXkD2irS1PEY/oR9jWqE3S+BGh VAaZprVNYRI77rI11W97u0aMhqvK7PjuaqgYiKLm4k2YOwjpgBJEgs3c0FPCu2APHs2HPgwaaGanp ZB9vo0sw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lc7FY-005kux-QS; Thu, 29 Apr 2021 14:02:41 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lc7FV-005kul-Nr for linux-arm-kernel@desiato.infradead.org; Thu, 29 Apr 2021 14:02:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=MIME-Version:Content-Type:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=Eow9SJEOpYXenpeP2qKJNxF9qUWyaoyiFaLEv306eWg=; b=hcOVxJtb+jrvk/EDFbxmZqxj+d 18YzOgVBCC+ipf3ugb/WA8USoCS0b7lDXgAdKdSGKy1Nt99SuSbfTi97oAoblDZorZ1yDpiGeOdEC P8E0gLYL2F3xDczh/JJ9x9vONJ76WwGVJTjSwfH2XHQxlgfEblVdvYsntsTt7qb2aeek2Ssewgc1g Avh6hK1e6uBWJ7nb9dRq3c7HXyK/nKoR1nIo46+fCZJg74uf5MIYEKx3unWmYD6Yo7bNA3MbZUd1E sUEH7XsGzWMBviBiBACyPv8z46jfw5GnrkUR25ddhL1s/0aaJ7uDSM3nntwuLVDkxBAt5h7KMg6Ck ajMmU3Ig==; Received: from mail-eopbgr60045.outbound.protection.outlook.com ([40.107.6.45] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lc7FT-000fYd-0H for linux-arm-kernel@lists.infradead.org; Thu, 29 Apr 2021 14:02:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TXcSr7ZR14UEAogD7g2cAxmTVsHuO0ewHzhgFLLj9gnnGzKFOJ9m5lo3VrWtMPYL5D9A7o2yJil/JMXxsuvnP6ze3jmUGUjONBWkUQPQs8hosZsXViJ3lj33sJ13n//Qv8iYvQSU8m9WMKkl7l3pxNVDjqLI/ldVfv6885BjSaxBFv2gEpd68KwSqGCpf5gYdKXEWSIf6LLMnTg2vg7o8xN6+v6HzjrVzPjWmlO6NSITQYQwZu+03rknt5eMlfjbgJgwX11rJebStJb5QtLYryrm9x7jKaJyByldTnXaDttQ+K/g+54os/eTAWafS7dfQs4mOXbUyLu7/VoBfzl7Sg== 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-SenderADCheck; bh=Eow9SJEOpYXenpeP2qKJNxF9qUWyaoyiFaLEv306eWg=; b=n24vFH4HomCAix5HsPkwu2Mv5OgqUzSHGwrq7oqdTM8XsnhPbqRczSdC5OU4eLlpCWudVmzt5hsTGAnLyCsKWq1cBJRLRbwI4Qv8/A9PDI9RL9tJy2h0MdEiYWjBrCpIkZkZi+3hPci6Z6jEfvyfoop7aE7deu14z2Jh4Hclr7UWSLTVpAgSMonvYPRtn9UWTmIJNoWgyP70kaTJuBx1xqYqJzcI59aDeGYpb04w0zUw6TTIhgI85Tw5OCLf3aMQ1RRK2TssGqrv2G6KYjpf8WswrwaWA8583fJUuk+KhmXcLu6uoMiF383FAiLUUL3I8J5KOt60AB5xm0TEFZTvvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Eow9SJEOpYXenpeP2qKJNxF9qUWyaoyiFaLEv306eWg=; b=Hjfd1ZJjcsGjWK2xlrKVJvt3+RjmVI45plWtxbAsQA1mcF3qAa60dWF2PtFWZ18GYpsc2nL+x0Uc7GMBgTaPEj4vvdv5aNEwg9zWchKSuqK8hzgHbi/DAoMXD0N5bd+urGpN3w0ZwnBMHbItz0GWF8u9W4UcSIIqpXOoD0oi8Ys= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) by AM6PR04MB5239.eurprd04.prod.outlook.com (2603:10a6:20b:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Thu, 29 Apr 2021 14:02:28 +0000 Received: from AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::b034:690:56aa:7b18]) by AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::b034:690:56aa:7b18%4]) with mapi id 15.20.4087.025; Thu, 29 Apr 2021 14:02:28 +0000 From: "Alice Guo (OSS)" To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, herbert@gondor.apana.org.au, davem@davemloft.net, dominique.martinet@atmark-techno.com Cc: linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: [PATCH v1 1/2] caam: imx8m: fix the built-in caam driver cannot match soc_id Date: Thu, 29 Apr 2021 22:02:49 +0800 Message-Id: <20210429140250.2321-1-alice.guo@oss.nxp.com> X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: AM0PR02CA0206.eurprd02.prod.outlook.com (2603:10a6:20b:28f::13) To AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from nxf55104-OptiPlex-7060.ap.freescale.net (119.31.174.71) by AM0PR02CA0206.eurprd02.prod.outlook.com (2603:10a6:20b:28f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 14:02:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 86fd1d8d-94a7-4c0a-dcaf-08d90b176c56 X-MS-TrafficTypeDiagnostic: AM6PR04MB5239: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T2NESI4Qpt4gaGTPg2fsEBJLZIe194gUSrVuJ51cH7PLRX8vmNqkJdmkwxPoJG5PETCcBCM5AcuBBHK3iGmo+mmR9M/JXnvnF8Ti+/W3uMOQkHTznIi/pfnghzxSk2ALEAzDCbQ0w9IwJfXJGEIBhmcq1PCrmYBGlFD/2+cUqG2TRvpv1cUKro3CoDo1iFk2syFA3LmV3X4RZV0cw/QAlC3mCQnEhY9BpL9MIK83tV559YsPFPYy9mehP9DEBO/ySOFpe3cCOdxSOV19Ddayo4vTceKKvJ6LjddNw3c7m+4k5DOI5fPoT627rLNmoqBBz1kIR9GfMPtqbbdZ8sGwW3E4XmT3WorXECG4PW1ilwNJgMFSGxSGQ2NOwXb4SXtJwG47DA06v/eiokI09Vt8zOHbrd6cTTNyBCQdYc5k1Uo6ZtUK/ugoAJC/e7te4Yx/BiGHnPHGfmqAFl1FxqrclGtumte7MhhDA9ioE5QYc8F5BGJDb2AcD2EiIbNeSCqerBOm9zI8WW54sJ0BmUnT3j7W/4ejBU8MD7l9+efOQbF6X++1EAeFAUElAboCI+MGDJxjzO4JqmjoUkWJYOxd02zmTlurEwwGKYyQdu+58ds+zpGDoZKJVNXqxpYYtn0YqIoIKQLzDip35ny+qw2U7tlS9Xwflid5AcCw7IWgiss= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6053.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(346002)(136003)(376002)(366004)(7416002)(16526019)(6506007)(38100700002)(52116002)(478600001)(6486002)(38350700002)(6666004)(66946007)(26005)(66476007)(66556008)(5660300002)(956004)(8676002)(316002)(2616005)(86362001)(8936002)(6512007)(186003)(1076003)(2906002)(4326008)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: KxOtQeXHJKgjIk9pZFZnaPYsGDjUexHdrc6N8tON51EvDfx2TwIaaYvn15d06HbnPDsXto2ut8kIT0KXH7hy6J3X/dhoz+me2/bDQckZ+SqFa6wiXc7klRvpaHsM9Nl/ZAu4tUtUCiszrOvWpr8DzmlG8T4B+0d8y/CLbgf/EsY20HPtV12YGfij64YehHXh3SPESyH+JnTXYsZtbCjkHelcTVFAOkhc6bz7fZzOQ8jWQ1dJ/pH4F79z069J5cca1hqA4qNhUX5hAuvx/RNYvb+FyRF0BFgohmL5UJgTT0mIMvIc49PRacJPYwOumzTxmO0v+LyWdzTzQ14dkWbtDUMAdptgMEE4RasEV9gQ0vfE1+YzQ9KVxZArn6rek1uW7pHYSVuLSx/AyV5oTodK9wryPdp9KFf0J6buZ/crGmMoOd3VABCDxJLT6nG5+iGxhCr6JLpVTFbPvH7Wzhj+6TwSduDAJqlN3NuL3l2AoZBdctCSavJRNCDnvrQDQ7oW0lyAUpxr1vKAeulmKh8ulRt3kbyjDuoHdd4MSHrQT1btM7Tjfwxb3zAhMXqFrZ98BfrLLjjSJ6V2lv1x954WOpiexAfXkF2h7tT3RdOD0Cj2uoYEnZ7o7pYOFm+odwY0y9QZmNkCxqeFYURBgLsbacjUC0o7NnBFPZ9ZY9jeEgwYLkZBmlxqmCMSrcXMe5Jd6gjFRRkIaJac5aDy+sfKXpAv2aXAauuCKIES/2ZLICljbbBXYeY0N7x2KmFs+Nxig/TM0qQLd05suy0d46LAX86HTMPNWfh/E9mNiu2Uqnm8juORfz1wdrzKPUUpo9WvIscAxHYtFjLIvVhtfxjy5/i8V35Vltry3nBGdlzPUgSxT1OYwWg9dSJ8EmOsvbt2jdFnlrHHKZgt9t8zxp797h/kPrubgHNTsmO0eTTU4JJq+3dCMmb2m4FX5lGyWifAwS8InSlghk3SCQWm7mK76UQpOO3QCm6yutZCsjVYivVWD2vZ/TLzOIz5IuDksFgcHPhvEzX7kUF5yZ+0XdSH9DgVsPmJoKv+Kngy+pqhpGIVsn/nkJhQ8vCbiDxfh28l/+cCqttpz6unsYggub7buzwotknDks0g4RRg5S0h48h0gVUW9T0biuy6vPgippJC4TCn5G85koJFhV8btGR7pCWBlkU1mTd0donrZxDfxNFwRgQP+cMB9AgnigLVbJMC8o4fsQ0sWmq8KviVOS8e6dLWq4eQ5jCXYlhnQ7g0cuU4SmNZgSZPYgpu9WFy81/ERlvarTbljyuoFxMpK9QYU0nkFnKwJ6IGZzdFCgA6oQuDUz/X3cNmbHNoDDtkFcqg X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86fd1d8d-94a7-4c0a-dcaf-08d90b176c56 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6053.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 14:02:28.4278 (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: ZAkYh2dB8VdxuZyPAIN6V1ypRnotm+SeVQRHIPtxATA1MsWVoFhF0USscbQlXHIrMwyczEgmq1RRoihbJTGw9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB5239 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210429_070235_077654_75AA8E11 X-CRM114-Status: GOOD ( 11.92 ) 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 From: Alice Guo drivers/soc/imx/soc-imx8m.c is probed later than the caam driver so that return -EPROBE_DEFER is needed after calling soc_device_match() in drivers/crypto/caam/ctrl.c. For i.MX8M, soc_device_match returning NULL can be considered that the SoC device has not been probed yet, so it returns -EPROBE_DEFER directly. Fixes: 7d981405d0fd ("soc: imx8m: change to use platform driver") Signed-off-by: Alice Guo Tested-by: Dominique Martinet Tested-by: Frieder Schrempf --- drivers/crypto/caam/ctrl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.17.1 diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index ca0361b2dbb0..9bba3b93cf35 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -79,6 +79,14 @@ static void build_deinstantiation_desc(u32 *desc, int handle) append_jump(desc, JUMP_CLASS_CLASS1 | JUMP_TYPE_HALT); } +static const struct of_device_id imx8m_machine_match[] = { + { .compatible = "fsl,imx8mm", }, + { .compatible = "fsl,imx8mn", }, + { .compatible = "fsl,imx8mp", }, + { .compatible = "fsl,imx8mq", }, + { } +}; + /* * run_descriptor_deco0 - runs a descriptor on DECO0, under direct control of * the software (no JR/QI used). @@ -635,6 +643,8 @@ static int caam_probe(struct platform_device *pdev) nprop = pdev->dev.of_node; imx_soc_match = soc_device_match(caam_imx_soc_table); + if (!imx_soc_match && of_match_node(imx8m_machine_match, of_root)) + return -EPROBE_DEFER; caam_imx = (bool)imx_soc_match; if (imx_soc_match) { From patchwork Thu Apr 29 14:02:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Alice Guo (OSS)" X-Patchwork-Id: 12231359 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47271C433ED for ; Thu, 29 Apr 2021 14:04:37 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7A4461400 for ; Thu, 29 Apr 2021 14:04:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7A4461400 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=cdoQfKAQP06Kf98nY+Ln+lOKcHVdmqEmNUp2ixDsX48=; b=dAbo6b232/6f7HfjiLKjoozv6 mESYwgtTpeB8f312iDE7tBozO/UVxXV6M77hPfXYXg+ZfyAIkBAcEXxfoD270tYe4W7tNN/5Zqwnh mOAF4AsOzNgdu4VcyCawTqiskCP0Klhk5HylVin+1rgFxaukSLgT9ZuFit9dtf6yJx3LHNrXatmIH LI+yQcc1Ts/s9Ozex4t5tXUG3QOIyvb0C5KnnCdlYMFlY73NqfmVbn4pweUC73BaEenKDD5TqJCi1 OtkoorB0rwombZWQ4DxUWWPjJj5ezsu5eaYT6VsUgbp2Vc3Ai9dy6UJqIZDKb+duo/JJbva/7T1HZ h07qEAt9w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lc7Fi-005kvI-Ry; Thu, 29 Apr 2021 14:02:51 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lc7Fb-005kv3-It for linux-arm-kernel@desiato.infradead.org; Thu, 29 Apr 2021 14:02:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=MIME-Version:Content-Type:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+NociAcxzZTIRlikSkYG1+v+NaUEttJWz1llfGA3p1E=; b=bzXeY1JYonomOFUABeKQmFkWa6 mJ6c+59Na9t7ICJzcqsPna6zZS7plbj+nzilALfOX7ZK7aMH8hHp4e95K2L6KFPm4ha9h5xmM43jy uGUeNIlSJQv0c98DxIqdMClF+MnUHcf3vXlFmR7aP7Ez5rhzHeq9/ubj2Ei/izeorvsHvOw/JJ039 Flw3pG3ZP5eY3v/DV1SSvZwsPNXt5sSXOXnE4Nu1Ju08+fCxFBC9Ve+vHjbeukfwHH+pOTs28M18S ivjVs9ad5e9jj8Ndc7X7BqbqW40oEBv2FuPFfpE4VUDog3ODimssI4u6QIRKMVwMavEEVUdg32n7X revb9pNw==; Received: from mail-eopbgr60083.outbound.protection.outlook.com ([40.107.6.83] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lc7FZ-000fZW-3W for linux-arm-kernel@lists.infradead.org; Thu, 29 Apr 2021 14:02:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ErEDRM/XRFnB9jhPJYYxspQy4rGUHn18bbvAeTKKo0RnbQ05bI7vYBUc4GUvltyWVKSJUFHd0nCSD6pOfWkT5p8MToc836oyEoP4beLwKFOZcrEmCn0hL7DZCZb4f1cs0KsLmXmrTQMzNJmDwt/P6gKsZii0NI69REQfIpYuWWTwG5aDqbbNvjwmBOD4GOW7PX0aAkkDcDPToSIXXG1UUJZv/Kf756fsArvAuGd8Yld2iSinO9TlkETh7+WbWCGZSd2ZWJJO8WxbczvZnW9FVZGgjYloh9fOqBQuRbDsmzdetg35pU8PlnuGiclr0XqVWz/shrLRlccYhcE3aY1tvg== 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-SenderADCheck; bh=+NociAcxzZTIRlikSkYG1+v+NaUEttJWz1llfGA3p1E=; b=h0eEzVPtGSRvVDLGkZPHacpiIcgtu69fC6WFEGAHY21J4oFH+cjUusRCTzvoOJI4IH0+r3dmniQqDYjwOVMN8MUO5sfoFuYoWTQoYfBNJNrUGmpECMBgXSFZAv7mlXudcc83S14eA/fJFQtfYmM8rPY6FBpoGIVFVDwa8i/MLx/QmD+sDG9fKJ7GAxqnOYynITWHmwLETRSOYaJ7viL7o5+cq0CmOM3fsVbW3c0WGPqPmQlICiq+quystZrX7B6/fx7628YVv1D+o8Lh66TYQvL9AiIhkPXeP8Fwx9LnzcH3RPMj/pWCVlGiAC5lkkP+zyHXeKjMugW2Rrg65CMWug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+NociAcxzZTIRlikSkYG1+v+NaUEttJWz1llfGA3p1E=; b=cXEf7Y/h9gFQNdK/J+f/yOloO1DJnFac+yXERYt/TERGldOFoJkpW4p8OAduzJV/BPDEIDJUEW1eXnTXyxiaGLKtPAKriObh5/V2N3Gipze3OuGsK9UPRTT4wjVQoB4IJBnd90b00/TE37wte8sTIj1EbR3HCfcNy6Yy+vnoDJE= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) by AM6PR04MB5239.eurprd04.prod.outlook.com (2603:10a6:20b:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Thu, 29 Apr 2021 14:02:37 +0000 Received: from AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::b034:690:56aa:7b18]) by AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::b034:690:56aa:7b18%4]) with mapi id 15.20.4087.025; Thu, 29 Apr 2021 14:02:37 +0000 From: "Alice Guo (OSS)" To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, herbert@gondor.apana.org.au, davem@davemloft.net, dominique.martinet@atmark-techno.com Cc: linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: [PATCH v1 2/2] caam: imx8m: change to use of_match_node in run_descriptor_deco0 Date: Thu, 29 Apr 2021 22:02:50 +0800 Message-Id: <20210429140250.2321-2-alice.guo@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210429140250.2321-1-alice.guo@oss.nxp.com> References: <20210429140250.2321-1-alice.guo@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: AM0PR02CA0206.eurprd02.prod.outlook.com (2603:10a6:20b:28f::13) To AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from nxf55104-OptiPlex-7060.ap.freescale.net (119.31.174.71) by AM0PR02CA0206.eurprd02.prod.outlook.com (2603:10a6:20b:28f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 14:02:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9759063d-13c3-4d3d-a09c-08d90b17718c X-MS-TrafficTypeDiagnostic: AM6PR04MB5239: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GYK3VTd1K/cPjDNL9Qcw6axUYw9V9CPQIiEQebR04fxSpzWA8cZqbv4bfFBeb0aUeRagFL2nZbJ+AeAYkNtevYSSoXuzs6qAzNps1fNwD6KLUgDxV7oMSklh4PU5pI2RNLHdLJmDpMvCgmmEnA7YNNw4DllLAMAqG+90CoE+qK5JgRFkzdcVLhTTrmbTy8n71sMKLvsPDVS5Pdcdy7pQLcSVJpbGkXtJ/Bj4pidCnpSqDnGCSoG5A5U8NTdp8UndiXm+SCnD/HCHmqds7v0sViXN5Rrd7ZZmepy5zFHt26hYOQ/70iweFRBlmL2CRSFOz14V/SZMAV203kS0Hq18nRmxFw3Ibyf7htQRSZEFHOhNKzHX51nh+/125g9qxXH8Y7AoNC/tBVq0/0uj8BU/nMbmkvLuMzS0JYvsl38bcuf0FUqXmVj3ny2rMtEcwXZVzR03Zze77gymghlXZ98/ot8spU6EOao/WOsq9jJd+rEC1TXb6DXjESmEuXgW3t7cTUfyuXZ6PymMKHM5+1WFwsmFZ8t/1gVWnqEf4PxHaNQXhRYO3gIWHxf1J38KPqqvhS+h5Lg0W32NhB1JJE2NxZnFn7R2BrtuJus6FqEdFdRu/tSgb9XRDD/TLYCbuepEZ+kh8Qqui79nMn57wolnQIPx5blFoQrrAc0R3IGaABw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6053.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(346002)(136003)(376002)(366004)(7416002)(16526019)(6506007)(38100700002)(52116002)(478600001)(6486002)(38350700002)(6666004)(83380400001)(66946007)(26005)(66476007)(66556008)(5660300002)(956004)(8676002)(316002)(2616005)(86362001)(8936002)(6512007)(186003)(1076003)(2906002)(4326008)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: S4D0P2wruVCCw6hhRC7ewemjR1XFSIMGmoy5LQh/98ldKPL+YIlr3lEWh9UjWyDezqDZ5KhLH3ZGJhaXJeebKkNQFEE+Sr2RHuWwN71utW10RNyPTmq0en0xv76FHqJIY1qpYNdiSCRtvd7WBLqTKvb92JYUjUnRdo91SISLP9XJuzx3FBfkdslN/8tHz3Gpc2O2JYZB6tpWBohAdFtEqubZw67vGs0Qw5ncwFc9tgE2VxZahsRXFkHi/94/Xdd/pR8ruCyx4kLbQMO0EWntA8N70ZeUL44Q8IYLcO2ehuo4mdiDIjTFDdbNubMJsJCB5HCClY20g4ou4wSLd+WYHBNbJ8t9duUcEhgPknEqkqJ7onRRp45+YJLFyeKN1XJ9dN93gjoppxGBw+ja9dksKOccXQlZCdso5TD+jPmckjmNlUiSDVC4UxuUP6/b2z22WK592XbffsTUw33zjy7dlM4+qpznSvBUBU5c5VrirGl3TVz/GPWzx33aejC8/wXgXmWpu5smGWyeY2N9LMqkLlxzJqxA+8AhZZYg/6TZjWw49ENVyiyXWkW1pXG3mTgnADVFaI+vehq/Sf7h9b6AL78ajAKWsUc/3svo2wJNU7Xv7A7fl0mDJgHIOtOxxKUlzaEkcgXDgr3ozfNZZMAG1TvA4u45T4fMZChU2GZtbA01MZU2q21p9OTKLqL3PHxAOkzbCOYsoKhf/IbtO3fADiOTwl4hs497Et+m6tRMpEW6amV0khwIwM0B1x7czmAJsdwGnBV71qSOqttldsiFY/ZcaEL52Ipt2Y+Hzc4ei8jtMnohOKLk8TNfhtjwMnjIeP72D8FR860M1jSTUb5Zg312Ztz9F13CHgF3+b2o1AmwoVadRlGjVCRN5Y9RRA0t2c0NyCT14lPkEh0ofs3NNvgXeBOHAh4v+fjdA84kJ93e0wgt7J6FSpgIH1wFNnpSYWK8TR758PL3NKde9g4akR5PUsPSOoiy97xrSoJdr1/EWKDvWcGGy4qJUXRGyu4hJsktwZg7OUczDAktPPPTM/kJocpxULpV3eH9vnQwv8QdbKbPMuJOywXooz53yB2rMCvrbp8ic2bJEV60/pXoxHuLeO863KDPUw/nIShaiJueq1e14PYmhMzV1gFkAdhj6avo1joRjJMAP9wPLF9g2uD2jsG+dHR2xmXjSJ0JbgU7haZWP0ewzx9waaFmwguBVj7whnQyVIV/CM9YSGeWNqI4SIw+DMYAPZdO0Hb/o7ZCG3w7tW+fjChi24o6qXbkeTUoki2mwTpqK8bQN988E2ZPKJqU8lb6FAjbh8g5FbPNurSvxsmJbrqX8alarnhb X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9759063d-13c3-4d3d-a09c-08d90b17718c X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6053.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 14:02:37.1637 (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: OFtNsvcdAdXfi4A77+y1OIqj/u504wjCf0ARGLajJbHzbFvcG5Rx775Eb79xYeEyDG0DyOXEpCgW1cDyY0edkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB5239 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210429_070241_172376_C584EA7D X-CRM114-Status: GOOD ( 10.14 ) 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 From: Alice Guo Patch "fix the built-in caam driver cannot match soc_id" provides imx8m_machine_match to match i.MX8M{Q,M,N,P}, so change to use to of_match_node which can simplify the code. Signed-off-by: Alice Guo --- drivers/crypto/caam/ctrl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.17.1 diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 9bba3b93cf35..7e6a525e0c11 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -113,10 +113,7 @@ static inline int run_descriptor_deco0(struct device *ctrldev, u32 *desc, * Apparently on i.MX8M{Q,M,N,P} it doesn't matter if virt_en == 1 * and the following steps should be performed regardless */ - of_machine_is_compatible("fsl,imx8mq") || - of_machine_is_compatible("fsl,imx8mm") || - of_machine_is_compatible("fsl,imx8mn") || - of_machine_is_compatible("fsl,imx8mp")) { + of_match_node(imx8m_machine_match, of_root)) { clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0); while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) &&