Merge branch 'for-next/of'
This commit is contained in:
commit
5f56c35060
|
@ -91,6 +91,10 @@ static int __do_bootm_linux(struct image_data *data, int swap)
|
||||||
of_add_reserve_entry(initrd_start, initrd_end);
|
of_add_reserve_entry(initrd_start, initrd_end);
|
||||||
data->oftree = of_get_fixed_tree(data->of_root_node);
|
data->oftree = of_get_fixed_tree(data->of_root_node);
|
||||||
fdt_add_reserve_map(data->oftree);
|
fdt_add_reserve_map(data->oftree);
|
||||||
|
if (bootm_verbose(data))
|
||||||
|
of_print_cmdline(data->of_root_node);
|
||||||
|
if (bootm_verbose(data) > 1)
|
||||||
|
of_print_nodes(data->of_root_node, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bootm_verbose(data)) {
|
if (bootm_verbose(data)) {
|
||||||
|
|
|
@ -395,13 +395,9 @@ static int do_bootm(int argc, char *argv[])
|
||||||
goto err_out;
|
goto err_out;
|
||||||
} else {
|
} else {
|
||||||
data.of_root_node = of_get_root_node();
|
data.of_root_node = of_get_root_node();
|
||||||
if (bootm_verbose(&data) && data.of_root_node)
|
if (data.of_root_node)
|
||||||
printf("using internal devicetree\n");
|
printf("using internal devicetree\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (bootm_verbose(&data) > 1 && data.of_root_node)
|
|
||||||
of_print_nodes(data.of_root_node, 0);
|
|
||||||
#endif
|
#endif
|
||||||
if (data.os_address == UIMAGE_SOME_ADDRESS)
|
if (data.os_address == UIMAGE_SOME_ADDRESS)
|
||||||
data.os_address = UIMAGE_INVALID_ADDRESS;
|
data.os_address = UIMAGE_INVALID_ADDRESS;
|
||||||
|
|
|
@ -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)
|
static int of_fixup_bootargs(struct device_node *root)
|
||||||
{
|
{
|
||||||
struct device_node *node;
|
struct device_node *node;
|
||||||
|
@ -160,12 +175,6 @@ int of_fix_tree(struct device_node *node)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* 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
|
* Get the fixed fdt. This function uses the fdt input pointer
|
||||||
* if provided or the barebox internal devicetree if not.
|
* if provided or the barebox internal devicetree if not.
|
||||||
|
|
|
@ -145,6 +145,9 @@ static void of_alias_scan(void)
|
||||||
|
|
||||||
INIT_LIST_HEAD(&aliases_lookup);
|
INIT_LIST_HEAD(&aliases_lookup);
|
||||||
|
|
||||||
|
if (!root_node)
|
||||||
|
return;
|
||||||
|
|
||||||
of_aliases = of_find_node_by_path(root_node, "/aliases");
|
of_aliases = of_find_node_by_path(root_node, "/aliases");
|
||||||
if (!of_aliases)
|
if (!of_aliases)
|
||||||
return;
|
return;
|
||||||
|
@ -691,9 +694,6 @@ void of_print_nodes(struct device_node *node, int indent)
|
||||||
if (!node)
|
if (!node)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (of_node_disabled(node))
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (i = 0; i < indent; i++)
|
for (i = 0; i < indent; i++)
|
||||||
printf("\t");
|
printf("\t");
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,7 @@ int of_get_named_gpio(struct device_node *np,
|
||||||
|
|
||||||
struct device_node *of_find_node_by_phandle(phandle phandle);
|
struct device_node *of_find_node_by_phandle(phandle phandle);
|
||||||
void of_print_property(const void *data, int len);
|
void of_print_property(const void *data, int len);
|
||||||
|
void of_print_cmdline(struct device_node *root);
|
||||||
|
|
||||||
int of_device_is_compatible(const struct device_node *device,
|
int of_device_is_compatible(const struct device_node *device,
|
||||||
const char *compat);
|
const char *compat);
|
||||||
|
|
Loading…
Reference in New Issue