#ifndef _LIBFDT_INTERNAL_H\r
#define _LIBFDT_INTERNAL_H\r
+\r
/*\r
* libfdt - Flat Device Tree manipulation\r
* Copyright (C) 2006 David Gibson, IBM Corporation.\r
*/\r
#include <fdt.h>\r
\r
-#define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))\r
-#define FDT_TAGALIGN(x) (FDT_ALIGN((x), FDT_TAGSIZE))\r
+#define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))\r
+#define FDT_TAGALIGN(x) (FDT_ALIGN((x), FDT_TAGSIZE))\r
\r
#define FDT_CHECK_HEADER(fdt) \\r
- { \\r
- int __err; \\r
- if ((__err = fdt_check_header(fdt)) != 0) \\r
- return __err; \\r
- }\r
+ { \\r
+ int __err; \\r
+ if ((__err = fdt_check_header(fdt)) != 0) \\r
+ return __err; \\r
+ }\r
+\r
+int\r
+_fdt_check_node_offset (\r
+ const void *fdt,\r
+ int offset\r
+ );\r
+\r
+int\r
+_fdt_check_prop_offset (\r
+ const void *fdt,\r
+ int offset\r
+ );\r
\r
-int _fdt_check_node_offset(const void *fdt, int offset);\r
-int _fdt_check_prop_offset(const void *fdt, int offset);\r
-const char *_fdt_find_string(const char *strtab, int tabsize, const char *s);\r
-int _fdt_node_end_offset(void *fdt, int nodeoffset);\r
+const char *\r
+_fdt_find_string (\r
+ const char *strtab,\r
+ int tabsize,\r
+ const char *s\r
+ );\r
\r
-static inline const void *_fdt_offset_ptr(const void *fdt, int offset)\r
+int\r
+_fdt_node_end_offset (\r
+ void *fdt,\r
+ int nodeoffset\r
+ );\r
+\r
+static inline const void *\r
+_fdt_offset_ptr (\r
+ const void *fdt,\r
+ int offset\r
+ )\r
{\r
- return (const char *)fdt + fdt_off_dt_struct(fdt) + offset;\r
+ return (const char *)fdt + fdt_off_dt_struct (fdt) + offset;\r
}\r
\r
-static inline void *_fdt_offset_ptr_w(void *fdt, int offset)\r
+static inline void *\r
+_fdt_offset_ptr_w (\r
+ void *fdt,\r
+ int offset\r
+ )\r
{\r
- return (void *)(uintptr_t)_fdt_offset_ptr(fdt, offset);\r
+ return (void *)(uintptr_t)_fdt_offset_ptr (fdt, offset);\r
}\r
\r
-static inline const struct fdt_reserve_entry *_fdt_mem_rsv(const void *fdt, int n)\r
+static inline const struct fdt_reserve_entry *\r
+_fdt_mem_rsv (\r
+ const void *fdt,\r
+ int n\r
+ )\r
{\r
- const struct fdt_reserve_entry *rsv_table =\r
- (const struct fdt_reserve_entry *)\r
- ((const char *)fdt + fdt_off_mem_rsvmap(fdt));\r
+ const struct fdt_reserve_entry *rsv_table =\r
+ (const struct fdt_reserve_entry *)\r
+ ((const char *)fdt + fdt_off_mem_rsvmap (fdt));\r
\r
- return rsv_table + n;\r
+ return rsv_table + n;\r
}\r
-static inline struct fdt_reserve_entry *_fdt_mem_rsv_w(void *fdt, int n)\r
+\r
+static inline struct fdt_reserve_entry *\r
+_fdt_mem_rsv_w (\r
+ void *fdt,\r
+ int n\r
+ )\r
{\r
- return (void *)(uintptr_t)_fdt_mem_rsv(fdt, n);\r
+ return (void *)(uintptr_t)_fdt_mem_rsv (fdt, n);\r
}\r
\r
-#define FDT_SW_MAGIC (~FDT_MAGIC)\r
+#define FDT_SW_MAGIC (~FDT_MAGIC)\r
\r
#endif /* _LIBFDT_INTERNAL_H */\r