From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA3F913FEE for ; Wed, 29 Apr 2026 14:31:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777473087; cv=none; b=G5Qk9VHXHsRivN+kFsMWobVo2V4FRX8QVbFhouOVd0Yh6jIPJIpWiy/tgqj2eCZoKVT5nXSXQ1eAmNzlkEsUn/GGbxFYuLfXfRWgRbsa5deBEjbrbspdFq1HQE9aaBY1ZQHif8tz65aIjWdeMPKcvkes6WhMkQGR6qpQXWqcFpk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777473087; c=relaxed/simple; bh=Df0RWqwWrzb2WW3YYt5W00NqF0Wqnp8eXAF21IBdb34=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=UFkl7Iq8Cgtoq86uXfxRQIaUc9DGAMhfxoj7ZfkdmunrrZttXsoUAThOlli0TcEsvcZt8Gc3mJEj9YSHyjExv0WxaX3rHa5QJ1/okXNmgIIBSH4/HlrjNR1OES4D1+mlGoYqpZ10c3ALq7rIOjFNxeT6Mqg3OdYqCgLd1T/qthU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=BwRQtTWj; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="BwRQtTWj" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 664E24E42AF3; Wed, 29 Apr 2026 14:31:22 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 338E0601DF; Wed, 29 Apr 2026 14:31:22 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0557B10729F10; Wed, 29 Apr 2026 16:31:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1777473077; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=c9iwjdiY9HfxG0fPYsz/o47Tp5boM0lZqduksjt0UfQ=; b=BwRQtTWjuP4S0+ncmYcC4KRp2moY/crlDfs0ZYChN7x3hoVW1bafofhycD0Jo3IqKaHSId M6Ch/gSwzl/VILP03mHTjnOFPE6R1vLZpUqpzsqE4u7kRku21Ng6eMTuumqpoOvJg3qrZR lt/yCmVXP4N5099nG4A0bJmRQ/HmRShj5YoP1QsFdazUSz+rI/lu1Z+M51gWeKWJxKWc7o AG8VYtAqsUZfgcrmdXH0TPgb0zsmIqnuqzcRsTvps0jVZVsXfEjDPtWW+ap7idAg4DsE0P WCeUmyth+W8U8dv6fdu/pEclYXmt+cfHH7Yhu4Df3VO5NiPIoFrCb/Jp6HLAiQ== From: Miquel Raynal To: "Rob Herring (Arm)" Cc: Richard Weinberger , Vignesh Raghavendra , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Russell King , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/3] ARM: at91: remove unnecessary of_platform_default_populate calls In-Reply-To: <20260429-blazing-thus-c1a4eb9b6b0c@thorsis.com> (Alexander Dahl's message of "Wed, 29 Apr 2026 15:02:22 +0200") References: <20260105-at91-probe-v3-0-594013ff2965@kernel.org> <20260105-at91-probe-v3-3-594013ff2965@kernel.org> <20260423-stoke-ocean-139dbe306256@thorsis.com> <20260424-worried-renewal-924d34ed945c@thorsis.com> <87tsswfnmy.fsf@bootlin.com> <20260429-lushly-greasily-c14c01c1aee8@thorsis.com> <87lde6cdc4.fsf@bootlin.com> <20260429-blazing-thus-c1a4eb9b6b0c@thorsis.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Wed, 29 Apr 2026 16:31:16 +0200 Message-ID: <87fr4ddeiz.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 On 29/04/2026 at 15:02:22 +02, Alexander Dahl wrote: > Hello Miquel, > > Am Wed, Apr 29, 2026 at 11:42:19AM +0200 schrieb Miquel Raynal: >> Hi Alexander, >>=20 >> > [ 0.958298] bus: 'platform': add driver atmel-ebi >> > [ 0.958451] platform 10000000.ebi: bus: 'platform': __driver_pr= obe_device: matched device with driver atmel-ebi >> > [ 0.958566] platform 10000000.ebi: error -EPROBE_DEFER: wait fo= r supplier /ahb/apb/pinctrl@fffff400/ebi/ebi-data-lsb >> > [ 0.958649] platform 10000000.ebi: Added to deferred list >> > [ 0.959429] bus: 'platform': remove driver atmel-ebi >> > [ 0.959540] driver: 'atmel-ebi': driver_release >>=20 >> Interesting. >>=20 >> If you look at the very last line of the driver, the EBI driver does not >> use a standard "module_platform_driver" macro, it uses some kind of >> run-once probe that is kept in an __init section: >> https://elixir.bootlin.com/linux/v7.0.1/source/drivers/memory/atmel-ebi.= c#L637 >>=20 >> And this seems to be incompatible with probe deferrals: >> https://elixir.bootlin.com/linux/v7.0.1/source/drivers/base/platform.c#L= 948 > > Indeed. o.O > >> I would suggest trying something alone these lines: >>=20 >> --- a/drivers/memory/atmel-ebi.c >> +++ b/drivers/memory/atmel-ebi.c >> @@ -633,5 +633,6 @@ static struct platform_driver atmel_ebi_driver =3D { >> .of_match_table =3D atmel_ebi_id_table, >> .pm =3D &atmel_ebi_pm_ops, >> }, >> + .probe =3D atmel_ebi_probe, >> }; >> -builtin_platform_driver_probe(atmel_ebi_driver, atmel_ebi_probe); >> +builtin_platform_driver(atmel_ebi_driver); >>=20 >> Memory taken by the probe function will remain mapped. That seems to be >> the drawback. > > This works. Sent a patch, see: > > https://lore.kernel.org/all/20260429125930.844790-1-ada@thorsis.com/ > > Regarding the drawback: This can't be much memory, can it? I guess it is preferable to have the probe mapped at the cost of a few hundred more RAM bytes than a brick... Good to know that this fixed your problem. Thanks, Miqu=C3=A8l