summaryrefslogtreecommitdiff
path: root/include/fdt_support.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/fdt_support.h')
-rw-r--r--include/fdt_support.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 1bda686..c3d1fbc 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -133,6 +133,18 @@ static inline int fdt_status_fail_by_alias(void *fdt, const char *alias)
return fdt_set_status_by_alias(fdt, alias, FDT_STATUS_FAIL, 0);
}
+/* Helper to read a big number; size is in cells (not bytes) */
+static inline u64 of_read_number(const fdt32_t *cell, int size)
+{
+ u64 r = 0;
+ while (size--)
+ r = (r << 32) | fdt32_to_cpu(*(cell++));
+ return r;
+}
+
+void of_bus_default_count_cells(void *blob, int parentoffset,
+ int *addrc, int *sizec);
+
#endif /* ifdef CONFIG_OF_LIBFDT */
#ifdef USE_HOSTCC