From 59102987be25920b2180ebe2a18fbaf56c5a8278 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Thu, 21 Oct 2021 17:55:48 +0200 Subject: [PATCH] arm: mvebu: turris_omnia: Fix MTD partitions order for Linux MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Linux enumerates MTD partitions in DTB order, while the fdt_add_subnode() function puts a new subnode at the beginning. To fix this, put MTD partitions into DTB in reverse order. Fixes: 92f36c8e74c1 ("arm: mvebu: turris_omnia: fixup MTD partitions in Linux' DTB") Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_omnia/turris_omnia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 39051a803a..36c596efc5 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -603,7 +603,7 @@ static bool fixup_mtd_partitions(void *blob, int offset, struct mtd_info *mtd) mtd_probe_devices(); - list_for_each_entry(slave, &mtd->partitions, node) { + list_for_each_entry_reverse(slave, &mtd->partitions, node) { char name[32]; int part; -- 2.39.5