From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Rob Herring (Arm)" <robh@kernel.org>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Russell King <linux@armlinux.org.uk>,
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
Date: Wed, 29 Apr 2026 16:31:16 +0200 [thread overview]
Message-ID: <87fr4ddeiz.fsf@bootlin.com> (raw)
In-Reply-To: <20260429-blazing-thus-c1a4eb9b6b0c@thorsis.com> (Alexander Dahl's message of "Wed, 29 Apr 2026 15:02:22 +0200")
On 29/04/2026 at 15:02:22 +02, Alexander Dahl <ada@thorsis.com> wrote:
> Hello Miquel,
>
> Am Wed, Apr 29, 2026 at 11:42:19AM +0200 schrieb Miquel Raynal:
>> Hi Alexander,
>>
>> > [ 0.958298] bus: 'platform': add driver atmel-ebi
>> > [ 0.958451] platform 10000000.ebi: bus: 'platform': __driver_probe_device: matched device with driver atmel-ebi
>> > [ 0.958566] platform 10000000.ebi: error -EPROBE_DEFER: wait for 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
>>
>> Interesting.
>>
>> 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
>>
>> And this seems to be incompatible with probe deferrals:
>> https://elixir.bootlin.com/linux/v7.0.1/source/drivers/base/platform.c#L948
>
> Indeed. o.O
>
>> I would suggest trying something alone these lines:
>>
>> --- a/drivers/memory/atmel-ebi.c
>> +++ b/drivers/memory/atmel-ebi.c
>> @@ -633,5 +633,6 @@ static struct platform_driver atmel_ebi_driver = {
>> .of_match_table = atmel_ebi_id_table,
>> .pm = &atmel_ebi_pm_ops,
>> },
>> + .probe = atmel_ebi_probe,
>> };
>> -builtin_platform_driver_probe(atmel_ebi_driver, atmel_ebi_probe);
>> +builtin_platform_driver(atmel_ebi_driver);
>>
>> 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èl
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Rob Herring (Arm)" <robh@kernel.org>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Russell King <linux@armlinux.org.uk>,
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
Date: Wed, 29 Apr 2026 16:31:16 +0200 [thread overview]
Message-ID: <87fr4ddeiz.fsf@bootlin.com> (raw)
In-Reply-To: <20260429-blazing-thus-c1a4eb9b6b0c@thorsis.com> (Alexander Dahl's message of "Wed, 29 Apr 2026 15:02:22 +0200")
On 29/04/2026 at 15:02:22 +02, Alexander Dahl <ada@thorsis.com> wrote:
> Hello Miquel,
>
> Am Wed, Apr 29, 2026 at 11:42:19AM +0200 schrieb Miquel Raynal:
>> Hi Alexander,
>>
>> > [ 0.958298] bus: 'platform': add driver atmel-ebi
>> > [ 0.958451] platform 10000000.ebi: bus: 'platform': __driver_probe_device: matched device with driver atmel-ebi
>> > [ 0.958566] platform 10000000.ebi: error -EPROBE_DEFER: wait for 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
>>
>> Interesting.
>>
>> 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
>>
>> And this seems to be incompatible with probe deferrals:
>> https://elixir.bootlin.com/linux/v7.0.1/source/drivers/base/platform.c#L948
>
> Indeed. o.O
>
>> I would suggest trying something alone these lines:
>>
>> --- a/drivers/memory/atmel-ebi.c
>> +++ b/drivers/memory/atmel-ebi.c
>> @@ -633,5 +633,6 @@ static struct platform_driver atmel_ebi_driver = {
>> .of_match_table = atmel_ebi_id_table,
>> .pm = &atmel_ebi_pm_ops,
>> },
>> + .probe = atmel_ebi_probe,
>> };
>> -builtin_platform_driver_probe(atmel_ebi_driver, atmel_ebi_probe);
>> +builtin_platform_driver(atmel_ebi_driver);
>>
>> 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èl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2026-04-29 14:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 21:06 [PATCH v3 0/3] at91: Remove of_platform_default_populate() calls Rob Herring (Arm)
2026-01-05 21:06 ` Rob Herring (Arm)
2026-01-05 21:06 ` [PATCH v3 1/3] mtd: nand: atmel: Defer probe if SRAM is missing Rob Herring (Arm)
2026-01-05 21:06 ` Rob Herring (Arm)
2026-01-05 21:06 ` [PATCH v3 2/3] ARM: at91: Move PM init functions to .init_late hook Rob Herring (Arm)
2026-01-05 21:06 ` Rob Herring (Arm)
2026-01-05 21:06 ` [PATCH v3 3/3] ARM: at91: remove unnecessary of_platform_default_populate calls Rob Herring (Arm)
2026-01-05 21:06 ` Rob Herring (Arm)
2026-04-23 8:24 ` Alexander Dahl
2026-04-23 8:24 ` Alexander Dahl
2026-04-24 10:56 ` Alexander Dahl
2026-04-24 10:56 ` Alexander Dahl
2026-04-27 15:07 ` Miquel Raynal
2026-04-27 15:07 ` Miquel Raynal
2026-04-29 8:02 ` Alexander Dahl
2026-04-29 8:02 ` Alexander Dahl
2026-04-29 9:42 ` Miquel Raynal
2026-04-29 9:42 ` Miquel Raynal
2026-04-29 13:02 ` Alexander Dahl
2026-04-29 13:02 ` Alexander Dahl
2026-04-29 14:31 ` Miquel Raynal [this message]
2026-04-29 14:31 ` Miquel Raynal
2026-05-06 15:21 ` Rob Herring
2026-05-06 15:21 ` Rob Herring
2026-01-10 15:57 ` [PATCH v3 0/3] at91: Remove of_platform_default_populate() calls Claudiu Beznea
2026-01-10 15:57 ` Claudiu Beznea
2026-01-19 10:21 ` Miquel Raynal
2026-01-19 10:21 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fr4ddeiz.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=nicolas.ferre@microchip.com \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.