Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: physmap-core: Prioritize ofparts for OF probe
@ 2026-01-28 23:55 Linus Walleij
  2026-01-29 18:16 ` Miquel Raynal
  2026-01-29 19:12 ` Miquel Raynal
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2026-01-28 23:55 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: linux-mtd, Linus Walleij

Place the ofparts before RedBoot partitions in the OF probe
path: this makes it possible to override any existing
RedBoot partitions with fixed-partitions which may be necessary,
such as when you need to repartition the flash from Linux'
point of view but not necessary from the bootloaders point
of view.

This happens when a device such as Raidsonic IB-4220-B has
three partitions named "Kern", "Ramdisk" and "Application"
that we want to merge into one for more efficient use
of the flash memory in OpenWrt.

Signed-off-by: Linus Walleij <linusw@kernel.org>
---
 drivers/mtd/maps/physmap-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/maps/physmap-core.c b/drivers/mtd/maps/physmap-core.c
index 2bd7a1af898c..0dcc25b7ff98 100644
--- a/drivers/mtd/maps/physmap-core.c
+++ b/drivers/mtd/maps/physmap-core.c
@@ -268,7 +268,7 @@ static const struct of_device_id of_flash_match[] = {
 MODULE_DEVICE_TABLE(of, of_flash_match);
 
 static const char * const of_default_part_probes[] = {
-	"cmdlinepart", "RedBoot", "ofpart", "ofoldpart", NULL
+	"cmdlinepart", "ofpart", "ofoldpart", "RedBoot", NULL
 };
 
 static const char * const *of_get_part_probes(struct platform_device *dev)

---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20260129-gemini-mtd-of-partition-parse-order-a33efcf3422d

Best regards,
-- 
Linus Walleij <linusw@kernel.org>


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: physmap-core: Prioritize ofparts for OF probe
  2026-01-28 23:55 [PATCH] mtd: physmap-core: Prioritize ofparts for OF probe Linus Walleij
@ 2026-01-29 18:16 ` Miquel Raynal
  2026-01-29 19:12 ` Miquel Raynal
  1 sibling, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2026-01-29 18:16 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Richard Weinberger, Vignesh Raghavendra, linux-mtd


> This happens when a device such as Raidsonic IB-4220-B has
> three partitions named "Kern", "Ramdisk" and "Application"
> that we want to merge into one for more efficient use
> of the flash memory in OpenWrt.

If by "more efficient" you mean "split into UBI volumes rather than MTD
partitions", I'm all for it ;-)

Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: physmap-core: Prioritize ofparts for OF probe
  2026-01-28 23:55 [PATCH] mtd: physmap-core: Prioritize ofparts for OF probe Linus Walleij
  2026-01-29 18:16 ` Miquel Raynal
@ 2026-01-29 19:12 ` Miquel Raynal
  1 sibling, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2026-01-29 19:12 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Linus Walleij; +Cc: linux-mtd

On Thu, 29 Jan 2026 00:55:09 +0100, Linus Walleij wrote:
> Place the ofparts before RedBoot partitions in the OF probe
> path: this makes it possible to override any existing
> RedBoot partitions with fixed-partitions which may be necessary,
> such as when you need to repartition the flash from Linux'
> point of view but not necessary from the bootloaders point
> of view.
> 
> [...]

Applied to mtd/next, thanks!

[1/1] mtd: physmap-core: Prioritize ofparts for OF probe
      commit: 8a565e3ee1eccaf7570a1c107b68327ba1a68b84

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-29 19:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-28 23:55 [PATCH] mtd: physmap-core: Prioritize ofparts for OF probe Linus Walleij
2026-01-29 18:16 ` Miquel Raynal
2026-01-29 19:12 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox