]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Include/libfdt.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / EmbeddedPkg / Include / libfdt.h
index 1aabec37f665a0d03d5437f21c8ddd1010e93816..6105b9c0750a4d72b8d48eb2cbd5dbfaa25979ca 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef _LIBFDT_H\r
 #define _LIBFDT_H\r
+\r
 /*\r
  * libfdt - Flat Device Tree manipulation\r
  * Copyright (C) 2006 David Gibson, IBM Corporation.\r
 #include <libfdt_env.h>\r
 #include <fdt.h>\r
 \r
-#define FDT_FIRST_SUPPORTED_VERSION    0x10\r
-#define FDT_LAST_SUPPORTED_VERSION     0x11\r
+#define FDT_FIRST_SUPPORTED_VERSION  0x10\r
+#define FDT_LAST_SUPPORTED_VERSION   0x11\r
 \r
 /* Error codes: informative error codes */\r
-#define FDT_ERR_NOTFOUND       1\r
-       /* FDT_ERR_NOTFOUND: The requested node or property does not exist */\r
-#define FDT_ERR_EXISTS         2\r
-       /* FDT_ERR_EXISTS: Attempted to create a node or property which\r
-        * already exists */\r
-#define FDT_ERR_NOSPACE                3\r
-       /* FDT_ERR_NOSPACE: Operation needed to expand the device\r
-        * tree, but its buffer did not have sufficient space to\r
-        * contain the expanded tree. Use fdt_open_into() to move the\r
-        * device tree to a buffer with more space. */\r
+#define FDT_ERR_NOTFOUND  1\r
+/* FDT_ERR_NOTFOUND: The requested node or property does not exist */\r
+#define FDT_ERR_EXISTS  2\r
+\r
+/* FDT_ERR_EXISTS: Attempted to create a node or property which\r
+ * already exists */\r
+#define FDT_ERR_NOSPACE  3\r
+\r
+/* FDT_ERR_NOSPACE: Operation needed to expand the device\r
+ * tree, but its buffer did not have sufficient space to\r
+ * contain the expanded tree. Use fdt_open_into() to move the\r
+ * device tree to a buffer with more space. */\r
 \r
 /* Error codes: codes for bad parameters */\r
-#define FDT_ERR_BADOFFSET      4\r
-       /* FDT_ERR_BADOFFSET: Function was passed a structure block\r
-        * offset which is out-of-bounds, or which points to an\r
-        * unsuitable part of the structure for the operation. */\r
-#define FDT_ERR_BADPATH                5\r
-       /* FDT_ERR_BADPATH: Function was passed a badly formatted path\r
-        * (e.g. missing a leading / for a function which requires an\r
-        * absolute path) */\r
-#define FDT_ERR_BADPHANDLE     6\r
-       /* FDT_ERR_BADPHANDLE: Function was passed an invalid phandle.\r
-        * This can be caused either by an invalid phandle property\r
-        * length, or the phandle value was either 0 or -1, which are\r
-        * not permitted. */\r
-#define FDT_ERR_BADSTATE       7\r
-       /* FDT_ERR_BADSTATE: Function was passed an incomplete device\r
-        * tree created by the sequential-write functions, which is\r
-        * not sufficiently complete for the requested operation. */\r
+#define FDT_ERR_BADOFFSET  4\r
+\r
+/* FDT_ERR_BADOFFSET: Function was passed a structure block\r
+ * offset which is out-of-bounds, or which points to an\r
+ * unsuitable part of the structure for the operation. */\r
+#define FDT_ERR_BADPATH  5\r
+\r
+/* FDT_ERR_BADPATH: Function was passed a badly formatted path\r
+ * (e.g. missing a leading / for a function which requires an\r
+ * absolute path) */\r
+#define FDT_ERR_BADPHANDLE  6\r
+\r
+/* FDT_ERR_BADPHANDLE: Function was passed an invalid phandle.\r
+ * This can be caused either by an invalid phandle property\r
+ * length, or the phandle value was either 0 or -1, which are\r
+ * not permitted. */\r
+#define FDT_ERR_BADSTATE  7\r
+\r
+/* FDT_ERR_BADSTATE: Function was passed an incomplete device\r
+ * tree created by the sequential-write functions, which is\r
+ * not sufficiently complete for the requested operation. */\r
 \r
 /* Error codes: codes for bad device tree blobs */\r
-#define FDT_ERR_TRUNCATED      8\r
-       /* FDT_ERR_TRUNCATED: Structure block of the given device tree\r
-        * ends without an FDT_END tag. */\r
-#define FDT_ERR_BADMAGIC       9\r
-       /* FDT_ERR_BADMAGIC: Given "device tree" appears not to be a\r
-        * device tree at all - it is missing the flattened device\r
-        * tree magic number. */\r
-#define FDT_ERR_BADVERSION     10\r
-       /* FDT_ERR_BADVERSION: Given device tree has a version which\r
-        * can't be handled by the requested operation.  For\r
-        * read-write functions, this may mean that fdt_open_into() is\r
-        * required to convert the tree to the expected version. */\r
-#define FDT_ERR_BADSTRUCTURE   11\r
-       /* FDT_ERR_BADSTRUCTURE: Given device tree has a corrupt\r
-        * structure block or other serious error (e.g. misnested\r
-        * nodes, or subnodes preceding properties). */\r
-#define FDT_ERR_BADLAYOUT      12\r
-       /* FDT_ERR_BADLAYOUT: For read-write functions, the given\r
-        * device tree has it's sub-blocks in an order that the\r
-        * function can't handle (memory reserve map, then structure,\r
-        * then strings).  Use fdt_open_into() to reorganize the tree\r
-        * into a form suitable for the read-write operations. */\r
+#define FDT_ERR_TRUNCATED  8\r
+\r
+/* FDT_ERR_TRUNCATED: Structure block of the given device tree\r
+ * ends without an FDT_END tag. */\r
+#define FDT_ERR_BADMAGIC  9\r
+\r
+/* FDT_ERR_BADMAGIC: Given "device tree" appears not to be a\r
+ * device tree at all - it is missing the flattened device\r
+ * tree magic number. */\r
+#define FDT_ERR_BADVERSION  10\r
+\r
+/* FDT_ERR_BADVERSION: Given device tree has a version which\r
+ * can't be handled by the requested operation.  For\r
+ * read-write functions, this may mean that fdt_open_into() is\r
+ * required to convert the tree to the expected version. */\r
+#define FDT_ERR_BADSTRUCTURE  11\r
+\r
+/* FDT_ERR_BADSTRUCTURE: Given device tree has a corrupt\r
+ * structure block or other serious error (e.g. misnested\r
+ * nodes, or subnodes preceding properties). */\r
+#define FDT_ERR_BADLAYOUT  12\r
+\r
+/* FDT_ERR_BADLAYOUT: For read-write functions, the given\r
+ * device tree has it's sub-blocks in an order that the\r
+ * function can't handle (memory reserve map, then structure,\r
+ * then strings).  Use fdt_open_into() to reorganize the tree\r
+ * into a form suitable for the read-write operations. */\r
 \r
 /* "Can't happen" error indicating a bug in libfdt */\r
-#define FDT_ERR_INTERNAL       13\r
-       /* FDT_ERR_INTERNAL: libfdt has failed an internal assertion.\r
-        * Should never be returned, if it is, it indicates a bug in\r
-        * libfdt itself. */\r
+#define FDT_ERR_INTERNAL  13\r
+\r
+/* FDT_ERR_INTERNAL: libfdt has failed an internal assertion.\r
+ * Should never be returned, if it is, it indicates a bug in\r
+ * libfdt itself. */\r
 \r
 /* Errors in device tree content */\r
-#define FDT_ERR_BADNCELLS      14\r
-       /* FDT_ERR_BADNCELLS: Device tree has a #address-cells, #size-cells\r
-        * or similar property with a bad format or value */\r
+#define FDT_ERR_BADNCELLS  14\r
+\r
+/* FDT_ERR_BADNCELLS: Device tree has a #address-cells, #size-cells\r
+ * or similar property with a bad format or value */\r
+\r
+#define FDT_ERR_BADVALUE  15\r
 \r
-#define FDT_ERR_BADVALUE       15\r
-       /* FDT_ERR_BADVALUE: Device tree has a property with an unexpected\r
-        * value. For example: a property expected to contain a string list\r
-        * is not NUL-terminated within the length of its value. */\r
+/* FDT_ERR_BADVALUE: Device tree has a property with an unexpected\r
+ * value. For example: a property expected to contain a string list\r
+ * is not NUL-terminated within the length of its value. */\r
 \r
-#define FDT_ERR_BADOVERLAY     16\r
-       /* FDT_ERR_BADOVERLAY: The device tree overlay, while\r
-        * correctly structured, cannot be applied due to some\r
-        * unexpected or missing value, property or node. */\r
+#define FDT_ERR_BADOVERLAY  16\r
 \r
-#define FDT_ERR_NOPHANDLES     17\r
-       /* FDT_ERR_NOPHANDLES: The device tree doesn't have any\r
       * phandle available anymore without causing an overflow */\r
+/* FDT_ERR_BADOVERLAY: The device tree overlay, while\r
+ * correctly structured, cannot be applied due to some\r
* unexpected or missing value, property or node. */\r
 \r
-#define FDT_ERR_MAX            17\r
+#define FDT_ERR_NOPHANDLES  17\r
+\r
+/* FDT_ERR_NOPHANDLES: The device tree doesn't have any\r
+ * phandle available anymore without causing an overflow */\r
+\r
+#define FDT_ERR_MAX  17\r
 \r
 /**********************************************************************/\r
 /* Low-level functions (you probably don't need these)                */\r
 /**********************************************************************/\r
 \r
 #ifndef SWIG /* This function is not useful in Python */\r
-const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int checklen);\r
+const void *\r
+fdt_offset_ptr (\r
+  const void    *fdt,\r
+  int           offset,\r
+  unsigned int  checklen\r
+  );\r
+\r
 #endif\r
-static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)\r
+static inline void *\r
+fdt_offset_ptr_w (\r
+  void  *fdt,\r
+  int   offset,\r
+  int   checklen\r
+  )\r
 {\r
-       return (void *)(uintptr_t)fdt_offset_ptr(fdt, offset, checklen);\r
+  return (void *)(uintptr_t)fdt_offset_ptr (fdt, offset, checklen);\r
 }\r
 \r
-uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset);\r
+uint32_t\r
+fdt_next_tag (\r
+  const void  *fdt,\r
+  int         offset,\r
+  int         *nextoffset\r
+  );\r
 \r
 /**********************************************************************/\r
 /* Traversal functions                                                */\r
 /**********************************************************************/\r
 \r
-int fdt_next_node(const void *fdt, int offset, int *depth);\r
+int\r
+fdt_next_node (\r
+  const void  *fdt,\r
+  int         offset,\r
+  int         *depth\r
+  );\r
 \r
 /**\r
  * fdt_first_subnode() - get offset of first direct subnode\r
  *\r
- * @fdt:       FDT blob\r
- * @offset:    Offset of node to check\r
+ * @fdt:        FDT blob\r
+ * @offset:     Offset of node to check\r
  * @return offset of first subnode, or -FDT_ERR_NOTFOUND if there is none\r
  */\r
-int fdt_first_subnode(const void *fdt, int offset);\r
+int\r
+fdt_first_subnode (\r
+  const void  *fdt,\r
+  int         offset\r
+  );\r
 \r
 /**\r
  * fdt_next_subnode() - get offset of next direct subnode\r
@@ -174,73 +216,77 @@ int fdt_first_subnode(const void *fdt, int offset);
  * After first calling fdt_first_subnode(), call this function repeatedly to\r
  * get direct subnodes of a parent node.\r
  *\r
- * @fdt:       FDT blob\r
- * @offset:    Offset of previous subnode\r
+ * @fdt:        FDT blob\r
+ * @offset:     Offset of previous subnode\r
  * @return offset of next subnode, or -FDT_ERR_NOTFOUND if there are no more\r
  * subnodes\r
  */\r
-int fdt_next_subnode(const void *fdt, int offset);\r
+int\r
+fdt_next_subnode (\r
+  const void  *fdt,\r
+  int         offset\r
+  );\r
 \r
 /**\r
  * fdt_for_each_subnode - iterate over all subnodes of a parent\r
  *\r
- * @node:      child node (int, lvalue)\r
- * @fdt:       FDT blob (const void *)\r
- * @parent:    parent node (int)\r
+ * @node:       child node (int, lvalue)\r
+ * @fdt:        FDT blob (const void *)\r
+ * @parent:     parent node (int)\r
  *\r
  * This is actually a wrapper around a for loop and would be used like so:\r
  *\r
- *     fdt_for_each_subnode(node, fdt, parent) {\r
- *             Use node\r
- *             ...\r
- *     }\r
+ *      fdt_for_each_subnode(node, fdt, parent) {\r
+ *              Use node\r
+ *              ...\r
+ *      }\r
  *\r
- *     if ((node < 0) && (node != -FDT_ERR_NOT_FOUND)) {\r
- *             Error handling\r
- *     }\r
+ *      if ((node < 0) && (node != -FDT_ERR_NOT_FOUND)) {\r
+ *              Error handling\r
+ *      }\r
  *\r
  * Note that this is implemented as a macro and @node is used as\r
  * iterator in the loop. The parent variable be constant or even a\r
  * literal.\r
  *\r
  */\r
-#define fdt_for_each_subnode(node, fdt, parent)                \\r
-       for (node = fdt_first_subnode(fdt, parent);     \\r
-            node >= 0;                                 \\r
-            node = fdt_next_subnode(fdt, node))\r
+#define fdt_for_each_subnode(node, fdt, parent)         \\r
+        for (node = fdt_first_subnode(fdt, parent);     \\r
+             node >= 0;                                 \\r
+             node = fdt_next_subnode(fdt, node))\r
 \r
 /**********************************************************************/\r
 /* General functions                                                  */\r
 /**********************************************************************/\r
 #define fdt_get_header(fdt, field) \\r
-       (fdt32_to_cpu(((const struct fdt_header *)(fdt))->field))\r
-#define fdt_magic(fdt)                 (fdt_get_header(fdt, magic))\r
-#define fdt_totalsize(fdt)             (fdt_get_header(fdt, totalsize))\r
-#define fdt_off_dt_struct(fdt)         (fdt_get_header(fdt, off_dt_struct))\r
-#define fdt_off_dt_strings(fdt)                (fdt_get_header(fdt, off_dt_strings))\r
-#define fdt_off_mem_rsvmap(fdt)                (fdt_get_header(fdt, off_mem_rsvmap))\r
-#define fdt_version(fdt)               (fdt_get_header(fdt, version))\r
-#define fdt_last_comp_version(fdt)     (fdt_get_header(fdt, last_comp_version))\r
-#define fdt_boot_cpuid_phys(fdt)       (fdt_get_header(fdt, boot_cpuid_phys))\r
-#define fdt_size_dt_strings(fdt)       (fdt_get_header(fdt, size_dt_strings))\r
-#define fdt_size_dt_struct(fdt)                (fdt_get_header(fdt, size_dt_struct))\r
+        (fdt32_to_cpu(((const struct fdt_header *)(fdt))->field))\r
+#define fdt_magic(fdt)              (fdt_get_header(fdt, magic))\r
+#define fdt_totalsize(fdt)          (fdt_get_header(fdt, totalsize))\r
+#define fdt_off_dt_struct(fdt)      (fdt_get_header(fdt, off_dt_struct))\r
+#define fdt_off_dt_strings(fdt)     (fdt_get_header(fdt, off_dt_strings))\r
+#define fdt_off_mem_rsvmap(fdt)     (fdt_get_header(fdt, off_mem_rsvmap))\r
+#define fdt_version(fdt)            (fdt_get_header(fdt, version))\r
+#define fdt_last_comp_version(fdt)  (fdt_get_header(fdt, last_comp_version))\r
+#define fdt_boot_cpuid_phys(fdt)    (fdt_get_header(fdt, boot_cpuid_phys))\r
+#define fdt_size_dt_strings(fdt)    (fdt_get_header(fdt, size_dt_strings))\r
+#define fdt_size_dt_struct(fdt)     (fdt_get_header(fdt, size_dt_struct))\r
 \r
 #define __fdt_set_hdr(name) \\r
-       static inline void fdt_set_##name(void *fdt, uint32_t val) \\r
-       { \\r
-               struct fdt_header *fdth = (struct fdt_header *)fdt; \\r
-               fdth->name = cpu_to_fdt32(val); \\r
-       }\r
-__fdt_set_hdr(magic);\r
-__fdt_set_hdr(totalsize);\r
-__fdt_set_hdr(off_dt_struct);\r
-__fdt_set_hdr(off_dt_strings);\r
-__fdt_set_hdr(off_mem_rsvmap);\r
-__fdt_set_hdr(version);\r
-__fdt_set_hdr(last_comp_version);\r
-__fdt_set_hdr(boot_cpuid_phys);\r
-__fdt_set_hdr(size_dt_strings);\r
-__fdt_set_hdr(size_dt_struct);\r
+        static inline void fdt_set_##name(void *fdt, uint32_t val) \\r
+        { \\r
+                struct fdt_header *fdth = (struct fdt_header *)fdt; \\r
+                fdth->name = cpu_to_fdt32(val); \\r
+        }\r
+__fdt_set_hdr (magic);\r
+__fdt_set_hdr (totalsize);\r
+__fdt_set_hdr (off_dt_struct);\r
+__fdt_set_hdr (off_dt_strings);\r
+__fdt_set_hdr (off_mem_rsvmap);\r
+__fdt_set_hdr (version);\r
+__fdt_set_hdr (last_comp_version);\r
+__fdt_set_hdr (boot_cpuid_phys);\r
+__fdt_set_hdr (size_dt_strings);\r
+__fdt_set_hdr (size_dt_struct);\r
 #undef __fdt_set_hdr\r
 \r
 /**\r
@@ -257,7 +303,10 @@ __fdt_set_hdr(size_dt_struct);
  *     -FDT_ERR_BADVERSION,\r
  *     -FDT_ERR_BADSTATE, standard meanings, as above\r
  */\r
-int fdt_check_header(const void *fdt);\r
+int\r
+fdt_check_header (\r
+  const void  *fdt\r
+  );\r
 \r
 /**\r
  * fdt_move - move a device tree around in memory\r
@@ -278,7 +327,12 @@ int fdt_check_header(const void *fdt);
  *     -FDT_ERR_BADVERSION,\r
  *     -FDT_ERR_BADSTATE, standard meanings\r
  */\r
-int fdt_move(const void *fdt, void *buf, int bufsize);\r
+int\r
+fdt_move (\r
+  const void  *fdt,\r
+  void        *buf,\r
+  int         bufsize\r
+  );\r
 \r
 /**********************************************************************/\r
 /* Read-only functions                                                */\r
@@ -296,7 +350,11 @@ int fdt_move(const void *fdt, void *buf, int bufsize);
  *     a pointer to the string, on success\r
  *     NULL, if stroffset is out of bounds\r
  */\r
-const char *fdt_string(const void *fdt, int stroffset);\r
+const char *\r
+fdt_string (\r
+  const void  *fdt,\r
+  int         stroffset\r
+  );\r
 \r
 /**\r
  * fdt_get_max_phandle - retrieves the highest phandle in a tree\r
@@ -311,7 +369,10 @@ const char *fdt_string(const void *fdt, int stroffset);
  *      0, if no phandle was found in the device tree\r
  *      -1, if an error occurred\r
  */\r
-uint32_t fdt_get_max_phandle(const void *fdt);\r
+uint32_t\r
+fdt_get_max_phandle (\r
+  const void  *fdt\r
+  );\r
 \r
 /**\r
  * fdt_num_mem_rsv - retrieve the number of memory reserve map entries\r
@@ -324,7 +385,10 @@ uint32_t fdt_get_max_phandle(const void *fdt);
  * returns:\r
  *     the number of entries\r
  */\r
-int fdt_num_mem_rsv(const void *fdt);\r
+int\r
+fdt_num_mem_rsv (\r
+  const void  *fdt\r
+  );\r
 \r
 /**\r
  * fdt_get_mem_rsv - retrieve one memory reserve map entry\r
@@ -341,7 +405,13 @@ int fdt_num_mem_rsv(const void *fdt);
  *     -FDT_ERR_BADVERSION,\r
  *     -FDT_ERR_BADSTATE, standard meanings\r
  */\r
-int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size);\r
+int\r
+fdt_get_mem_rsv (\r
+  const void  *fdt,\r
+  int         n,\r
+  uint64_t    *address,\r
+  uint64_t    *size\r
+  );\r
 \r
 /**\r
  * fdt_subnode_offset_namelen - find a subnode based on substring\r
@@ -356,9 +426,16 @@ int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size);
  * such as a full path.\r
  */\r
 #ifndef SWIG /* Not available in Python */\r
-int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,\r
-                              const char *name, int namelen);\r
+int\r
+fdt_subnode_offset_namelen (\r
+  const void  *fdt,\r
+  int         parentoffset,\r
+  const char  *name,\r
+  int         namelen\r
+  );\r
+\r
 #endif\r
+\r
 /**\r
  * fdt_subnode_offset - find a subnode of a given node\r
  * @fdt: pointer to the device tree blob\r
@@ -373,17 +450,22 @@ int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
  * whose name excluding unit address matches the given name.\r
  *\r
  * returns:\r
- *     structure block offset of the requested subnode (>=0), on success\r
- *     -FDT_ERR_NOTFOUND, if the requested subnode does not exist\r
- *     -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE\r
- *             tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings.\r
+ *      structure block offset of the requested subnode (>=0), on success\r
+ *      -FDT_ERR_NOTFOUND, if the requested subnode does not exist\r
+ *      -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE\r
+ *              tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings.\r
  */\r
-int fdt_subnode_offset(const void *fdt, int parentoffset, const char *name);\r
+int\r
+fdt_subnode_offset (\r
+  const void  *fdt,\r
+  int         parentoffset,\r
+  const char  *name\r
+  );\r
 \r
 /**\r
  * fdt_path_offset_namelen - find a tree node by its full path\r
@@ -395,7 +477,13 @@ int fdt_subnode_offset(const void *fdt, int parentoffset, const char *name);
  * characters of path as the path name.\r
  */\r
 #ifndef SWIG /* Not available in Python */\r
-int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen);\r
+int\r
+fdt_path_offset_namelen (\r
+  const void  *fdt,\r
+  const char  *path,\r
+  int         namelen\r
+  );\r
+\r
 #endif\r
 \r
 /**\r
@@ -411,17 +499,21 @@ int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen);
  * address).\r
  *\r
  * returns:\r
- *     structure block offset of the node with the requested path (>=0), on\r
- *             success\r
- *     -FDT_ERR_BADPATH, given path does not begin with '/' or is invalid\r
- *     -FDT_ERR_NOTFOUND, if the requested node does not exist\r
+ *      structure block offset of the node with the requested path (>=0), on\r
+ *              success\r
+ *      -FDT_ERR_BADPATH, given path does not begin with '/' or is invalid\r
+ *      -FDT_ERR_NOTFOUND, if the requested node does not exist\r
  *      -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings.\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings.\r
  */\r
-int fdt_path_offset(const void *fdt, const char *path);\r
+int\r
+fdt_path_offset (\r
+  const void  *fdt,\r
+  const char  *path\r
+  );\r
 \r
 /**\r
  * fdt_get_name - retrieve the name of a given node\r
@@ -435,18 +527,23 @@ int fdt_path_offset(const void *fdt, const char *path);
  * pointed to by lenp.\r
  *\r
  * returns:\r
- *     pointer to the node's name, on success\r
- *             If lenp is non-NULL, *lenp contains the length of that name\r
- *                     (>=0)\r
- *     NULL, on error\r
- *             if lenp is non-NULL *lenp contains an error code (<0):\r
- *             -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE\r
- *                     tag\r
- *             -FDT_ERR_BADMAGIC,\r
- *             -FDT_ERR_BADVERSION,\r
- *             -FDT_ERR_BADSTATE, standard meanings\r
- */\r
-const char *fdt_get_name(const void *fdt, int nodeoffset, int *lenp);\r
+ *      pointer to the node's name, on success\r
+ *              If lenp is non-NULL, *lenp contains the length of that name\r
+ *                      (>=0)\r
+ *      NULL, on error\r
+ *              if lenp is non-NULL *lenp contains an error code (<0):\r
+ *              -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE\r
+ *                      tag\r
+ *              -FDT_ERR_BADMAGIC,\r
+ *              -FDT_ERR_BADVERSION,\r
+ *              -FDT_ERR_BADSTATE, standard meanings\r
+ */\r
+const char *\r
+fdt_get_name (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  int         *lenp\r
+  );\r
 \r
 /**\r
  * fdt_first_property_offset - find the offset of a node's first property\r
@@ -457,16 +554,20 @@ const char *fdt_get_name(const void *fdt, int nodeoffset, int *lenp);
  * the given structure block offset.\r
  *\r
  * returns:\r
- *     structure block offset of the property (>=0), on success\r
- *     -FDT_ERR_NOTFOUND, if the requested node has no properties\r
- *     -FDT_ERR_BADOFFSET, if nodeoffset did not point to an FDT_BEGIN_NODE tag\r
+ *      structure block offset of the property (>=0), on success\r
+ *      -FDT_ERR_NOTFOUND, if the requested node has no properties\r
+ *      -FDT_ERR_BADOFFSET, if nodeoffset did not point to an FDT_BEGIN_NODE tag\r
  *      -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings.\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings.\r
  */\r
-int fdt_first_property_offset(const void *fdt, int nodeoffset);\r
+int\r
+fdt_first_property_offset (\r
+  const void  *fdt,\r
+  int         nodeoffset\r
+  );\r
 \r
 /**\r
  * fdt_next_property_offset - step through a node's properties\r
@@ -478,43 +579,47 @@ int fdt_first_property_offset(const void *fdt, int nodeoffset);
  * of the same node as the given property.\r
  *\r
  * returns:\r
- *     structure block offset of the next property (>=0), on success\r
- *     -FDT_ERR_NOTFOUND, if the given property is the last in its node\r
- *     -FDT_ERR_BADOFFSET, if nodeoffset did not point to an FDT_PROP tag\r
+ *      structure block offset of the next property (>=0), on success\r
+ *      -FDT_ERR_NOTFOUND, if the given property is the last in its node\r
+ *      -FDT_ERR_BADOFFSET, if nodeoffset did not point to an FDT_PROP tag\r
  *      -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings.\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings.\r
  */\r
-int fdt_next_property_offset(const void *fdt, int offset);\r
+int\r
+fdt_next_property_offset (\r
+  const void  *fdt,\r
+  int         offset\r
+  );\r
 \r
 /**\r
  * fdt_for_each_property_offset - iterate over all properties of a node\r
  *\r
- * @property_offset:   property offset (int, lvalue)\r
- * @fdt:               FDT blob (const void *)\r
- * @node:              node offset (int)\r
+ * @property_offset:    property offset (int, lvalue)\r
+ * @fdt:                FDT blob (const void *)\r
+ * @node:               node offset (int)\r
  *\r
  * This is actually a wrapper around a for loop and would be used like so:\r
  *\r
- *     fdt_for_each_property_offset(property, fdt, node) {\r
- *             Use property\r
- *             ...\r
- *     }\r
+ *      fdt_for_each_property_offset(property, fdt, node) {\r
+ *              Use property\r
+ *              ...\r
+ *      }\r
  *\r
- *     if ((property < 0) && (property != -FDT_ERR_NOT_FOUND)) {\r
- *             Error handling\r
- *     }\r
+ *      if ((property < 0) && (property != -FDT_ERR_NOT_FOUND)) {\r
+ *              Error handling\r
+ *      }\r
  *\r
  * Note that this is implemented as a macro and property is used as\r
  * iterator in the loop. The node variable can be constant or even a\r
  * literal.\r
  */\r
-#define fdt_for_each_property_offset(property, fdt, node)      \\r
-       for (property = fdt_first_property_offset(fdt, node);   \\r
-            property >= 0;                                     \\r
-            property = fdt_next_property_offset(fdt, property))\r
+#define fdt_for_each_property_offset(property, fdt, node)       \\r
+        for (property = fdt_first_property_offset(fdt, node);   \\r
+             property >= 0;                                     \\r
+             property = fdt_next_property_offset(fdt, property))\r
 \r
 /**\r
  * fdt_get_property_by_offset - retrieve the property at a given offset\r
@@ -528,21 +633,24 @@ int fdt_next_property_offset(const void *fdt, int offset);
  * also returned, in the integer pointed to by lenp.\r
  *\r
  * returns:\r
- *     pointer to the structure representing the property\r
- *             if lenp is non-NULL, *lenp contains the length of the property\r
- *             value (>=0)\r
- *     NULL, on error\r
- *             if lenp is non-NULL, *lenp contains an error code (<0):\r
- *             -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_PROP tag\r
- *             -FDT_ERR_BADMAGIC,\r
- *             -FDT_ERR_BADVERSION,\r
- *             -FDT_ERR_BADSTATE,\r
- *             -FDT_ERR_BADSTRUCTURE,\r
- *             -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-const struct fdt_property *fdt_get_property_by_offset(const void *fdt,\r
-                                                     int offset,\r
-                                                     int *lenp);\r
+ *      pointer to the structure representing the property\r
+ *              if lenp is non-NULL, *lenp contains the length of the property\r
+ *              value (>=0)\r
+ *      NULL, on error\r
+ *              if lenp is non-NULL, *lenp contains an error code (<0):\r
+ *              -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_PROP tag\r
+ *              -FDT_ERR_BADMAGIC,\r
+ *              -FDT_ERR_BADVERSION,\r
+ *              -FDT_ERR_BADSTATE,\r
+ *              -FDT_ERR_BADSTRUCTURE,\r
+ *              -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+const struct fdt_property *\r
+fdt_get_property_by_offset (\r
+  const void  *fdt,\r
+  int         offset,\r
+  int         *lenp\r
+  );\r
 \r
 /**\r
  * fdt_get_property_namelen - find a property based on substring\r
@@ -556,10 +664,15 @@ const struct fdt_property *fdt_get_property_by_offset(const void *fdt,
  * characters of name for matching the property name.\r
  */\r
 #ifndef SWIG /* Not available in Python */\r
-const struct fdt_property *fdt_get_property_namelen(const void *fdt,\r
-                                                   int nodeoffset,\r
-                                                   const char *name,\r
-                                                   int namelen, int *lenp);\r
+const struct fdt_property *\r
+fdt_get_property_namelen (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  int         namelen,\r
+  int         *lenp\r
+  );\r
+\r
 #endif\r
 \r
 /**\r
@@ -576,28 +689,38 @@ const struct fdt_property *fdt_get_property_namelen(const void *fdt,
  * integer pointed to by lenp.\r
  *\r
  * returns:\r
- *     pointer to the structure representing the property\r
- *             if lenp is non-NULL, *lenp contains the length of the property\r
- *             value (>=0)\r
- *     NULL, on error\r
- *             if lenp is non-NULL, *lenp contains an error code (<0):\r
- *             -FDT_ERR_NOTFOUND, node does not have named property\r
- *             -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE\r
- *                     tag\r
- *             -FDT_ERR_BADMAGIC,\r
- *             -FDT_ERR_BADVERSION,\r
- *             -FDT_ERR_BADSTATE,\r
- *             -FDT_ERR_BADSTRUCTURE,\r
- *             -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-const struct fdt_property *fdt_get_property(const void *fdt, int nodeoffset,\r
-                                           const char *name, int *lenp);\r
-static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset,\r
-                                                     const char *name,\r
-                                                     int *lenp)\r
+ *      pointer to the structure representing the property\r
+ *              if lenp is non-NULL, *lenp contains the length of the property\r
+ *              value (>=0)\r
+ *      NULL, on error\r
+ *              if lenp is non-NULL, *lenp contains an error code (<0):\r
+ *              -FDT_ERR_NOTFOUND, node does not have named property\r
+ *              -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE\r
+ *                      tag\r
+ *              -FDT_ERR_BADMAGIC,\r
+ *              -FDT_ERR_BADVERSION,\r
+ *              -FDT_ERR_BADSTATE,\r
+ *              -FDT_ERR_BADSTRUCTURE,\r
+ *              -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+const struct fdt_property *\r
+fdt_get_property (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  int         *lenp\r
+  );\r
+\r
+static inline struct fdt_property *\r
+fdt_get_property_w (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  int         *lenp\r
+  )\r
 {\r
-       return (struct fdt_property *)(uintptr_t)\r
-               fdt_get_property(fdt, nodeoffset, name, lenp);\r
+  return (struct fdt_property *)(uintptr_t)\r
+         fdt_get_property (fdt, nodeoffset, name, lenp);\r
 }\r
 \r
 /**\r
@@ -617,23 +740,29 @@ static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset,
  * block, not a new copy of the name).\r
  *\r
  * returns:\r
- *     pointer to the property's value\r
- *             if lenp is non-NULL, *lenp contains the length of the property\r
- *             value (>=0)\r
- *             if namep is non-NULL *namep contiains a pointer to the property\r
- *             name.\r
- *     NULL, on error\r
- *             if lenp is non-NULL, *lenp contains an error code (<0):\r
- *             -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_PROP tag\r
- *             -FDT_ERR_BADMAGIC,\r
- *             -FDT_ERR_BADVERSION,\r
- *             -FDT_ERR_BADSTATE,\r
- *             -FDT_ERR_BADSTRUCTURE,\r
- *             -FDT_ERR_TRUNCATED, standard meanings\r
+ *      pointer to the property's value\r
+ *              if lenp is non-NULL, *lenp contains the length of the property\r
+ *              value (>=0)\r
+ *              if namep is non-NULL *namep contiains a pointer to the property\r
+ *              name.\r
+ *      NULL, on error\r
+ *              if lenp is non-NULL, *lenp contains an error code (<0):\r
+ *              -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_PROP tag\r
+ *              -FDT_ERR_BADMAGIC,\r
+ *              -FDT_ERR_BADVERSION,\r
+ *              -FDT_ERR_BADSTATE,\r
+ *              -FDT_ERR_BADSTRUCTURE,\r
+ *              -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
 #ifndef SWIG /* This function is not useful in Python */\r
-const void *fdt_getprop_by_offset(const void *fdt, int offset,\r
-                                 const char **namep, int *lenp);\r
+const void *\r
+fdt_getprop_by_offset (\r
+  const void  *fdt,\r
+  int         offset,\r
+  const char  **namep,\r
+  int         *lenp\r
+  );\r
+\r
 #endif\r
 \r
 /**\r
@@ -648,15 +777,33 @@ const void *fdt_getprop_by_offset(const void *fdt, int offset,
  * characters of name for matching the property name.\r
  */\r
 #ifndef SWIG /* Not available in Python */\r
-const void *fdt_getprop_namelen(const void *fdt, int nodeoffset,\r
-                               const char *name, int namelen, int *lenp);\r
-static inline void *fdt_getprop_namelen_w(void *fdt, int nodeoffset,\r
-                                         const char *name, int namelen,\r
-                                         int *lenp)\r
+const void *\r
+fdt_getprop_namelen (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  int         namelen,\r
+  int         *lenp\r
+  );\r
+\r
+static inline void *\r
+fdt_getprop_namelen_w (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  int         namelen,\r
+  int         *lenp\r
+  )\r
 {\r
-       return (void *)(uintptr_t)fdt_getprop_namelen(fdt, nodeoffset, name,\r
-                                                     namelen, lenp);\r
+  return (void *)(uintptr_t)fdt_getprop_namelen (\r
+                              fdt,\r
+                              nodeoffset,\r
+                              name,\r
+                              namelen,\r
+                              lenp\r
+                              );\r
 }\r
+\r
 #endif\r
 \r
 /**\r
@@ -673,26 +820,37 @@ static inline void *fdt_getprop_namelen_w(void *fdt, int nodeoffset,
  * returned, in the integer pointed to by lenp.\r
  *\r
  * returns:\r
- *     pointer to the property's value\r
- *             if lenp is non-NULL, *lenp contains the length of the property\r
- *             value (>=0)\r
- *     NULL, on error\r
- *             if lenp is non-NULL, *lenp contains an error code (<0):\r
- *             -FDT_ERR_NOTFOUND, node does not have named property\r
- *             -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE\r
- *                     tag\r
- *             -FDT_ERR_BADMAGIC,\r
- *             -FDT_ERR_BADVERSION,\r
- *             -FDT_ERR_BADSTATE,\r
- *             -FDT_ERR_BADSTRUCTURE,\r
- *             -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-const void *fdt_getprop(const void *fdt, int nodeoffset,\r
-                       const char *name, int *lenp);\r
-static inline void *fdt_getprop_w(void *fdt, int nodeoffset,\r
-                                 const char *name, int *lenp)\r
+ *      pointer to the property's value\r
+ *              if lenp is non-NULL, *lenp contains the length of the property\r
+ *              value (>=0)\r
+ *      NULL, on error\r
+ *              if lenp is non-NULL, *lenp contains an error code (<0):\r
+ *              -FDT_ERR_NOTFOUND, node does not have named property\r
+ *              -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE\r
+ *                      tag\r
+ *              -FDT_ERR_BADMAGIC,\r
+ *              -FDT_ERR_BADVERSION,\r
+ *              -FDT_ERR_BADSTATE,\r
+ *              -FDT_ERR_BADSTRUCTURE,\r
+ *              -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+const void *\r
+fdt_getprop (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  int         *lenp\r
+  );\r
+\r
+static inline void *\r
+fdt_getprop_w (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  int         *lenp\r
+  )\r
 {\r
-       return (void *)(uintptr_t)fdt_getprop(fdt, nodeoffset, name, lenp);\r
+  return (void *)(uintptr_t)fdt_getprop (fdt, nodeoffset, name, lenp);\r
 }\r
 \r
 /**\r
@@ -704,10 +862,14 @@ static inline void *fdt_getprop_w(void *fdt, int nodeoffset,
  * structure block offset nodeoffset.\r
  *\r
  * returns:\r
- *     the phandle of the node at nodeoffset, on success (!= 0, != -1)\r
- *     0, if the node has no phandle, or another error occurs\r
+ *      the phandle of the node at nodeoffset, on success (!= 0, != -1)\r
+ *      0, if the node has no phandle, or another error occurs\r
  */\r
-uint32_t fdt_get_phandle(const void *fdt, int nodeoffset);\r
+uint32_t\r
+fdt_get_phandle (\r
+  const void  *fdt,\r
+  int         nodeoffset\r
+  );\r
 \r
 /**\r
  * fdt_get_alias_namelen - get alias based on substring\r
@@ -719,8 +881,13 @@ uint32_t fdt_get_phandle(const void *fdt, int nodeoffset);
  * characters of name for matching the alias name.\r
  */\r
 #ifndef SWIG /* Not available in Python */\r
-const char *fdt_get_alias_namelen(const void *fdt,\r
-                                 const char *name, int namelen);\r
+const char *\r
+fdt_get_alias_namelen (\r
+  const void  *fdt,\r
+  const char  *name,\r
+  int         namelen\r
+  );\r
+\r
 #endif\r
 \r
 /**\r
@@ -732,10 +899,14 @@ const char *fdt_get_alias_namelen(const void *fdt,
  * value of the property named 'name' in the node /aliases.\r
  *\r
  * returns:\r
- *     a pointer to the expansion of the alias named 'name', if it exists\r
- *     NULL, if the given alias or the /aliases node does not exist\r
+ *      a pointer to the expansion of the alias named 'name', if it exists\r
+ *      NULL, if the given alias or the /aliases node does not exist\r
  */\r
-const char *fdt_get_alias(const void *fdt, const char *name);\r
+const char *\r
+fdt_get_alias (\r
+  const void  *fdt,\r
+  const char  *name\r
+  );\r
 \r
 /**\r
  * fdt_get_path - determine the full path of a node\r
@@ -751,18 +922,24 @@ const char *fdt_get_alias(const void *fdt, const char *name);
  * structure from the start to nodeoffset.\r
  *\r
  * returns:\r
- *     0, on success\r
- *             buf contains the absolute path of the node at\r
- *             nodeoffset, as a NUL-terminated string.\r
- *     -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
- *     -FDT_ERR_NOSPACE, the path of the given node is longer than (bufsize-1)\r
- *             characters and will not fit in the given buffer.\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE, standard meanings\r
+ *      0, on success\r
+ *              buf contains the absolute path of the node at\r
+ *              nodeoffset, as a NUL-terminated string.\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
+ *      -FDT_ERR_NOSPACE, the path of the given node is longer than (bufsize-1)\r
+ *              characters and will not fit in the given buffer.\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE, standard meanings\r
  */\r
-int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen);\r
+int\r
+fdt_get_path (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  char        *buf,\r
+  int         buflen\r
+  );\r
 \r
 /**\r
  * fdt_supernode_atdepth_offset - find a specific ancestor of a node\r
@@ -774,28 +951,33 @@ int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen);
  * fdt_supernode_atdepth_offset() finds an ancestor of the given node\r
  * at a specific depth from the root (where the root itself has depth\r
  * 0, its immediate subnodes depth 1 and so forth).  So\r
- *     fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, NULL);\r
+ *      fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, NULL);\r
  * will always return 0, the offset of the root node.  If the node at\r
  * nodeoffset has depth D, then:\r
- *     fdt_supernode_atdepth_offset(fdt, nodeoffset, D, NULL);\r
+ *      fdt_supernode_atdepth_offset(fdt, nodeoffset, D, NULL);\r
  * will return nodeoffset itself.\r
  *\r
  * NOTE: This function is expensive, as it must scan the device tree\r
  * structure from the start to nodeoffset.\r
  *\r
  * returns:\r
- *     structure block offset of the node at node offset's ancestor\r
- *             of depth supernodedepth (>=0), on success\r
- *     -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
- *     -FDT_ERR_NOTFOUND, supernodedepth was greater than the depth of\r
- *             nodeoffset\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE, standard meanings\r
+ *      structure block offset of the node at node offset's ancestor\r
+ *              of depth supernodedepth (>=0), on success\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
+ *      -FDT_ERR_NOTFOUND, supernodedepth was greater than the depth of\r
+ *              nodeoffset\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE, standard meanings\r
  */\r
-int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,\r
-                                int supernodedepth, int *nodedepth);\r
+int\r
+fdt_supernode_atdepth_offset (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  int         supernodedepth,\r
+  int         *nodedepth\r
+  );\r
 \r
 /**\r
  * fdt_node_depth - find the depth of a given node\r
@@ -809,14 +991,18 @@ int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
  * structure from the start to nodeoffset.\r
  *\r
  * returns:\r
- *     depth of the node at nodeoffset (>=0), on success\r
- *     -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE, standard meanings\r
+ *      depth of the node at nodeoffset (>=0), on success\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE, standard meanings\r
  */\r
-int fdt_node_depth(const void *fdt, int nodeoffset);\r
+int\r
+fdt_node_depth (\r
+  const void  *fdt,\r
+  int         nodeoffset\r
+  );\r
 \r
 /**\r
  * fdt_parent_offset - find the parent of a given node\r
@@ -831,15 +1017,19 @@ int fdt_node_depth(const void *fdt, int nodeoffset);
  * structure from the start to nodeoffset, *twice*.\r
  *\r
  * returns:\r
- *     structure block offset of the parent of the node at nodeoffset\r
- *             (>=0), on success\r
- *     -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE, standard meanings\r
+ *      structure block offset of the parent of the node at nodeoffset\r
+ *              (>=0), on success\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE, standard meanings\r
  */\r
-int fdt_parent_offset(const void *fdt, int nodeoffset);\r
+int\r
+fdt_parent_offset (\r
+  const void  *fdt,\r
+  int         nodeoffset\r
+  );\r
 \r
 /**\r
  * fdt_node_offset_by_prop_value - find nodes with a given property value\r
@@ -856,32 +1046,37 @@ int fdt_parent_offset(const void *fdt, int nodeoffset);
  *\r
  * To iterate through all nodes matching the criterion, the following\r
  * idiom can be used:\r
- *     offset = fdt_node_offset_by_prop_value(fdt, -1, propname,\r
- *                                            propval, proplen);\r
- *     while (offset != -FDT_ERR_NOTFOUND) {\r
- *             // other code here\r
- *             offset = fdt_node_offset_by_prop_value(fdt, offset, propname,\r
- *                                                    propval, proplen);\r
- *     }\r
+ *      offset = fdt_node_offset_by_prop_value(fdt, -1, propname,\r
+ *                                             propval, proplen);\r
+ *      while (offset != -FDT_ERR_NOTFOUND) {\r
+ *              // other code here\r
+ *              offset = fdt_node_offset_by_prop_value(fdt, offset, propname,\r
+ *                                                     propval, proplen);\r
+ *      }\r
  *\r
  * Note the -1 in the first call to the function, if 0 is used here\r
  * instead, the function will never locate the root node, even if it\r
  * matches the criterion.\r
  *\r
  * returns:\r
- *     structure block offset of the located node (>= 0, >startoffset),\r
- *              on success\r
- *     -FDT_ERR_NOTFOUND, no node matching the criterion exists in the\r
- *             tree after startoffset\r
- *     -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE, standard meanings\r
+ *      structure block offset of the located node (>= 0, >startoffset),\r
+ *               on success\r
+ *      -FDT_ERR_NOTFOUND, no node matching the criterion exists in the\r
+ *              tree after startoffset\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE, standard meanings\r
  */\r
-int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,\r
-                                 const char *propname,\r
-                                 const void *propval, int proplen);\r
+int\r
+fdt_node_offset_by_prop_value (\r
+  const void  *fdt,\r
+  int         startoffset,\r
+  const char  *propname,\r
+  const void  *propval,\r
+  int         proplen\r
+  );\r
 \r
 /**\r
  * fdt_node_offset_by_phandle - find the node with a given phandle\r
@@ -894,15 +1089,19 @@ int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
  * undefined.\r
  *\r
  * returns:\r
- *     structure block offset of the located node (>= 0), on success\r
- *     -FDT_ERR_NOTFOUND, no node with that phandle exists\r
- *     -FDT_ERR_BADPHANDLE, given phandle value was invalid (0 or -1)\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE, standard meanings\r
+ *      structure block offset of the located node (>= 0), on success\r
+ *      -FDT_ERR_NOTFOUND, no node with that phandle exists\r
+ *      -FDT_ERR_BADPHANDLE, given phandle value was invalid (0 or -1)\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE, standard meanings\r
  */\r
-int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle);\r
+int\r
+fdt_node_offset_by_phandle (\r
+  const void  *fdt,\r
+  uint32_t    phandle\r
+  );\r
 \r
 /**\r
  * fdt_node_check_compatible: check a node's compatible property\r
@@ -916,18 +1115,22 @@ int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle);
  * it returns non-zero otherwise, or on error.\r
  *\r
  * returns:\r
- *     0, if the node has a 'compatible' property listing the given string\r
- *     1, if the node has a 'compatible' property, but it does not list\r
- *             the given string\r
- *     -FDT_ERR_NOTFOUND, if the given node has no 'compatible' property\r
- *     -FDT_ERR_BADOFFSET, if nodeoffset does not refer to a BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE, standard meanings\r
+ *      0, if the node has a 'compatible' property listing the given string\r
+ *      1, if the node has a 'compatible' property, but it does not list\r
+ *              the given string\r
+ *      -FDT_ERR_NOTFOUND, if the given node has no 'compatible' property\r
+ *      -FDT_ERR_BADOFFSET, if nodeoffset does not refer to a BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE, standard meanings\r
  */\r
-int fdt_node_check_compatible(const void *fdt, int nodeoffset,\r
-                             const char *compatible);\r
+int\r
+fdt_node_check_compatible (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  const char  *compatible\r
+  );\r
 \r
 /**\r
  * fdt_node_offset_by_compatible - find nodes with a given 'compatible' value\r
@@ -942,29 +1145,33 @@ int fdt_node_check_compatible(const void *fdt, int nodeoffset,
  *\r
  * To iterate through all nodes matching the criterion, the following\r
  * idiom can be used:\r
- *     offset = fdt_node_offset_by_compatible(fdt, -1, compatible);\r
- *     while (offset != -FDT_ERR_NOTFOUND) {\r
- *             // other code here\r
- *             offset = fdt_node_offset_by_compatible(fdt, offset, compatible);\r
- *     }\r
+ *      offset = fdt_node_offset_by_compatible(fdt, -1, compatible);\r
+ *      while (offset != -FDT_ERR_NOTFOUND) {\r
+ *              // other code here\r
+ *              offset = fdt_node_offset_by_compatible(fdt, offset, compatible);\r
+ *      }\r
  *\r
  * Note the -1 in the first call to the function, if 0 is used here\r
  * instead, the function will never locate the root node, even if it\r
  * matches the criterion.\r
  *\r
  * returns:\r
- *     structure block offset of the located node (>= 0, >startoffset),\r
- *              on success\r
- *     -FDT_ERR_NOTFOUND, no node matching the criterion exists in the\r
- *             tree after startoffset\r
- *     -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE, standard meanings\r
+ *      structure block offset of the located node (>= 0, >startoffset),\r
+ *               on success\r
+ *      -FDT_ERR_NOTFOUND, no node matching the criterion exists in the\r
+ *              tree after startoffset\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE, standard meanings\r
  */\r
-int fdt_node_offset_by_compatible(const void *fdt, int startoffset,\r
-                                 const char *compatible);\r
+int\r
+fdt_node_offset_by_compatible (\r
+  const void  *fdt,\r
+  int         startoffset,\r
+  const char  *compatible\r
+  );\r
 \r
 /**\r
  * fdt_stringlist_contains - check a string list property for a string\r
@@ -978,7 +1185,12 @@ int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
  *\r
  * @return: 1 if the string is found in the list, 0 not found, or invalid list\r
  */\r
-int fdt_stringlist_contains(const char *strlist, int listlen, const char *str);\r
+int\r
+fdt_stringlist_contains (\r
+  const char  *strlist,\r
+  int         listlen,\r
+  const char  *str\r
+  );\r
 \r
 /**\r
  * fdt_stringlist_count - count the number of strings in a string list\r
@@ -990,7 +1202,12 @@ int fdt_stringlist_contains(const char *strlist, int listlen, const char *str);
  *   -FDT_ERR_BADVALUE if the property value is not NUL-terminated\r
  *   -FDT_ERR_NOTFOUND if the property does not exist\r
  */\r
-int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property);\r
+int\r
+fdt_stringlist_count (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  const char  *property\r
+  );\r
 \r
 /**\r
  * fdt_stringlist_search - find a string in a string list and return its index\r
@@ -1011,8 +1228,13 @@ int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property);
  *   -FDT_ERR_NOTFOUND if the property does not exist or does not contain\r
  *                     the given string\r
  */\r
-int fdt_stringlist_search(const void *fdt, int nodeoffset, const char *property,\r
-                         const char *string);\r
+int\r
+fdt_stringlist_search (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  const char  *property,\r
+  const char  *string\r
+  );\r
 \r
 /**\r
  * fdt_stringlist_get() - obtain the string at a given index in a string list\r
@@ -1038,9 +1260,14 @@ int fdt_stringlist_search(const void *fdt, int nodeoffset, const char *property,
  *     -FDT_ERR_BADVALUE if the property value is not NUL-terminated\r
  *     -FDT_ERR_NOTFOUND if the property does not exist\r
  */\r
-const char *fdt_stringlist_get(const void *fdt, int nodeoffset,\r
-                              const char *property, int index,\r
-                              int *lenp);\r
+const char *\r
+fdt_stringlist_get (\r
+  const void  *fdt,\r
+  int         nodeoffset,\r
+  const char  *property,\r
+  int         index,\r
+  int         *lenp\r
+  );\r
 \r
 /**********************************************************************/\r
 /* Read-only functions (addressing related)                           */\r
@@ -1055,7 +1282,7 @@ const char *fdt_stringlist_get(const void *fdt, int nodeoffset,
  * Implementations may support larger values, but in practice higher\r
  * values aren't used.\r
  */\r
-#define FDT_MAX_NCELLS         4\r
+#define FDT_MAX_NCELLS  4\r
 \r
 /**\r
  * fdt_address_cells - retrieve address size for a bus represented in the tree\r
@@ -1065,17 +1292,21 @@ const char *fdt_stringlist_get(const void *fdt, int nodeoffset,
  * When the node has a valid #address-cells property, returns its value.\r
  *\r
  * returns:\r
- *     0 <= n < FDT_MAX_NCELLS, on success\r
+ *      0 <= n < FDT_MAX_NCELLS, on success\r
  *      2, if the node has no #address-cells property\r
  *      -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid\r
- *             #address-cells property\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *              #address-cells property\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
-int fdt_address_cells(const void *fdt, int nodeoffset);\r
+int\r
+fdt_address_cells (\r
+  const void  *fdt,\r
+  int         nodeoffset\r
+  );\r
 \r
 /**\r
  * fdt_size_cells - retrieve address range size for a bus represented in the\r
@@ -1086,18 +1317,21 @@ int fdt_address_cells(const void *fdt, int nodeoffset);
  * When the node has a valid #size-cells property, returns its value.\r
  *\r
  * returns:\r
- *     0 <= n < FDT_MAX_NCELLS, on success\r
+ *      0 <= n < FDT_MAX_NCELLS, on success\r
  *      2, if the node has no #address-cells property\r
  *      -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid\r
- *             #size-cells property\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *              #size-cells property\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
-int fdt_size_cells(const void *fdt, int nodeoffset);\r
-\r
+int\r
+fdt_size_cells (\r
+  const void  *fdt,\r
+  int         nodeoffset\r
+  );\r
 \r
 /**********************************************************************/\r
 /* Write-in-place functions                                           */\r
@@ -1120,10 +1354,17 @@ int fdt_size_cells(const void *fdt, int nodeoffset);
  * an array and you have a string that doesn't end with \0.\r
  */\r
 #ifndef SWIG /* Not available in Python */\r
-int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset,\r
-                                       const char *name, int namelen,\r
-                                       uint32_t idx, const void *val,\r
-                                       int len);\r
+int\r
+fdt_setprop_inplace_namelen_partial (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  int         namelen,\r
+  uint32_t    idx,\r
+  const void  *val,\r
+  int         len\r
+  );\r
+\r
 #endif\r
 \r
 /**\r
@@ -1144,19 +1385,26 @@ int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset,
  * of the tree.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, if len is not equal to the property's current length\r
- *     -FDT_ERR_NOTFOUND, node does not have the named property\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, if len is not equal to the property's current length\r
+ *      -FDT_ERR_NOTFOUND, node does not have the named property\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
 #ifndef SWIG /* Not available in Python */\r
-int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,\r
-                       const void *val, int len);\r
+int\r
+fdt_setprop_inplace (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  const void  *val,\r
+  int         len\r
+  );\r
+\r
 #endif\r
 \r
 /**\r
@@ -1177,21 +1425,27 @@ int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
  * of the tree.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, if the property's length is not equal to 4\r
- *     -FDT_ERR_NOTFOUND, node does not have the named property\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-static inline int fdt_setprop_inplace_u32(void *fdt, int nodeoffset,\r
-                                         const char *name, uint32_t val)\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, if the property's length is not equal to 4\r
+ *      -FDT_ERR_NOTFOUND, node does not have the named property\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+static inline int\r
+fdt_setprop_inplace_u32 (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  uint32_t    val\r
+  )\r
 {\r
-       fdt32_t tmp = cpu_to_fdt32(val);\r
-       return fdt_setprop_inplace(fdt, nodeoffset, name, &tmp, sizeof(tmp));\r
+  fdt32_t  tmp = cpu_to_fdt32 (val);\r
+\r
+  return fdt_setprop_inplace (fdt, nodeoffset, name, &tmp, sizeof (tmp));\r
 }\r
 \r
 /**\r
@@ -1212,21 +1466,27 @@ static inline int fdt_setprop_inplace_u32(void *fdt, int nodeoffset,
  * of the tree.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, if the property's length is not equal to 8\r
- *     -FDT_ERR_NOTFOUND, node does not have the named property\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-static inline int fdt_setprop_inplace_u64(void *fdt, int nodeoffset,\r
-                                         const char *name, uint64_t val)\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, if the property's length is not equal to 8\r
+ *      -FDT_ERR_NOTFOUND, node does not have the named property\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+static inline int\r
+fdt_setprop_inplace_u64 (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  uint64_t    val\r
+  )\r
 {\r
-       fdt64_t tmp = cpu_to_fdt64(val);\r
-       return fdt_setprop_inplace(fdt, nodeoffset, name, &tmp, sizeof(tmp));\r
+  fdt64_t  tmp = cpu_to_fdt64 (val);\r
+\r
+  return fdt_setprop_inplace (fdt, nodeoffset, name, &tmp, sizeof (tmp));\r
 }\r
 \r
 /**\r
@@ -1234,10 +1494,15 @@ static inline int fdt_setprop_inplace_u64(void *fdt, int nodeoffset,
  *\r
  * This is an alternative name for fdt_setprop_inplace_u32()\r
  */\r
-static inline int fdt_setprop_inplace_cell(void *fdt, int nodeoffset,\r
-                                          const char *name, uint32_t val)\r
+static inline int\r
+fdt_setprop_inplace_cell (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  uint32_t    val\r
+  )\r
 {\r
-       return fdt_setprop_inplace_u32(fdt, nodeoffset, name, val);\r
+  return fdt_setprop_inplace_u32 (fdt, nodeoffset, name, val);\r
 }\r
 \r
 /**\r
@@ -1255,16 +1520,21 @@ static inline int fdt_setprop_inplace_cell(void *fdt, int nodeoffset,
  * tree.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOTFOUND, node does not have the named property\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_NOTFOUND, node does not have the named property\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
-int fdt_nop_property(void *fdt, int nodeoffset, const char *name);\r
+int\r
+fdt_nop_property (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name\r
+  );\r
 \r
 /**\r
  * fdt_nop_node - replace a node (subtree) with nop tags\r
@@ -1280,39 +1550,95 @@ int fdt_nop_property(void *fdt, int nodeoffset, const char *name);
  * move any other part of the tree.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
-int fdt_nop_node(void *fdt, int nodeoffset);\r
+int\r
+fdt_nop_node (\r
+  void  *fdt,\r
+  int   nodeoffset\r
+  );\r
 \r
 /**********************************************************************/\r
 /* Sequential write functions                                         */\r
 /**********************************************************************/\r
 \r
-int fdt_create(void *buf, int bufsize);\r
-int fdt_resize(void *fdt, void *buf, int bufsize);\r
-int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size);\r
-int fdt_finish_reservemap(void *fdt);\r
-int fdt_begin_node(void *fdt, const char *name);\r
-int fdt_property(void *fdt, const char *name, const void *val, int len);\r
-static inline int fdt_property_u32(void *fdt, const char *name, uint32_t val)\r
+int\r
+fdt_create (\r
+  void  *buf,\r
+  int   bufsize\r
+  );\r
+\r
+int\r
+fdt_resize (\r
+  void  *fdt,\r
+  void  *buf,\r
+  int   bufsize\r
+  );\r
+\r
+int\r
+fdt_add_reservemap_entry (\r
+  void      *fdt,\r
+  uint64_t  addr,\r
+  uint64_t  size\r
+  );\r
+\r
+int\r
+fdt_finish_reservemap (\r
+  void  *fdt\r
+  );\r
+\r
+int\r
+fdt_begin_node (\r
+  void        *fdt,\r
+  const char  *name\r
+  );\r
+\r
+int\r
+fdt_property (\r
+  void        *fdt,\r
+  const char  *name,\r
+  const void  *val,\r
+  int         len\r
+  );\r
+\r
+static inline int\r
+fdt_property_u32 (\r
+  void        *fdt,\r
+  const char  *name,\r
+  uint32_t    val\r
+  )\r
 {\r
-       fdt32_t tmp = cpu_to_fdt32(val);\r
-       return fdt_property(fdt, name, &tmp, sizeof(tmp));\r
+  fdt32_t  tmp = cpu_to_fdt32 (val);\r
+\r
+  return fdt_property (fdt, name, &tmp, sizeof (tmp));\r
 }\r
-static inline int fdt_property_u64(void *fdt, const char *name, uint64_t val)\r
+\r
+static inline int\r
+fdt_property_u64 (\r
+  void        *fdt,\r
+  const char  *name,\r
+  uint64_t    val\r
+  )\r
 {\r
-       fdt64_t tmp = cpu_to_fdt64(val);\r
-       return fdt_property(fdt, name, &tmp, sizeof(tmp));\r
+  fdt64_t  tmp = cpu_to_fdt64 (val);\r
+\r
+  return fdt_property (fdt, name, &tmp, sizeof (tmp));\r
 }\r
-static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)\r
+\r
+static inline int\r
+fdt_property_cell (\r
+  void        *fdt,\r
+  const char  *name,\r
+  uint32_t    val\r
+  )\r
 {\r
-       return fdt_property_u32(fdt, name, val);\r
+  return fdt_property_u32 (fdt, name, val);\r
 }\r
 \r
 /**\r
@@ -1324,24 +1650,51 @@ static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
  * @valp: returns a pointer to where where the value should be placed\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_NOSPACE, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_NOSPACE, standard meanings\r
  */\r
-int fdt_property_placeholder(void *fdt, const char *name, int len, void **valp);\r
+int\r
+fdt_property_placeholder (\r
+  void        *fdt,\r
+  const char  *name,\r
+  int         len,\r
+  void        **valp\r
+  );\r
 \r
 #define fdt_property_string(fdt, name, str) \\r
-       fdt_property(fdt, name, str, strlen(str)+1)\r
-int fdt_end_node(void *fdt);\r
-int fdt_finish(void *fdt);\r
+        fdt_property(fdt, name, str, strlen(str)+1)\r
+int\r
+fdt_end_node (\r
+  void  *fdt\r
+  );\r
+\r
+int\r
+fdt_finish (\r
+  void  *fdt\r
+  );\r
 \r
 /**********************************************************************/\r
 /* Read-write functions                                               */\r
 /**********************************************************************/\r
 \r
-int fdt_create_empty_tree(void *buf, int bufsize);\r
-int fdt_open_into(const void *fdt, void *buf, int bufsize);\r
-int fdt_pack(void *fdt);\r
+int\r
+fdt_create_empty_tree (\r
+  void  *buf,\r
+  int   bufsize\r
+  );\r
+\r
+int\r
+fdt_open_into (\r
+  const void  *fdt,\r
+  void        *buf,\r
+  int         bufsize\r
+  );\r
+\r
+int\r
+fdt_pack (\r
+  void  *fdt\r
+  );\r
 \r
 /**\r
  * fdt_add_mem_rsv - add one memory reserve map entry\r
@@ -1355,17 +1708,22 @@ int fdt_pack(void *fdt);
  * therefore change the indexes of some entries in the table.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new reservation entry\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new reservation entry\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
-int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size);\r
+int\r
+fdt_add_mem_rsv (\r
+  void      *fdt,\r
+  uint64_t  address,\r
+  uint64_t  size\r
+  );\r
 \r
 /**\r
  * fdt_del_mem_rsv - remove a memory reserve map entry\r
@@ -1379,17 +1737,21 @@ int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size);
  * therefore change the indexes of some entries in the table.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOTFOUND, there is no entry of the given index (i.e. there\r
- *             are less than n+1 reserve map entries)\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_NOTFOUND, there is no entry of the given index (i.e. there\r
+ *              are less than n+1 reserve map entries)\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
-int fdt_del_mem_rsv(void *fdt, int n);\r
+int\r
+fdt_del_mem_rsv (\r
+  void  *fdt,\r
+  int   n\r
+  );\r
 \r
 /**\r
  * fdt_set_name - change the name of a given node\r
@@ -1407,15 +1769,20 @@ int fdt_del_mem_rsv(void *fdt, int n);
  * therefore change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob\r
- *             to contain the new name\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob\r
+ *              to contain the new name\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE, standard meanings\r
  */\r
-int fdt_set_name(void *fdt, int nodeoffset, const char *name);\r
+int\r
+fdt_set_name (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name\r
+  );\r
 \r
 /**\r
  * fdt_setprop - create or change a property\r
@@ -1433,20 +1800,26 @@ int fdt_set_name(void *fdt, int nodeoffset, const char *name);
  * therefore change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new property value\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-int fdt_setprop(void *fdt, int nodeoffset, const char *name,\r
-               const void *val, int len);\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new property value\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+int\r
+fdt_setprop (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  const void  *val,\r
+  int         len\r
+  );\r
 \r
 /**\r
  * fdt_setprop _placeholder - allocate space for a property\r
@@ -1464,20 +1837,26 @@ int fdt_setprop(void *fdt, int nodeoffset, const char *name,
  * therefore change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new property value\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-int fdt_setprop_placeholder(void *fdt, int nodeoffset, const char *name,\r
-                           int len, void **prop_data);\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new property value\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+int\r
+fdt_setprop_placeholder (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  int         len,\r
+  void        **prop_data\r
+  );\r
 \r
 /**\r
  * fdt_setprop_u32 - set a property to a 32-bit integer\r
@@ -1495,23 +1874,29 @@ int fdt_setprop_placeholder(void *fdt, int nodeoffset, const char *name,
  * therefore change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new property value\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-static inline int fdt_setprop_u32(void *fdt, int nodeoffset, const char *name,\r
-                                 uint32_t val)\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new property value\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+static inline int\r
+fdt_setprop_u32 (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  uint32_t    val\r
+  )\r
 {\r
-       fdt32_t tmp = cpu_to_fdt32(val);\r
-       return fdt_setprop(fdt, nodeoffset, name, &tmp, sizeof(tmp));\r
+  fdt32_t  tmp = cpu_to_fdt32 (val);\r
+\r
+  return fdt_setprop (fdt, nodeoffset, name, &tmp, sizeof (tmp));\r
 }\r
 \r
 /**\r
@@ -1530,23 +1915,29 @@ static inline int fdt_setprop_u32(void *fdt, int nodeoffset, const char *name,
  * therefore change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new property value\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-static inline int fdt_setprop_u64(void *fdt, int nodeoffset, const char *name,\r
-                                 uint64_t val)\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new property value\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+static inline int\r
+fdt_setprop_u64 (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  uint64_t    val\r
+  )\r
 {\r
-       fdt64_t tmp = cpu_to_fdt64(val);\r
-       return fdt_setprop(fdt, nodeoffset, name, &tmp, sizeof(tmp));\r
+  fdt64_t  tmp = cpu_to_fdt64 (val);\r
+\r
+  return fdt_setprop (fdt, nodeoffset, name, &tmp, sizeof (tmp));\r
 }\r
 \r
 /**\r
@@ -1554,10 +1945,15 @@ static inline int fdt_setprop_u64(void *fdt, int nodeoffset, const char *name,
  *\r
  * This is an alternative name for fdt_setprop_u32()\r
  */\r
-static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,\r
-                                  uint32_t val)\r
+static inline int\r
+fdt_setprop_cell (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  uint32_t    val\r
+  )\r
 {\r
-       return fdt_setprop_u32(fdt, nodeoffset, name, val);\r
+  return fdt_setprop_u32 (fdt, nodeoffset, name, val);\r
 }\r
 \r
 /**\r
@@ -1576,21 +1972,20 @@ static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
  * therefore change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new property value\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new property value\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
 #define fdt_setprop_string(fdt, nodeoffset, name, str) \\r
-       fdt_setprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)\r
-\r
+        fdt_setprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)\r
 \r
 /**\r
  * fdt_setprop_empty - set a property to an empty value\r
@@ -1606,20 +2001,20 @@ static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
  * therefore change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new property value\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new property value\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
 #define fdt_setprop_empty(fdt, nodeoffset, name) \\r
-       fdt_setprop((fdt), (nodeoffset), (name), NULL, 0)\r
+        fdt_setprop((fdt), (nodeoffset), (name), NULL, 0)\r
 \r
 /**\r
  * fdt_appendprop - append to or create a property\r
@@ -1636,20 +2031,26 @@ static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
  * change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new property value\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-int fdt_appendprop(void *fdt, int nodeoffset, const char *name,\r
-                  const void *val, int len);\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new property value\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+int\r
+fdt_appendprop (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  const void  *val,\r
+  int         len\r
+  );\r
 \r
 /**\r
  * fdt_appendprop_u32 - append a 32-bit integer value to a property\r
@@ -1667,23 +2068,29 @@ int fdt_appendprop(void *fdt, int nodeoffset, const char *name,
  * change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new property value\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-static inline int fdt_appendprop_u32(void *fdt, int nodeoffset,\r
-                                    const char *name, uint32_t val)\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new property value\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+static inline int\r
+fdt_appendprop_u32 (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  uint32_t    val\r
+  )\r
 {\r
-       fdt32_t tmp = cpu_to_fdt32(val);\r
-       return fdt_appendprop(fdt, nodeoffset, name, &tmp, sizeof(tmp));\r
+  fdt32_t  tmp = cpu_to_fdt32 (val);\r
+\r
+  return fdt_appendprop (fdt, nodeoffset, name, &tmp, sizeof (tmp));\r
 }\r
 \r
 /**\r
@@ -1702,23 +2109,29 @@ static inline int fdt_appendprop_u32(void *fdt, int nodeoffset,
  * change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new property value\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
- */\r
-static inline int fdt_appendprop_u64(void *fdt, int nodeoffset,\r
-                                    const char *name, uint64_t val)\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new property value\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+static inline int\r
+fdt_appendprop_u64 (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  uint64_t    val\r
+  )\r
 {\r
-       fdt64_t tmp = cpu_to_fdt64(val);\r
-       return fdt_appendprop(fdt, nodeoffset, name, &tmp, sizeof(tmp));\r
+  fdt64_t  tmp = cpu_to_fdt64 (val);\r
+\r
+  return fdt_appendprop (fdt, nodeoffset, name, &tmp, sizeof (tmp));\r
 }\r
 \r
 /**\r
@@ -1726,10 +2139,15 @@ static inline int fdt_appendprop_u64(void *fdt, int nodeoffset,
  *\r
  * This is an alternative name for fdt_appendprop_u32()\r
  */\r
-static inline int fdt_appendprop_cell(void *fdt, int nodeoffset,\r
-                                     const char *name, uint32_t val)\r
+static inline int\r
+fdt_appendprop_cell (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name,\r
+  uint32_t    val\r
+  )\r
 {\r
-       return fdt_appendprop_u32(fdt, nodeoffset, name, val);\r
+  return fdt_appendprop_u32 (fdt, nodeoffset, name, val);\r
 }\r
 \r
 /**\r
@@ -1747,20 +2165,20 @@ static inline int fdt_appendprop_cell(void *fdt, int nodeoffset,
  * change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
- *             contain the new property value\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there is insufficient free space in the blob to\r
+ *              contain the new property value\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
 #define fdt_appendprop_string(fdt, nodeoffset, name, str) \\r
-       fdt_appendprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)\r
+        fdt_appendprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)\r
 \r
 /**\r
  * fdt_delprop - delete a property\r
@@ -1774,17 +2192,22 @@ static inline int fdt_appendprop_cell(void *fdt, int nodeoffset,
  * change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_NOTFOUND, node does not have the named property\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_NOTFOUND, node does not have the named property\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
-int fdt_delprop(void *fdt, int nodeoffset, const char *name);\r
+int\r
+fdt_delprop (\r
+  void        *fdt,\r
+  int         nodeoffset,\r
+  const char  *name\r
+  );\r
 \r
 /**\r
  * fdt_add_subnode_namelen - creates a new node based on substring\r
@@ -1799,8 +2222,14 @@ int fdt_delprop(void *fdt, int nodeoffset, const char *name);
  * full path.\r
  */\r
 #ifndef SWIG /* Not available in Python */\r
-int fdt_add_subnode_namelen(void *fdt, int parentoffset,\r
-                           const char *name, int namelen);\r
+int\r
+fdt_add_subnode_namelen (\r
+  void        *fdt,\r
+  int         parentoffset,\r
+  const char  *name,\r
+  int         namelen\r
+  );\r
+\r
 #endif\r
 \r
 /**\r
@@ -1817,24 +2246,29 @@ int fdt_add_subnode_namelen(void *fdt, int parentoffset,
  * change the offsets of some existing nodes.\r
 \r
  * returns:\r
- *     structure block offset of the created nodeequested subnode (>=0), on\r
- *             success\r
- *     -FDT_ERR_NOTFOUND, if the requested subnode does not exist\r
- *     -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE\r
- *             tag\r
- *     -FDT_ERR_EXISTS, if the node at parentoffset already has a subnode of\r
- *             the given name\r
- *     -FDT_ERR_NOSPACE, if there is insufficient free space in the\r
- *             blob to contain the new node\r
- *     -FDT_ERR_NOSPACE\r
- *     -FDT_ERR_BADLAYOUT\r
+ *      structure block offset of the created nodeequested subnode (>=0), on\r
+ *              success\r
+ *      -FDT_ERR_NOTFOUND, if the requested subnode does not exist\r
+ *      -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE\r
+ *              tag\r
+ *      -FDT_ERR_EXISTS, if the node at parentoffset already has a subnode of\r
+ *              the given name\r
+ *      -FDT_ERR_NOSPACE, if there is insufficient free space in the\r
+ *              blob to contain the new node\r
+ *      -FDT_ERR_NOSPACE\r
+ *      -FDT_ERR_BADLAYOUT\r
  *      -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings.\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings.\r
  */\r
-int fdt_add_subnode(void *fdt, int parentoffset, const char *name);\r
+int\r
+fdt_add_subnode (\r
+  void        *fdt,\r
+  int         parentoffset,\r
+  const char  *name\r
+  );\r
 \r
 /**\r
  * fdt_del_node - delete a node (subtree)\r
@@ -1848,21 +2282,63 @@ int fdt_add_subnode(void *fdt, int parentoffset, const char *name);
  * change the offsets of some existing nodes.\r
  *\r
  * returns:\r
- *     0, on success\r
- *     -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
- *     -FDT_ERR_BADLAYOUT,\r
- *     -FDT_ERR_BADMAGIC,\r
- *     -FDT_ERR_BADVERSION,\r
- *     -FDT_ERR_BADSTATE,\r
- *     -FDT_ERR_BADSTRUCTURE,\r
- *     -FDT_ERR_TRUNCATED, standard meanings\r
+ *      0, on success\r
+ *      -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
  */\r
-int fdt_del_node(void *fdt, int nodeoffset);\r
+int\r
+fdt_del_node (\r
+  void  *fdt,\r
+  int   nodeoffset\r
+  );\r
+\r
+/**\r
+ * fdt_overlay_apply - Applies a DT overlay on a base DT\r
+ * @fdt: pointer to the base device tree blob\r
+ * @fdto: pointer to the device tree overlay blob\r
+ *\r
+ * fdt_overlay_apply() will apply the given device tree overlay on the\r
+ * given base device tree.\r
+ *\r
+ * Expect the base device tree to be modified, even if the function\r
+ * returns an error.\r
+ *\r
+ * returns:\r
+ *      0, on success\r
+ *      -FDT_ERR_NOSPACE, there's not enough space in the base device tree\r
+ *      -FDT_ERR_NOTFOUND, the overlay points to some inexistant nodes or\r
+ *              properties in the base DT\r
+ *      -FDT_ERR_BADPHANDLE,\r
+ *      -FDT_ERR_BADOVERLAY,\r
+ *      -FDT_ERR_NOPHANDLES,\r
+ *      -FDT_ERR_INTERNAL,\r
+ *      -FDT_ERR_BADLAYOUT,\r
+ *      -FDT_ERR_BADMAGIC,\r
+ *      -FDT_ERR_BADOFFSET,\r
+ *      -FDT_ERR_BADPATH,\r
+ *      -FDT_ERR_BADVERSION,\r
+ *      -FDT_ERR_BADSTRUCTURE,\r
+ *      -FDT_ERR_BADSTATE,\r
+ *      -FDT_ERR_TRUNCATED, standard meanings\r
+ */\r
+int\r
+fdt_overlay_apply (\r
+  void  *fdt,\r
+  void  *fdto\r
+  );\r
 \r
 /**********************************************************************/\r
 /* Debugging / informational functions                                */\r
 /**********************************************************************/\r
 \r
-const char *fdt_strerror(int errval);\r
+const char *\r
+fdt_strerror (\r
+  int  errval\r
+  );\r
 \r
 #endif /* _LIBFDT_H */\r