summaryrefslogtreecommitdiffstats
path: root/common/oftree.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/oftree.c')
-rw-r--r--common/oftree.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/common/oftree.c b/common/oftree.c
index 28a3b965ff..09cb660212 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -145,6 +145,7 @@ static int of_fixup_bootargs(struct device_node *root, void *unused)
const char *str;
int err;
int instance = reset_source_get_instance();
+ struct device_d *dev;
str = linux_bootargs_get();
if (!str)
@@ -164,6 +165,19 @@ static int of_fixup_bootargs(struct device_node *root, void *unused)
if (instance >= 0)
of_property_write_u32(node, "reset-source-instance", instance);
+
+ dev = reset_source_get_device();
+ if (dev && dev->device_node) {
+ phandle phandle;
+
+ phandle = of_node_create_phandle(dev->device_node);
+
+ err = of_property_write_u32(node,
+ "reset-source-device", phandle);
+ if (err)
+ return err;
+ }
+
return of_fixup_bootargs_bootsource(root, node);
}