mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: mfe@pengutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/5] of: partition: don't parse nvmem-cells in legacy OF binding
Date: Tue, 26 Nov 2024 16:33:08 +0100	[thread overview]
Message-ID: <20241126153312.3758355-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20241126153312.3758355-1-a.fatoum@pengutronix.de>

There are not many upstream instances of nvmem-cells, but all
of them place nvmem-cells inside a partitions container and the
nvmem-cells binding was added way later than the fixed-partitions
binding.

Therefore, let's simplify the code by supporting nvmem-cells only
inside a fixed-partitions container.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/of/partition.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index df66751fe94d..70297da9d231 100644
--- a/drivers/of/partition.c
+++ b/drivers/of/partition.c
@@ -117,8 +117,6 @@ int of_parse_partitions(struct cdev *cdev, struct device_node *node)
  *      Unfortunately, there is no completely reliable way
  *      to differentiate partitions from devices prior to
  *      probing, because partitions may also have compatibles.
- *      We only handle nvmem-cells, so anything besides that
- *      is assumed to be a device that should be probed directly.
  *
  * Returns zero on success or a negative error code otherwise
  */
@@ -146,8 +144,7 @@ int of_partition_ensure_probed(struct device_node *np)
 	 }
 
 	/* Check if legacy partitions binding */
-	if (!of_property_present(np, "compatible") ||
-	    of_device_is_compatible(np, "nvmem-cells"))
+	if (!of_property_present(np, "compatible"))
 		return of_device_ensure_probed(parent);
 
 	/* Doesn't look like a partition, so let's probe directly */
-- 
2.39.5




  reply	other threads:[~2024-11-26 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 15:33 [PATCH 0/5] environment: upstream-NVMEM-compliant " Ahmad Fatoum
2024-11-26 15:33 ` Ahmad Fatoum [this message]
2024-11-26 15:33 ` [PATCH 2/5] nvmem: probe nvmem-cells container via driver model Ahmad Fatoum
2024-11-26 15:33 ` [PATCH 3/5] environment: register barebox env OF driver regardless of /chosen Ahmad Fatoum
2024-11-26 15:33 ` [PATCH 4/5] environment: add support for a single node barebox,environment binding Ahmad Fatoum
2024-11-26 15:33 ` [PATCH 5/5] sandbox: switch to new barebox environment binding Ahmad Fatoum

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=20241126153312.3758355-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=mfe@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox