On Fri, May 25, 2018 at 10:47:54AM +0000, Baeuerle, Florian wrote: > Am Freitag, den 25.05.2018, 10:41 +0000 schrieb Baeuerle, Florian: > > Analogous to the of_property command, add an -f option to the of_node > > command. This option defers the device tree modification until boot > > time and thus applies the modification as a fixup on the linux device > > tree. > > > > Signed-off-by: Florian Bäuerle <florian.baeuerle@xxxxxxxxxxxx> > > --- > > commands/of_node.c | 106 ++++++++++++++++++++++++++++++++------------- > > 1 file changed, 75 insertions(+), 31 deletions(-) > > > > diff --git a/commands/of_node.c b/commands/of_node.c > > index 4962e5242..29cc371dd 100644 > > --- a/commands/of_node.c > > +++ b/commands/of_node.c > > @@ -32,16 +32,66 @@ > > #include <init.h> > > #include <libgen.h> > > > > +static int do_of_node_create_now(struct device_node *root, const char *path); > > +static int do_of_node_delete_now(struct device_node *root, const char *path); > > + > > +static int of_fixup_node_create(struct device_node *root, void *context) > > +{ > > + return do_of_node_create_now(root, (const char *)context); > > +} > > + > > +static int of_fixup_node_delete(struct device_node *root, void *context) > > +{ > > + return do_of_node_delete_now(root, (const char *)context); > > +} > > + > > +static int do_of_node_create_fixup(const char *path) > > +{ > > + char *data = xstrdup(path); > > + > > + return of_register_fixup(of_fixup_node_create, (void *)data); > > +} > > + > > +static int do_of_node_delete_fixup(const char *path) > > +{ > > + char *data = xstrdup(path); > > + > > + return of_register_fixup(of_fixup_node_delete, (void *)data); > > +} > > I know the two functions above do not do a lot, but I wanted to keep it similar > to the of_property implementation. If you'd like them go away, just tell me. It's ok. Applied, thanks Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox