From patchwork Mon Jan 15 14:12:46 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: 1886703 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=HnPIMFNV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::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 [IPv6:2607:7c80:54:3::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 4TDDf7757Fz1yPV for ; Tue, 16 Jan 2024 01:14:04 +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: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=qFgcSrwidZMq/g2fZ2j7N4I+YM5z2h7YB8cVDTe1NzE=; b=HnPIMFNVwhYzxB PAodip/Nh8UdJjTCnZO94y35t6T9lMSMw/dQAqmpgIEnrLq+FWLI1YGUfO2bouEkxVFn9vPebLBVF IfLEcj5ssvG+eT1ctzXDiFWXNwQoePEYH2HsTG1wEtDUOq+liP1AHd5d7jk4JdPiGtkYElguwLOPJ nYHjD/Hw7FQ8LWV1DJBllHQ0fBc0ZVI1RHbN/VsuqMTDYI7uYRAJAm1B16Ff+Pvdn5pMRZDzf9s0I ZIhEvrjGOeGbSQexUzFuUpHJ7+GFf0a1snbTmcFcQ2qr3qISryONe1oCjgwVfrjRVHV0+BMUB4j9R ufyzVBvMTux6eAOA7RmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rPNiK-009BHN-0y; Mon, 15 Jan 2024 14:13:20 +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 1rPNiF-009BGr-1Y for linux-mtd@lists.infradead.org; Mon, 15 Jan 2024 14:13:17 +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 1rPNi6-0000uM-8K; Mon, 15 Jan 2024 15:13:06 +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 1rPNi5-0002IY-CU; Mon, 15 Jan 2024 15:13:05 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rPNi5-0008KV-0y; Mon, 15 Jan 2024 15:13:05 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Miquel Raynal , Vignesh Raghavendra Cc: Richard Weinberger , linux-mtd@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH] mtd: rawnand: fsl_elbc: Let .probe retry if local bus is missing Date: Mon, 15 Jan 2024 15:12:46 +0100 Message-ID: <20240115141245.3415035-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=926; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=s+JADGlY1hU/NStvmmbQ8XZ+UID1ILn7ThT9et4DuL4=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlpT1eRLyF5FHl9JItDHYNj77sl3YOvEjGkyk8q /kadI+MdXGJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZaU9XgAKCRCPgPtYfRL+ TirzCACubFS92ueND4JpTwROF00Nx+kY4QqLmstx5YgHzn3c4fdhe4R7dy7q7q/LXEQNs6cJRcS lRrFFEITUatA83EU6rlLuomWFiRRG2MO2c0JxQ15pr/9pPULngKDBUxJ6uZROijJ64a/FqmH2K3 bfJgVE1S0vRF7HYs7OWtFapD0wFPM/Q1JuQtdvPL9OyiZcirUPd8vzCMTLG9lQ6L7jPmOG9HfDA Ozyl5rEWA8JQM7u7l524Fu/y30IY7kS2GEYesB+F9D1MammVRq9VAcl8bTgVC4ROkUv8U2qe1ru 8P1LmY/p9GNaeUf0yVab8/VBbODong59hjEnwAF3a7oMP3dd 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-20240115_061315_517992_6F1EF546 X-CRM114-Status: GOOD ( 12.64 ) 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;