summaryrefslogtreecommitdiffstats
path: root/drivers/of/base.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-08-15 08:50:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-08-16 08:40:37 +0200
commit775ba3c093be186d345ab7132116fd0ed3e53ba2 (patch)
tree2f24e9eab96d5846c6403fe9dc3547edb9ea91a3 /drivers/of/base.c
parentb986f4f1ee4881c4c1d81738cf9f0366381f7066 (diff)
downloadbarebox-775ba3c093be186d345ab7132116fd0ed3e53ba2.tar.gz
barebox-775ba3c093be186d345ab7132116fd0ed3e53ba2.tar.xz
introduce barebox_set_model
Instead of calling of_get_model() in barebox_get_model() add a barebox_set_model() and use it to set the boardinfo once it's available from the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/of/base.c')
-rw-r--r--drivers/of/base.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 4770421a2b..8af51d49ca 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1610,6 +1610,9 @@ int of_probe(void)
of_chosen = of_find_node_by_path("/chosen");
of_property_read_string(root_node, "model", &of_model);
+ if (of_model)
+ barebox_set_model(of_model);
+
__of_parse_phandles(root_node);
memory = of_find_node_by_path("/memory");