summaryrefslogtreecommitdiff
path: root/include/libfdt.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-10-12 23:25:50 +0200
committerWolfgang Denk <wd@denx.de>2008-10-12 23:25:50 +0200
commit1e841086df55d6b8f2efcf0e5dfb5fc52a0c7bbe (patch)
treee649f78027dcb8432d90f99aed284d711b36582d /include/libfdt.h
parent33af3e6656e84660d397b5dd95abab2dccc36f83 (diff)
parent72c55878ecb1f0fdc8bc13516e5cb18fbae505e7 (diff)
downloadu-boot-imx-1e841086df55d6b8f2efcf0e5dfb5fc52a0c7bbe.zip
u-boot-imx-1e841086df55d6b8f2efcf0e5dfb5fc52a0c7bbe.tar.gz
u-boot-imx-1e841086df55d6b8f2efcf0e5dfb5fc52a0c7bbe.tar.bz2
Merge branch 'master' of ssh://10.10.0.7/home/wd/git/u-boot/master
Diffstat (limited to 'include/libfdt.h')
-rw-r--r--include/libfdt.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/include/libfdt.h b/include/libfdt.h
index 94c35e3..ce374fd 100644
--- a/include/libfdt.h
+++ b/include/libfdt.h
@@ -122,7 +122,7 @@
/* Low-level functions (you probably don't need these) */
/**********************************************************************/
-const void *fdt_offset_ptr(const void *fdt, int offset, int checklen);
+const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int checklen);
static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
{
return (void *)(uintptr_t)fdt_offset_ptr(fdt, offset, checklen);
@@ -459,6 +459,32 @@ static inline void *fdt_getprop_w(void *fdt, int nodeoffset,
uint32_t fdt_get_phandle(const void *fdt, int nodeoffset);
/**
+ * fdt_get_alias_namelen - get alias based on substring
+ * @fdt: pointer to the device tree blob
+ * @name: name of the alias th look up
+ * @namelen: number of characters of name to consider
+ *
+ * Identical to fdt_get_alias(), but only examine the first namelen
+ * characters of name for matching the alias name.
+ */
+const char *fdt_get_alias_namelen(const void *fdt,
+ const char *name, int namelen);
+
+/**
+ * fdt_get_alias - retreive the path referenced by a given alias
+ * @fdt: pointer to the device tree blob
+ * @name: name of the alias th look up
+ *
+ * fdt_get_alias() retrieves the value of a given alias. That is, the
+ * value of the property named 'name' in the node /aliases.
+ *
+ * returns:
+ * a pointer to the expansion of the alias named 'name', of it exists
+ * NULL, if the given alias or the /aliases node does not exist
+ */
+const char *fdt_get_alias(const void *fdt, const char *name);
+
+/**
* fdt_get_path - determine the full path of a node
* @fdt: pointer to the device tree blob
* @nodeoffset: offset of the node whose path to find