From patchwork Mon Jan 22 18:07:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 1889315 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=H21yQ6rk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TJdXY3rQpz23f0 for ; Tue, 23 Jan 2024 05:09:33 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=qFgcSrwidZMq/g2fZ2j7N4I+YM5z2h7YB8cVDTe1NzE=; b=H21yQ6rkQV+jj3 TUAo1x8x9ra2drA3/r2h+UWQjRmRXdFX6OwPMIPgQLFnru6A6hGkS7MmrUTX1YgT6G/lEPS4ctgUC XNrtAvOttB7XsWRUn8UaupqY68UEf9fwpG11ujOdZKHPaRz/4cM7v/uFcWsOBtQ21pkwbdGfi4Ybi Gj9R8sUI9y5V5/CtJWFtAsghiws3wwXEecGlltg3dTqrcm5NyCQzzcAoxI3TXKnYaOuREDg9uwDXP nSiu0CAFOY8dJF1Z9TuEkn+kjaNEiY+eCVNlG/y/qULPDPLPiyjRY0UQutF/9L9G6RFO2wbLffRvC kLnaVTjk5F821DcPY6cA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rRyir-00DQmZ-1Q; Mon, 22 Jan 2024 18:08:37 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rRyin-00DQhX-2T for linux-mtd@lists.infradead.org; Mon, 22 Jan 2024 18:08:35 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rRyiW-0001rV-Ds; Mon, 22 Jan 2024 19:08:16 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rRyiV-001ePz-Cl; Mon, 22 Jan 2024 19:08:15 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rRyiV-005ZxZ-0z; Mon, 22 Jan 2024 19:08:15 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Mark Brown Cc: kernel@pengutronix.de, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Martin Blumenstingl , Geert Uytterhoeven , Heiko Stuebner , =?utf-8?q?Pali_Roh=C3=A1r?= , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org Subject: [PATCH v2 13/33] mtd: rawnand: fsl_elbc: Let .probe retry if local bus is missing Date: Mon, 22 Jan 2024 19:07:08 +0100 Message-ID: <41a042207ef791c4c5bcb46f09f63c40c6aa321b.1705944943.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=926; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=s+JADGlY1hU/NStvmmbQ8XZ+UID1ILn7ThT9et4DuL4=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlrq7SqRa5xnri+sBGWXS2mxTR2+yeexp9NbmI0 L90hkTAH++JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZa6u0gAKCRCPgPtYfRL+ TlAHB/wMg26k1Tpck9mHijZsRHTQvJplBT8Z+vC2kUhBSyWEZB0dKmES+fZW3CeCceTvoNOyFuV 7TDzPHUuzbznk6NIljGX94AwdH91fGCAnFs7MXcPZdppmViEw8kW4jG+dVtd/2vXlq8Fs+JMbBg X3rsJQGwDZjlubTx88jvefyRVTkWUObB/F62pE7+t1zSpAka5vi4w4s9TC437a89kT6z3KJVs/B 5D8PuO2JS7sqyvGPTuWxX7CKUYRb14q6ysKoafrx5mNB0ymUIcbqI4rwPlRVTHgWk6aeRto3npM JsgwpMCWKefupKmykKqsyBIf58VxW9M/7YtKjYKc/tPhJJYR X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mtd@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240122_100833_799592_841ED3AE X-CRM114-Status: GOOD ( 13.48 ) X-Spam-Score: -2.3 (--) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__If_during_probe_fsl=5Flbc=5Fctrl=5Fdev?= =?unknown-8bit?q?_is_NULL_that_might_just_be?= =?unknown-8bit?q?_because_the_fsl=5Flbc_driver_didn=27t_bind_yet=2E_So_retur?= =?unknown-8bit?q?n_-EPROBE=5FDEFER_in_this?= =?unknown-8bit?q?_case_to_make_the_driver_core_retry_probing_later=2E_Signed?= =?unknown-8bit?q?-off-by=3A_Uwe_Kleine-K=C3=B6nig?= =?unknown-8bit?q?_=3Cu=2Ekleine-koenig=40pengutronix=2Ede=3E_---_drivers/mtd?= =?unknown-8bit?q?/nand/raw/fsl=5Felbc=5Fnand=2Ec?= =?unknown-8bit?q?_=7C_3_++-_1_file_changed=2C_2_insertions=28+=29=2C_1_delet?= =?unknown-8bit?q?ion=28-=29_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-2=2E3_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-2=2E3_RCVD=5FIN=5FDNSWL=5FMED______RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_medium_trust?= =?unknown-8bit?b?IFsyYTBhOmVkYzA6MjpiMDE6MWQ6MDowOjEwNCBsaXN0ZWQgaW5d?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org If during probe fsl_lbc_ctrl_dev is NULL that might just be because the fsl_lbc driver didn't bind yet. So return -EPROBE_DEFER in this case to make the driver core retry probing later. Signed-off-by: Uwe Kleine-König --- drivers/mtd/nand/raw/fsl_elbc_nand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c index 1e3a80f06f33..df6a0d5c86bb 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c @@ -869,7 +869,8 @@ static int fsl_elbc_nand_probe(struct platform_device *pdev) struct mtd_info *mtd; if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs) - return -ENODEV; + return dev_err_probe(&pdev->dev, -EPROBE_DEFER, "lbc_ctrl_dev missing\n"); + lbc = fsl_lbc_ctrl_dev->regs; dev = fsl_lbc_ctrl_dev->dev;