summaryrefslogtreecommitdiff
path: root/common/fdt_decode.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-06-30 14:57:40 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:58:41 -0700
commit6b99ebe5313270742227927c7117ca9523862676 (patch)
treead178d4084b93c3f2ef59ef90e30791fd304c43c /common/fdt_decode.c
parent5ca0592e587d83c5ca97bddc4f0a965d627dda8e (diff)
fdt: Move board name query into fdt_decode
Move this code into fdt_decode so avoid changing board.c too much. The new implementation just looks at the 'model' property in the root of the tree so does not require a lookup. BUG=chromium-os:11623 TEST=build and boot, see that we still have board information displayed Change-Id: I68dd420cfa6a2af6e9885bc457e46056c85f74a0 Reviewed-on: http://gerrit.chromium.org/gerrit/3500 Reviewed-by: Anton Staaf <robotboy@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/fdt_decode.c')
-rw-r--r--common/fdt_decode.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/fdt_decode.c b/common/fdt_decode.c
index 1bfee8c3b66..686b48c0cb5 100644
--- a/common/fdt_decode.c
+++ b/common/fdt_decode.c
@@ -563,6 +563,15 @@ int fdt_decode_sdmmc(const void *blob, int node, struct fdt_sdmmc *config)
return 0;
}
+const char *fdt_decode_get_model(const void *blob)
+{
+ const char *model;
+
+ model = fdt_getprop(blob, 0, "model", NULL);
+ return model ? model : "<not defined>";
+}
+
+
char *fdt_decode_get_config_string(const void *blob, const char *prop_name)
{
const char *nodep;