summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunhe Lan <Chunhe.Lan@freescale.com>2011-08-31 10:36:32 +0800
committerGerald Van Baren <gvb@unssw.com>2011-10-15 09:34:49 -0400
commit8ddb10eae0c0e6936c69b19c21aaa2f6e0433717 (patch)
treea5d136166480327a237956f44ed21b002126f05a
parentd8fffa057c9430fd0c5104ab6ff7db4cdb03db51 (diff)
downloadu-boot-imx-8ddb10eae0c0e6936c69b19c21aaa2f6e0433717.zip
u-boot-imx-8ddb10eae0c0e6936c69b19c21aaa2f6e0433717.tar.gz
u-boot-imx-8ddb10eae0c0e6936c69b19c21aaa2f6e0433717.tar.bz2
fdt: Add a do_fixup_by_path_string() function
The do_fixup_by_path_string() will set the specified node's property to the value contained in "status". It would just be an inline wrapper for do_fixup_by_path() that calls strlen on the argument. Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
-rw-r--r--include/fdt_support.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 8f06aac..0091dc3 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -36,6 +36,13 @@ void do_fixup_by_path(void *fdt, const char *path, const char *prop,
const void *val, int len, int create);
void do_fixup_by_path_u32(void *fdt, const char *path, const char *prop,
u32 val, int create);
+
+static inline void do_fixup_by_path_string(void *fdt, const char *path,
+ const char *prop, const char *status)
+{
+ do_fixup_by_path(fdt, path, prop, status, strlen(status) + 1, 1);
+}
+
void do_fixup_by_prop(void *fdt,
const char *pname, const void *pval, int plen,
const char *prop, const void *val, int len,