* [PATCH 1/4] of: Use correct devicetree in of_print_cmdline
2013-07-27 8:32 [PATCH] of fixes Sascha Hauer
@ 2013-07-27 8:32 ` Sascha Hauer
2013-07-27 8:32 ` [PATCH 2/4] of: net: Use correct devicetree in eth_of_fixup Sascha Hauer
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2013-07-27 8:32 UTC (permalink / raw)
To: barebox
of_print_cmdline() is passed a devicetree, so use this one instead
of the internal devicetree. This fixes the cmdline printout when
bootm on ARM is used with an external devicetree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/oftree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/oftree.c b/common/oftree.c
index aff4c28..f2a3169 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -100,7 +100,7 @@ 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("/chosen");
+ struct device_node *node = of_find_node_by_path_from(root, "/chosen");
const char *cmdline;
if (!node) {
--
1.8.3.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] of: net: Use correct devicetree in eth_of_fixup
2013-07-27 8:32 [PATCH] of fixes Sascha Hauer
2013-07-27 8:32 ` [PATCH 1/4] of: Use correct devicetree in of_print_cmdline Sascha Hauer
@ 2013-07-27 8:32 ` Sascha Hauer
2013-07-27 8:32 ` [PATCH 3/4] of: Use dts syntax when printing devicetrees Sascha Hauer
2013-07-27 8:32 ` [PATCH 4/4] ARM: bootm: Print Kernel commandline unconditionally Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2013-07-27 8:32 UTC (permalink / raw)
To: barebox
eth_of_fixup() is passed a devicetree, so use this one instead
of the internal devicetree. This makes sure it also works when
the tree to fixup is not the internal one.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
net/eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/eth.c b/net/eth.c
index 09b3bd5..e94689a 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -296,7 +296,7 @@ static int eth_of_fixup(struct device_node *root)
continue;
}
- node = of_find_node_by_path(edev->nodepath);
+ node = of_find_node_by_path_from(root, edev->nodepath);
if (!node) {
dev_dbg(&edev->dev, "%s: fixup node %s not found\n",
__func__, edev->nodepath);
--
1.8.3.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/4] of: Use dts syntax when printing devicetrees
2013-07-27 8:32 [PATCH] of fixes Sascha Hauer
2013-07-27 8:32 ` [PATCH 1/4] of: Use correct devicetree in of_print_cmdline Sascha Hauer
2013-07-27 8:32 ` [PATCH 2/4] of: net: Use correct devicetree in eth_of_fixup Sascha Hauer
@ 2013-07-27 8:32 ` Sascha Hauer
2013-07-27 8:32 ` [PATCH 4/4] ARM: bootm: Print Kernel commandline unconditionally Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2013-07-27 8:32 UTC (permalink / raw)
To: barebox
Our devicetree printing is close to correct dts syntax, so fix
some remaining differences:
- Use an equal sign instead of a colon to separate a poperty name and
a value
- Add a semicolon at the end of properties
- Make sure we do not print a separator for empty properties
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/of/base.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 769b642..881ac3b 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1475,9 +1475,12 @@ void of_print_nodes(struct device_node *node, int indent)
list_for_each_entry(p, &node->properties, list) {
for (i = 0; i < indent + 1; i++)
printf("\t");
- printf("%s: ", p->name);
- of_print_property(p->value, p->length);
- printf("\n");
+ printf("%s", p->name);
+ if (p->length) {
+ printf(" = ");
+ of_print_property(p->value, p->length);
+ }
+ printf(";\n");
}
list_for_each_entry(n, &node->children, parent_list) {
--
1.8.3.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/4] ARM: bootm: Print Kernel commandline unconditionally
2013-07-27 8:32 [PATCH] of fixes Sascha Hauer
` (2 preceding siblings ...)
2013-07-27 8:32 ` [PATCH 3/4] of: Use dts syntax when printing devicetrees Sascha Hauer
@ 2013-07-27 8:32 ` Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2013-07-27 8:32 UTC (permalink / raw)
To: barebox
The Kernel commandline is an important debugging aid when people
ask why their Kernel won't start, so print it unconditionally.
This is done in !dt mode anyway, so also do it with dt.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/lib/bootm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 0786e22..599b09a 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -91,8 +91,7 @@ static int __do_bootm_linux(struct image_data *data, int swap)
of_add_reserve_entry(initrd_start, initrd_end);
data->oftree = of_get_fixed_tree(data->of_root_node);
fdt_add_reserve_map(data->oftree);
- if (bootm_verbose(data))
- of_print_cmdline(data->of_root_node);
+ of_print_cmdline(data->of_root_node);
if (bootm_verbose(data) > 1)
of_print_nodes(data->of_root_node, 0);
}
--
1.8.3.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread