From: "Pali Rohár" <pali@kernel.org>
To: Stefan Roese <sr@denx.de>
Cc: "Marek Behún" <marek.behun@nic.cz>, u-boot@lists.denx.de
Subject: [PATCH] arm: mvebu: turris_omnia: Fix MTD partitions order for Linux
Date: Thu, 21 Oct 2021 17:55:48 +0200 [thread overview]
Message-ID: <20211021155548.21099-1-pali@kernel.org> (raw)
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 <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
---
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 a48e1f5c305d..d2f510993449 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -601,7 +601,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.20.1
next reply other threads:[~2021-10-21 15:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 15:55 Pali Rohár [this message]
2021-10-22 6:48 ` [PATCH] arm: mvebu: turris_omnia: Fix MTD partitions order for Linux Stefan Roese
2021-10-28 10:49 ` Stefan Roese
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=20211021155548.21099-1-pali@kernel.org \
--to=pali@kernel.org \
--cc=marek.behun@nic.cz \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
/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.