From patchwork Thu Apr 29 07:30:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12230561 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 6570AC433B4 for ; Thu, 29 Apr 2021 07:11:39 +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 CB1D86044F for ; Thu, 29 Apr 2021 07:11:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB1D86044F 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=CwX/THavBAX+o0HD4L1PB275jZxAwLDuzb4z0IpjT1U=; b=BcwU/8mCp2Lcm/oZOac4fn1Zz qIc8llZbKNRf0ztwSc2KomYDRRD9SoaducCX5+rUrAncjymhUneP74qRWX+OOfAVTagRUMeQ8Bqj9 EMyofJcbOjxHsI2G5+dKShp2pZDw9nWzd6Td7wThsCJYRJo3TgQx9qSsH7QAD2MHLz/cXp4+vMqni 1IfFk+8FtIO4V856W4eVXaTWBmEL/QP3hskkMFcm2Kx4Cv2hQ14gG70vN+k9EsaUlSnPVRApghvF/ PN8o3CYyRb48HVfw4rulZqZvdwXm0PLhKmO9ze153r9ltxxlK6eBrWuJg4igv9984T3pqcF2eimVm KnHAgzUNw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lc0n1-0059X6-VQ; Thu, 29 Apr 2021 07:08:48 +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 1lc0f9-0057gw-VT for linux-arm-kernel@desiato.infradead.org; Thu, 29 Apr 2021 07:00:41 +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: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=QyVFzo6FDwBuBULigZlxWIA8Q3htTSbXK72A7UBeEMM=; b=HRVjFb8BjzIqp1QgBt+FGj+pTQ +rLCTKHD82+9mvpzjbHAyPAT7f/+wmN0CnpZy+cXTl30zshSHNpm4OjReJ6ZIYHu9lJcHEcvWCQWc IaWIzaHuVlAOIb61GlU1MNGRElhsYV3bFrll0FXvkt1AiPvd542QMEMc4NgtMamXvYsAL/PAW0Haa unhq7Oopc+byN4t8kvacGNPXriUCZ0fPGcLS8xTXXFP1WoE9RcsUesqlfboZF3RAPbLEh6sQJaE0V N0daiHPbjHC5dUNgioHEitGbXI+tMv55Ty9pvwj1Jdhlc/0UGuuMvBC2B0oeBzoijwmC73TYPV5fw YigK0QEA==; Received: from mail-vi1eur05on2050.outbound.protection.outlook.com ([40.107.21.50] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lc0f7-000QPe-HH for linux-arm-kernel@lists.infradead.org; Thu, 29 Apr 2021 07:00:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SsSbqhMhGbkreTzi0rSSwWrDGlIVWOsdYLf+k0sd93swbrdvusFpXOy8HHNPp4nU9fueuf4PXSO750PIuzIbflE3XWkQFHPMOekizHlLWQ6Bo5TqofXk0wYBrN3e0lBs2zVe1U49OjOkj6bTkMAEj8YzbPZ8sDwf310Y2Clkfk11/fhyYmBlOkVNM3Yx0zHK8vFI8RahL9V/JsaHge+txUasGlSHoF89JPfjLDjgg2XlwgaNQCvW1or0wYTKO+Ehtwf1zmWlyNiVaLVtosZ8Hwkbs8SevhN+1pkrgv1KHi9buuMMBUHcnL70ZjTOMmcnj+5zeROOuUeNu33PY0+EhA== 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=QyVFzo6FDwBuBULigZlxWIA8Q3htTSbXK72A7UBeEMM=; b=OVMuiWIgTqvF44VlsPp+R+g93AaCKdxXmCNZz/OUf8P5DA2V+M+n5cMJLkvwXdakPA+T5NQJ5auOKRTKeMd9mphKJ3PWmzIJ6tC1kc6tG6hEZj4OH+Ktzu/1ucyik/RTty8x6Pv2cdoHYC1AFcLacd+K63eMf0gjhL7Rt/07pKGWTqgSjBw9MqMrqEyyWR5omwHA1TQ1qzTkzatZ9PIVGmQpnrt3dDHDowPTFswrT4l7wIr6F8QtCLPkU5xWKTiQP/moMZBz5if/37iVBDsTVLAgaUcVkGcbKYdtuiGKlJVWQcro8KtZR9GBPzT0hC/BTk4rOQuMC5ET3tk5clVDxA== 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=QyVFzo6FDwBuBULigZlxWIA8Q3htTSbXK72A7UBeEMM=; b=G8yqUG1TttUKAWJym6UGCOA+0qOwsnRSvC9KJi7EaxErdSQIqJWZliKsQVidanNNJppgpbr0GmWnZ5c8ER+M1cXDmHDECrALnTE4Lf6ME1STiyn/gKbG7T/IGEBoXRsjtv696+kofEJQVqCqe5jC853sl8THsSERJl+5kEepOYM= 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 DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB5468.eurprd04.prod.outlook.com (2603:10a6:10:86::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Thu, 29 Apr 2021 07:00:32 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64%8]) with mapi id 15.20.4065.023; Thu, 29 Apr 2021 07:00:32 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, p.zabel@pengutronix.de, l.stach@pengutronix.de, krzk@kernel.org, agx@sigxcpu.org, marex@denx.de, andrew.smirnov@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ping.bai@nxp.com, frieder.schrempf@kontron.de, aford173@gmail.com, abel.vesa@nxp.com, Peng Fan Subject: [PATCH 15/16] soc: imx: gpcv2: support reset defer probe Date: Thu, 29 Apr 2021 15:30:49 +0800 Message-Id: <20210429073050.21039-16-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210429073050.21039-1-peng.fan@oss.nxp.com> References: <20210429073050.21039-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR02CA0208.apcprd02.prod.outlook.com (2603:1096:201:20::20) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by HK2PR02CA0208.apcprd02.prod.outlook.com (2603:1096:201:20::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.29 via Frontend Transport; Thu, 29 Apr 2021 07:00:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: abea79ba-6298-4e3c-8dfb-08d90adc7ac1 X-MS-TrafficTypeDiagnostic: DB7PR04MB5468: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1265; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TzFKLxeViH8WCvWls0FdnHFivhaokFVupNMVND7IkiIwI3re3Eb5J7wYPY7Gq8o1kc+OpziEBJ7IE+edZm6iSvHJ6BLcg/fm4cpy/P69iVr5ZZXIPwgXpCAMX4D5mZRgmGalVZNlJgVk2pcWD5KpVwqoX4+aFR4XgZO2p6RvGbdQyOf54etiJCOCF8TTaDz1R1o/vbBjehEPuiNecnj4T4mwvHSCctBmmCC7H8OMcHf1DwfSEtEauh74aeiV4drpIFy6mx86U/lyCPUpAOQ4sBgDKbOjnV7Yg+ykettcB2ONLYziYQCmTdDuEuT4P+o9bmize0YZn4pkoQEEHqaY54XYTFWKLbF2Jdr3N0lSMn8cxTCsBSm7Vbb+G571mxh04KIgl4A1yG3M5BBkpxrhqv1BkOfhHk96AhuzkdpRn5QsQFn55/jsFwTa8QkWXrsPS2BRwulr60buvuoH+KgHRzZWBnpknwtrT2yCzTrSuFby8V70K9Eg4zPoyzAiIdQT60r1jZxwJ8qwYIn14efx/4nWUHmMLHJJAPOlyKFoXCXmijCga52cSjmuIYjEH2L7DCohsM7sKYWWvv/F5pIvmgkFUKK1H3FQzbRWrNhJ637f1zvcW41DZxjqQIHFh+m1WfZebnlRUM137rJ64r66kQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(376002)(39860400002)(346002)(136003)(2906002)(8936002)(4326008)(52116002)(38100700002)(38350700002)(6666004)(956004)(6512007)(83380400001)(8676002)(66946007)(66476007)(16526019)(2616005)(1076003)(6506007)(186003)(6486002)(66556008)(7416002)(478600001)(4744005)(5660300002)(26005)(316002)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: YuV8IKhMebdl7Y/egh47PWBTzwB8ObQf7+nxwDdv/8zYAf2qKgEU6t2C35JANJkKs7aZkxMfxDfzYG7IaxFLQz258eUKJ/COTdfW8VGHpm1g90q22MAdBmHmFBt6SbmWz8JzhC3dqJ04D2lA1+K1CKh9SIA7TrNI9fsz0Sv/dCkrc2shpQ9zP5aMntwGKweWmr369Y7YsRw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d2ghR2Okw6Uz0QKLlZ9neKxjdjRUrrW1tyZpXz8BN3VwiQ70VD0Lc5JUZWl/rElilW X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: abea79ba-6298-4e3c-8dfb-08d90adc7ac1 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 07:00:32.1932 (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: Pu0lMIZP6m5H8hAsRxcFA9PsXL0+P5Dr6SvPqnejJt4AN4uMhz0bDa9YzTYFYivh8qRA5CdRAFprmvrMzB2YVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5468 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210429_000037_595336_F5A94238 X-CRM114-Status: GOOD ( 11.85 ) 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: Peng Fan When gpcv2 probe, the reset controller might not be ready, so we need defer probe Signed-off-by: Peng Fan --- drivers/soc/imx/gpcv2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index 072f519462a5..49dd137f6b94 100644 --- a/drivers/soc/imx/gpcv2.c +++ b/drivers/soc/imx/gpcv2.c @@ -784,9 +784,12 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) "Failed to get domain's clocks\n"); domain->reset = devm_reset_control_array_get_optional_exclusive(domain->dev); - if (IS_ERR(domain->reset)) + if (IS_ERR(domain->reset)) { + if (PTR_ERR(domain->reset) == -EPROBE_DEFER) + return -EPROBE_DEFER; return dev_err_probe(domain->dev, PTR_ERR(domain->reset), "Failed to get domain's resets\n"); + } pm_runtime_enable(domain->dev);