summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-06-02 16:28:34 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-06-02 16:28:34 +0200
commit5f56c3506007eea1a284cdc55f8b3e60de67f2cc (patch)
tree9a1cd309204118818168f17f5e6c9232417d1806 /common
parente57a8119d11bd1c835945cb4090d036003f8d2f9 (diff)
parent5d308ce6400678239248c54d565bf385bbadbb42 (diff)
downloadbarebox-5f56c3506007eea1a284cdc55f8b3e60de67f2cc.tar.gz
barebox-5f56c3506007eea1a284cdc55f8b3e60de67f2cc.tar.xz
Merge branch 'for-next/of'
Diffstat (limited to 'common')
-rw-r--r--common/oftree.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/common/oftree.c b/common/oftree.c
index 776d301186..475d418849 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -98,6 +98,21 @@ void of_print_property(const void *data, int len)
}
}
+void of_print_cmdline(struct device_node *root)
+{
+ struct device_node *node = of_find_node_by_path(root, "/chosen");
+ const char *cmdline;
+
+ if (!node) {
+ printf("commandline: no /chosen node\n");
+ return;
+ }
+
+ cmdline = of_get_property(node, "bootargs", NULL);
+
+ printf("commandline: %s\n", cmdline);
+}
+
static int of_fixup_bootargs(struct device_node *root)
{
struct device_node *node;
@@ -161,12 +176,6 @@ int of_fix_tree(struct device_node *node)
}
/*
- * The size by which we increase the dtb to have space for additional
- * fixups. Ideally this would be done by libfdt automatically
- */
-#define OFTREE_SIZE_INCREASE 0x8000
-
-/*
* Get the fixed fdt. This function uses the fdt input pointer
* if provided or the barebox internal devicetree if not.
* It increases the size of the tree and applies the registered