[PATCH 1/2] of: overlay: do not parse phandles as properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of handling phandles as properties, assign them directly as a
handle to the node. This allows phandles within nodes inside the device
tree overlays to be handled correctly.

Signed-off-by: Rouven Czerwinski <r.czerwinski@xxxxxxxxxxxxxx>
---
 drivers/of/overlay.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index b79dbff94d..0bebe26e39 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -58,6 +58,11 @@ static int of_overlay_apply(struct device_node *target,
 		if (of_prop_cmp(prop->name, "name") == 0)
 			continue;
 
+		if (of_prop_cmp(prop->name, "phandle") == 0) {
+			target->phandle = be32_to_cpup(prop->value);
+			continue;
+		}
+
 		err = of_set_property(target, prop->name, prop->value,
 				      prop->length, true);
 		if (err)
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux