Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1431535pxy; Thu, 29 Apr 2021 07:03:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8Nda9aTN2xoxgQt+ikxw54NvPFy5OvYaXsUJRuNDlT5zjgUSMuo6ybjhvTZ3xvZgfeOZo X-Received: by 2002:a2e:7205:: with SMTP id n5mr23607746ljc.73.1619705012147; Thu, 29 Apr 2021 07:03:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1619705012; cv=pass; d=google.com; s=arc-20160816; b=l9G1EQaUs6f+DVJuzwtPjwBj9we+85gBDAW3SBlLBXKFhW20lZsjESoEq49FpOW8zh UwgrGgGHgPYar/xzysFocQtIhw3iGHsAmlmyfZfnDUnQiDwItI2JsT3L0sy3chsjkzsW GulKVmkwiIH0ZAOjt39kHukvusnKm68o3l0EUSN+N2LWpogPVVmJqbQehUUpBxQK/7PR s/I99AHmZL+gnImnbOW3dI2qA0xTKcGtl2xy+qUCLQsUGvQFLPNEKCw5kq/X3po7VH5r utyg4IupziVQja8h7OvDY2y6JP3E453Z1enCoSnHW29iPN3yyBnqY39dBM5XTmudu36o bIDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=Eow9SJEOpYXenpeP2qKJNxF9qUWyaoyiFaLEv306eWg=; b=l2qbbrwaex9qvgb4FbGVapD0QdUcf5b3qBCLkEBZ3el5Sjlubkn4QGa3/qm/K8IpOw xGKGDmVvhYjTi9cQl2A4BP3z6YK7E4QX17PCDa8txkVUVIPsTT/bKC8NS5KARzSk4f1s Ss6kR/FiuwHoHV50ejiWnAmT1ycG21cE4sv/0pE+F7o103k3BKdLjr1EXuDs8r16XuRr T/2eMPbn7d1v/s61f3TV3HYgZXj/OnLL9y30SC3QXUaDQRmCRRE3YZx7vHl5rRjnywgO 0vwL0xAtPOqaJCoM1sFzE2/RyaAPR3lOcQwzGE4f0bV7bmJnTdqYhjSFKqTOeG2kSVFP dESg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Hjfd1ZJj; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pg9si88336ejb.22.2021.04.29.07.02.58; Thu, 29 Apr 2021 07:03:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Hjfd1ZJj; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239718AbhD2ODU (ORCPT + 99 others); Thu, 29 Apr 2021 10:03:20 -0400 Received: from mail-eopbgr60042.outbound.protection.outlook.com ([40.107.6.42]:7361 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238948AbhD2ODS (ORCPT ); Thu, 29 Apr 2021 10:03:18 -0400 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 Content-Type: text/plain 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: =?us-ascii?Q?KxOtQeXHJKgjIk9pZFZnaPYsGDjUexHdrc6N8tON51EvDfx2TwIaaYvn15d0?= =?us-ascii?Q?6HbnPDsXto2ut8kIT0KXH7hy6J3X/dhoz+me2/bDQckZ+SqFa6wiXc7klRvp?= =?us-ascii?Q?aHsM9Nl/ZAu4tUtUCiszrOvWpr8DzmlG8T4B+0d8y/CLbgf/EsY20HPtV12Y?= =?us-ascii?Q?Gfij64YehHXh3SPESyH+JnTXYsZtbCjkHelcTVFAOkhc6bz7fZzOQ8jWQ1dJ?= =?us-ascii?Q?/pH4F79z069J5cca1hqA4qNhUX5hAuvx/RNYvb+FyRF0BFgohmL5UJgTT0mI?= =?us-ascii?Q?MvIc49PRacJPYwOumzTxmO0v+LyWdzTzQ14dkWbtDUMAdptgMEE4RasEV9gQ?= =?us-ascii?Q?0vfE1+YzQ9KVxZArn6rek1uW7pHYSVuLSx/AyV5oTodK9wryPdp9KFf0J6bu?= =?us-ascii?Q?Z/crGmMoOd3VABCDxJLT6nG5+iGxhCr6JLpVTFbPvH7Wzhj+6TwSduDAJqlN?= =?us-ascii?Q?3NuL3l2AoZBdctCSavJRNCDnvrQDQ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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 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.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 --- drivers/crypto/caam/ctrl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) { -- 2.17.1