diff options
author | David Vrabel <david.vrabel@citrix.com> | 2012-04-02 16:50:42 +0100 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2012-04-02 16:50:42 +0100 |
commit | df8a4a8c5f33de9d2eb9f2a2c303c63ee8245a0a (patch) | |
tree | 53f3badaa602c6b22731fa05053fc2a8cff48b64 /xen/common/device_tree.c | |
parent | 13bb63b754e433301bef330c4087743677c4ffb8 (diff) | |
download | xen-df8a4a8c5f33de9d2eb9f2a2c303c63ee8245a0a.tar.gz xen-df8a4a8c5f33de9d2eb9f2a2c303c63ee8245a0a.tar.bz2 xen-df8a4a8c5f33de9d2eb9f2a2c303c63ee8245a0a.zip |
arm: use bootargs for the command line
Use the /chosen node's bootargs parameter for the Xen command line.
Parse it early on before the serial console is setup.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/common/device_tree.c')
-rw-r--r-- | xen/common/device_tree.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 715fbf6657..8fb6d463c3 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -118,6 +118,26 @@ int device_tree_for_each_node(const void *fdt, return 0; } +/** + * device_tree_bootargs - return the bootargs (the Xen command line) + * @fdt flat device tree. + */ +const char *device_tree_bootargs(const void *fdt) +{ + int node; + const struct fdt_property *prop; + + node = fdt_path_offset(fdt, "/chosen"); + if ( node < 0 ) + return NULL; + + prop = fdt_get_property(fdt, node, "bootargs", NULL); + if ( prop == NULL ) + return NULL; + + return prop->data; +} + static int dump_node(const void *fdt, int node, const char *name, int depth, u32 address_cells, u32 size_cells, void *data) { |