[PATCH 1/5] of: partition: don't parse nvmem-cells in legacy OF binding
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Nov 26 07:33:08 PST 2024
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 at 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
More information about the barebox
mailing list