summaryrefslogtreecommitdiffstats
path: root/include/fdtdec.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-10-25 16:30:59 +0000
committerGerald Van Baren <gvb@unssw.com>2012-11-12 23:00:34 -0500
commit332ab0d54aaa5b8b27096996d10c8c6183c6972c (patch)
treec9826049418146dbffb389eacd90c12f5a38f8c5 /include/fdtdec.h
parent09258f1e8b12acc4a2a02b60d942660798038fba (diff)
downloadblackbird-obmc-uboot-332ab0d54aaa5b8b27096996d10c8c6183c6972c.tar.gz
blackbird-obmc-uboot-332ab0d54aaa5b8b27096996d10c8c6183c6972c.zip
fdt: Add function to get a config string from device tree
Add a function to look up a configuration string such as board name and returns its value. We look in the "/config" node for this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/fdtdec.h')
-rw-r--r--include/fdtdec.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index d880fe8d9e..e828662425 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -367,6 +367,16 @@ int fdtdec_setup_gpio(struct fdt_gpio_state *gpio);
int fdtdec_get_config_int(const void *blob, const char *prop_name,
int default_val);
+/**
+ * Look in the FDT for a config item with the given name and return its value
+ * as a string.
+ *
+ * @param blob FDT blob
+ * @param prop_name property name to look up
+ * @returns property string, NULL on error.
+ */
+char *fdtdec_get_config_string(const void *blob, const char *prop_name);
+
/*
* Look up a property in a node and return its contents in a byte
* array of given length. The property must have at least enough data for
OpenPOWER on IntegriCloud