summaryrefslogtreecommitdiffstats
path: root/commands/of_node.c
Commit message (Collapse)AuthorAgeFilesLines
* of_node: clarify help text and do stricter commandline parsingUwe Kleine-König2018-08-081-4/+3
| | | | | | | | | | | | | | | | To create an oftree node /path/node I tried after reading the help text of of_node: of_node -c /path node similar to the syntax of of_property. This didnt result in any output but still failed to do what I meant. So clarify the help text to not suggest there are two parameters and return an usage error if still two (or more) names are passed. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/of_node: add option to apply changes as fixupBaeuerle, Florian2018-05-281-31/+75
| | | | | | | | | | 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@allegion.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* complete: Add devicetree completionSascha Hauer2014-05-191-0/+2
| | | | | | | | The of_* commands take devicetree nodes as parameters. Add a devicetree completion function to ease passing nodes to these commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: harmonize in-barebox documentationHolger Schurig2014-05-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does probably too much, but it's hard (and very cumbersome/time consuming) to break it out. What is does is this: * each command has one short description, e.g. "list MUX configuration" * made sure the short descriptions start lowercase * each command has one usage. That string contains just the options, e.g. "[-npn]". It's not part of the long help text. * that is, it doesn't say "[OPTIONS]" anymore, every usable option is listed by character in this (short) option string (the long description is in the long help text, as before) * help texts have been reworked, to make them - sometimes smaller - sometimes describe the options better - more often present themselves in a nicer format * all long help texts are now created with BUSYBOX_CMD_HELP_ macros, no more 'static const __maybe_unused char cmd_foobar_help[]' * made sure the long help texts starts uppercase * because cmdtp->name and cmdtp->opts together provide the new usage, all "Usage: foobar" texts have been removed from the long help texts * BUSYBOX_CMD_HELP_TEXT() provides the trailing newline by itself, this is nicer in the source code * BUSYBOX_CMD_HELP_OPT() provides the trailing newline by itself * made sure no line gets longer than 77 characters * delibertely renamed cmdtp->usage, so that we can get compile-time errors (e.g. in out-of-tree modules that use register_command() * the 'help' command can now always emit the usage, even without compiled long help texts * 'help -v' gives a list of commands with their short description, this is similar like the old "help" command before my patchset * 'help -a' gives out help of all commands Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: group 'help' outputHolger Schurig2014-05-141-0/+1
| | | | | | | | | | | | | | | | | | | The old output of "help" was just producing a long list, that usually scrolled of the screen (even on a X11 terminal). This list is more compact, and also sorted by groups. The old output format (plus grouping) is now available with 'help -v'. Example: Information commands: ?, devinfo, help, iomem, meminfo, version Boot commands: boot, bootm, go, loadb, loads, loadx, loady, saves, uimage ... Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OF: base: rename of_free to of_delete_nodeSebastian Hesselbarth2013-07-051-1/+1
| | | | | | | | | of_free is misleading about the actual purpose of the function. There is already a of_create_node counterpart, so rename of_free to of_create_node and update all users accordingly. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OF: base: sync of_find_node_by_path with linux OF APISebastian Hesselbarth2013-06-201-1/+1
| | | | | | | | | | | | | Barebox of_find_node_by_path requires a node to be passed as start node to start searching. Linux OF API does not pass this node and no current user of it in barebox is passing anything else than the root node. Therefore, we rename current function to of_find_node_by_path_from and introduce a Linux OF API compatible of_find_node_by_path that always passes the current root_node. Also, all current users of that function are updated to reflect the API change. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: remove unused libfdtSascha Hauer2013-03-061-1/+0
| | | | | | | Now that we are completely independent of libfdt remove the unused code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of_* commands: print usage when insufficient arguments are givenSascha Hauer2013-03-061-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Add root node argument to of_find_node_by_pathSascha Hauer2013-03-061-1/+1
| | | | | | This makes of_find_node_by_path usable with multiple trees. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of_node command: use of_create_nodeSascha Hauer2013-03-061-17/+10
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: Add of_node commandSascha Hauer2013-01-191-0/+111
This command allows to create/delete device nodes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>